Generate Swagger using springdoc-openapi OAS 3.0
Link to ADR(Architecture Decision Record) : Swagger using springdoc-openapi
OpenAPI 3.0 related changes
-
upgraded to latest springdoc openapi latest version 1.7.0
-
Documented the below API's with OpenAPI 3.0 Annotations (API Version 2) (DEPRECATED)
- Get the entire Catalog API
- Gets the Catalog's last modified date API
- Get all Measurements API
- Get a specific Measurement API
- Get a specific Measurement by ancestry API
- Get all Units API
- Get a specific Unit API
- Get Units by symbol API
- Get a unique Unit by Namespace,Symbol API
- Get all Units for a Measurement API
- Get all Units for a Measurement by ancestry API
- Get preferred Units for a Measurement API
- Get preferred Units for a Measurement by ancestry API
- Get a unique Unit for the given Measurement in the named UnitSystem API
- Get a unique Unit for the given Measurement ancestry in the named UnitSystem API
- Get ScaleOffset Unit conversion parameters given two Units API
- Get Abcd Unit conversion parameters given two Units API
- Get ScaleOffset Unit conversion parameters given two unit specifications API
- Get Abcd Unit conversion parameters given two Unit specifications API
- Get all UnitSystem info API
- Get all Units assigned to the UnitSystem API
- Get all Units assigned to the UnitSystem name API
- Search Units by keyword(s) API
- Search Measurements by keyword(s) API
- Search Catalog by keyword(s) API
- Get Unit maps between namespaces API
- Get the Measurement maps between namespaces API
- Get the map and/or deprecation states API
-
Documented the below API's with OpenAPI 3.0 Annotations (API Version 3)
- HealthCheck API
- Info API
- getCatalog
- getLastModified
- getMeasurements
- postMeasurement
- getMeasurements
- getUnits
- postUnit
- getUnitsBySymbol
- getUnitBySymbol
- getUnitsByMeasurement
- postUnitsByMeasurement
- postPreferredUnitsByMeasurement
- getPreferredUnitsByMeasurement
- postUnitBySystemAndMeasurement
- getUnitBySystemAndMeasurement
- getConversionScaleOffsetBySymbols
- postConversionABCD
- postConversionScaleOffset
- getUnitSystemInfoList
- postUnitSystem
- getUnitBySystemAndMeasurement
- postSearchUnits
- postSearchMeasurements
- postSearch
- getUnitMaps
- getMeasurementMaps
- getUnitMaps
-
Added the standard HTTP Response(4xx, 5x****x) for API Responses
-
Custom Path for
- Swagger UI: https://host/context-path/swagger (will redirect to https://host/context-path/swagger-ui/index.html)
- api-docs (JSON) : https://host/context-path/api-docs
- api-docs (YAML) : https://host/context-path/api-docs.yaml
-
Multi Versions API:
- Swagger UI: https://host/context-path/swagger (drop down menu for each version) redirects: (https://host/context-path/swagger-ui/index.html?urls.primaryName=version)
- api-docs (JSON) : https://host/context-path/api-docs/version (v2 | v3)
-
Azure Swagger GLAB(for Reference)
- Swagger UI: https://osdu-glab.msft-osdu-test.org/api/unit/swagger (will redirect to https://osdu-glab.msft-osdu-test.org/api/unit/swagger-ui/index.html)
- api-docs [All Versions] (JSON) : https://osdu-glab.msft-osdu-test.org/api/unit/api-docs
- api-docs [All versions] (YAML) :https://osdu-glab.msft-osdu-test.org/api/unit/api-docs.yaml
- api-docs [Version V2] (JSON) : https://osdu-glab.msft-osdu-test.org/api/unit/api-docs/v2
- api-docs [Version V3] (JSON) : https://osdu-glab.msft-osdu-test.org/api/unit/api-docs/v3
-
Other Changes
- Configurable descriptions managed in swagger.properties
- Deleted HomeController and SpringfoxSwaggerHostResolver
Edited by Jayesh Bagul