bcgov / DBC-APIM

DataBC OPEN API Services
Apache License 2.0
1 stars 0 forks source link

OpenAPI specs - Server #59

Open BK01 opened 7 years ago

BK01 commented 7 years ago

For the Geocoder OpenAPI spec investigate ability to use the server parameter to specify the environment.

servers:- [ { url: "https://apps...." }, { url: "https://test..." }, { url: "http://delivery...." } ],

BK01 commented 6 years ago

Applied to the Geocoder spec which combines the pub and gated endpoint. Can't be tested until swagger-ui is updated to support OpenAPI 3.x.

BK01 commented 6 years ago

UAT in cad.data

BK01 commented 6 years ago

Initial scope adjusted to create a hybrid spec allowing user to toggle between the gated and public geocoder. Functionality now proven to be successful.

BK01 commented 6 years ago

@banders UAT results:

Test 1: Geomark - DLV/TEST/PROD - Successful rotation between environments

Test 2: Geocoder - PUB PROD - OK

BK01 commented 6 years ago

@banders Is it possible to action the 'unset API key' code based on the environment / server selected? If not, we may just need to document the workflow. Manually clicking this seemed to resolve it. Alternatively, we can document the behaviour in our guidance materials.

banders commented 6 years ago

@BK01 Were you using the "combined" spec for testing the Geocoder?

BK01 commented 6 years ago

@banders Yes

banders commented 6 years ago

@BK01 I think it might require changes that are very API-specific if we want to unset the API key based on the selected server. That might not be a good idea for the long-term maintainability of our code. Are you getting any errors by submitting the (unnecessary) API key to the public geocoder? If not, in my opinion it is only a very minor quirk that we should document in the combined Geocoder spec, but should otherwise not worry about.

Thoughts?

BK01 commented 6 years ago

Agreed, DataBC to document issue for this specific api spec