Problem/Motivation

We are using this module to generate Swagger/OpenAPI documentation. Sometimes we want alter the *.json file that this module generate.

Proposed resolution

Add hook to change generated data.

Comments

boddy created an issue. See original summary.

boddy’s picture

The patch was created in contributing with @bohart so it would be great if he will get a credit as well.

boddy’s picture

Here is a fixed patch for 3.0.1 with 'swagger: 2.0' of openAPI

boddy’s picture

If you want to invoke hooks and get the openAPI 3 specifications instead swagger 2.0, you can use patch from #6

bohart’s picture

Version: 3.0.1 » 3.x-dev
Status: Active » Needs work
Parent issue: » #3220024: Version 3.0.1 still implements version 'swagger: 2.0'

Marking this task is dependant on #3220024.

Also, it looks like we need to add the newly created hook to `module.api.php` file before the commit (so marking as `needs work`).

boddy’s picture

Replaced missed 'definitions' of 'swagger:2' to 'components/schemas' of openapi:3
If you want to invoke hooks and get the openAPI 3 specifications instead swagger 2.0, you can use this patch