-
Feature Request
-
Resolution: Done
-
Major
-
None
-
False
-
False
-
-
-
2022 Week 23-25 (from Jun 6), 2022 Week 26-28 (from Jun 27)
In a sw.yaml when we specify a url for the OpenAPI spec, the url is used to determine the value needed to be used when specifying the security values for that services in the application.properties. So if we have a URL such as:
https://raw.githubusercontent.com/fredsmith/sampleOpenAPISpec/main/customer.yaml#retrieveCustomerDetails
https://raw.githubusercontent.com/fredsmith/sampleOpenAPISpec/main/customer.yaml#retrieveCustomerDetails
then the id that is used in the properties is determined from the `customer.yaml` part and is `customer`, so the properties would be:
org.kogito.openapi.client.customer.username=<username> org.kogito.openapi.client.customer.password=<password>
so if we have a URL that doesn't point to an actual file but invokes a service which returns the OpenAPI spec, such as:
https://my.remote.host/apicatalog/apis/{apiID}/document#myOperation
or
https://my.remote.host/apicatalog/apis/{apiName}/{apiVersion}/document#myOperation
The value that needs to be used in the properties in the application.properties will be `document` {}(based on how the value is determined for the other URLs ) . This will cause issues in being able to specify auth details for the different OpenAPI specs as they will all return the same value `document`.
We need a different method to determine the value that should be used in the application.properties for each of the OpenAPI requests.
A suggestion was to use the `info.title` from the OpenAPI document (https://swagger.io/specification/#info-object).
The usage of this alternate method could be made configurable via something in the application.properties, such as:
org.kogito.openapi.gen.useTitleAsId=true
- blocks
-
KOGITO-6998 [KSW-Guides] Instruct how to have different endpoint configuration profiles for OpenAPI calls
- Resolved
- incorporates
-
KOGITO-7446 Inform the user about missing or incorrect configuration property
- Closed