Skip to the content.

What result scraper should return

You should pass a wapmorgan\OpenApiGenerator\Scraper\DefaultScraper instance in Generator, which should return a Result in scrape() method.

All following class names are in wapmorgan\OpenApiGenerator namespace.

Properties of Scraper\Result\Result:

As you can see, a lot of them is similar to original OpenApi 3 blocks.

Endpoint

Basically, you can only fill $endpoints with Endpoint instances. It has following properties:

For detailed information go to paths description.

Server

Properties of every server for your API:

For detailed information go to servers description.

Tag

Every tag for your specification may have this instance with extra description.

You should define tags manually and then link them to every endpoint.

Properties:

For detailed information go to tags description.

SecurityScheme

Every method of authentication should have a security scheme definition.

Properties of security scheme:

For description of all parameters and they meaning go to explanation of authentication in OpenApi documentation.