0

I know I can add a /v3/api-docs/ to the end of my APIs endpoint to get a JSON representation of my APIs schema.

Is there a way to get the schema for a specific version of the API?

Helen
  • 87,344
  • 17
  • 243
  • 314
Raphael Rafatpanah
  • 19,082
  • 25
  • 92
  • 158
  • 1
    This functionality is specific to your server-side framework. What server/framework/library do you use for your API? – Helen Jun 02 '21 at 07:05
  • We are using the SpringDoc Library to generate our OpenAPI/Swagger UI in our Java Springboot Application – Raphael Rafatpanah Jun 02 '21 at 12:43
  • 1
    What you're looking for is API versioning. Refer to the migration guide [here](https://springdoc.org/#migrating-from-springfox) on how to define the API groups in Springdoc. – Debargha Roy Jun 02 '21 at 14:32

1 Answers1

0

In our case, we have a versioned API.

The below URI was our entire JSON schema including all API versions.

.../v3/api-docs

But, the below URI was scoped only to a specific API version.

.../v3/api-docs/v2-tool

The v2-tool corresponds to a namespace specific to our code.

Raphael Rafatpanah
  • 19,082
  • 25
  • 92
  • 158