OpenApi 3.0 Exclude Internal api definition

Viewed 718

We have a requirement to generate multiple definitions of an API using the Php annotations.

While generating api spec(json/yml), need to exclude internal api which we should not expose to outside world.

And i am using swagger to generate the api doc.

is there any possibility in OpenApi 3.0 and swagger? can we name api as internal and external and exclude based on this tag?

1 Answers

Swagger-php doesn't provide filtering, a solution is to use an external tool like openapi-filter to remove the internal api's from the generated spec.

Related