kubeshop/kuskgateway-api-server

Expose post-processed OpenAPI definition

Opened this issue · 0 comments

External consumers of APIs exposed via Kusk-Gateway should have access to a post-processed version of the corresponding OpenAPI definition. Post-processing should:

remove any operations or paths with x-kusk.disabled: true
remove all x-kusk extensions (this will most likely change in the future)
The post-processed definition should be made available to the user at a path specified with the x-kusk.openapi_path extension at the root level in the pre-processed definition, i.e. if the preprocessed OpenAPI definition contains the following root-level property:

x-kusk:
openapi_path: /openapi
any requests made to the API at /openapi.yaml would return the post-processed OpenAPI definition in yaml format
any requests made to the API at /openapi.json would return the post-processed OpenAPI definition in json format