Package accepts deserialized parts of OAS spec as arguments right now. However, it might be much more convenient to specify path to complete OAS spec file and use only operation/model names to mock data.
As a conclusion, package should:
- Parse
yaml or json OAS spec file and store result in static variable.
- Provide additional methods like:
mockModelFromSpec(string $modelName)
mockOperationFromSpec(string $operationId)
mockResponseFromSpec(string $operationId, string $responseStatusCode = 'default', string $mediaType = null).
I guess there might be issues with specs divided into many referenced files, but it's not common case and can be fixed afterwards.
Package accepts deserialized parts of OAS spec as arguments right now. However, it might be much more convenient to specify path to complete OAS spec file and use only operation/model names to mock data.
As a conclusion, package should:
yamlorjsonOAS spec file and store result in static variable.mockModelFromSpec(string $modelName)mockOperationFromSpec(string $operationId)mockResponseFromSpec(string $operationId, string $responseStatusCode = 'default', string $mediaType = null).I guess there might be issues with specs divided into many referenced files, but it's not common case and can be fixed afterwards.