Get x-jentic-source-url from meta.json no longer keeping a copy of openapi.json already available in public repo?
#4
jfoliveira
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Currently a copy of the OpenAPI spec is maintained in this repo for each API integrated into Jentic's OAK.
For example, for devopness.com/main we have the following file structure:
Problem to be solved
Prevent maintenance work for API vendor's team and Jentic's team to keep copy of
openapi.jsonupdated every time vendors update their OpenAPI specPremises and assumptions
x-jentic-source-urlpoints to a raw copy of the spec in a GitHub repo, which can be an API vendor's own repository (as in the case for Devopness) or Jentic's repository (in case the OpenAPI spec is not public and a copy need to be maintained on Jentic's OAK)Suggestions
meta.jsoncould include a new attribute (candidate names:source_url,spec_url, ...) with a link to the OpenAPI spec raw contentopenapi.jsonwould no longer need to be updated every time vendors update their APIsopenapi.jsonneeds to be maintained - for not having a public copy available - there will no need to keep a modified copy ofopenapi.jsonto include thex-jentic-source-urlinfo tagx-jentic-source-urlfrommeta.json > source_urlExample of
meta.jsonfiles that could benefit from this approachDevopness.com
Current definition in
openapi.json: https://github.com/jentic/oak/blob/main/apis/openapi/devopness.com/main/1.0.0/openapi.json#L10Suggested
meta.json{ "oak_meta": "1.0.0", "api_info": { "id": "69642cfcc6251751dd35efbb0be3b87d", "format": "openapi", "vendor": "devopness.com", "api_name": "main", "friendly_id": "devopness.com", "source_url": "https://raw.githubusercontent.com/devopness/devopness/refs/heads/main/packages/sdks/javascript/src/api/spec.json" } }Google.com
Current definition in
openapi.json: https://github.com/jentic/oak/blob/main/apis/openapi/google.com/main/v3/openapi.json#L16Suggested
meta.json{ "oak_meta": "1.0.0", "api_info": { "id": "a870c473bfaa36bb3e0c4f74c3ab82c5", "format": "openapi", "vendor": "google.com", "api_name": "main", "friendly_id": "google.com", "source_url": "https://travelpartner.googleapis.com/$discovery/rest?version=v3" } }Thoughts?
All reactions