Skip to content

Add method to provide complete OAS spec file #3

@ybelenko

Description

@ybelenko

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:

  1. Parse yaml or json OAS spec file and store result in static variable.
  2. 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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions