Each repository is intended to contain a single OpenAPI specification. This aligns with the build workflows and repository template design.
- The OpenAPI file must end with
.openapi.yml - Place it in the following directory:
/src/main/resources/openapi/
- Set the version in the OpenAPI file to:
0.0.0 - The actual version is injected automatically during the build process.
- For details, see: OPENAPI-SPEC-VERSIONING
- Define your schemas under
componentsin the OpenAPI spec. - Do not reference external JSON Schema files using
$ref— even if technically supported, they will not render correctly in Swagger UI. - This means payload definitions must be included directly in the OpenAPI spec, which can affect maintainability.