Skip to content

Add method to provide complete OAS spec file #3

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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