Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORDS OAUTH

uservaOct 22 2020

We have installed ords 20.2 on weblogic 12c and enabled the oauth authentication as well, all are working as expected.
Now the application team asked us to generate the swagger document and we did using the below URL. rest-v1 is the module name and it is assigned for application team to consume the data using rest api call.
accessed this url "https://xxxx.yyyy.net:9002/ords/hr/open-api-catalog/rest-v1/" in browser and saved the json output as swagger.json.
{"swagger":"2.0","info":{"title":"ORDS generated API for rest-v1","version":"1.0.0"},"host":"xxxx.yyyy.net:9002","basePath":"/ords/hr/rest-v1","schemes":["https"],"produces":["application/json"],"paths":{"/crews/{id}":{"get":{"description":"Retrieve records from rest-v1","produces":["application/json"],"responses":{"200":{"description":"The queried record.","schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"{}jsons":{"$ref":"#/definitions/VARCHAR2"}}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"type":"string","description":"implicit","pattern":"^[^/]+$"}]}},"/crews1":{"get":{"description":"Retrieve records from rest-v1","produces":["application/json"],"responses":{"200":{"description":"The queried record.","schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"{}jsons":{"$ref":"#/definitions/VARCHAR2"}}}}}}}},"parameters":[]}},"/crews1/":{"get":{"description":"Retrieve records from rest-v1","produces":["application/json"],"responses":{"200":{"description":"The queried record.","schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"{}jsons":{"$ref":"#/definitions/VARCHAR2"}}}}}}}},"parameters":[]}},"/crews1/{id}":{"get":{"description":"Retrieve records from rest-v1","produces":["application/json"],"responses":{"200":{"description":"The queried record.","schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"{}jsons":{"$ref":"#/definitions/VARCHAR2"}}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"type":"string","description":"implicit","pattern":"^[^/]+$"}]}},"/facility/":{"get":{"description":"Retrieve records from rest-v1","produces":["application/json"],"responses":{"200":{"description":"The queried record.","schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"EXTERNAL_ID":{"$ref":"#/definitions/VARCHAR2"},"ID":{"$ref":"#/definitions/NUMBER"}}}}}}}},"parameters":[]}}},"definitions":{"NUMBER":{"type":"number"},"VARCHAR2":{"type":"string"}}}
The swagger document doesn't contain any details related to oauth token url (https://xxxx.yyyy.net:9002/ords/hr/oauth/token) and details, is it possible ?
if yes, how can we generate the swagger document which includes oauth details as well.

Comments
Post Details
Added on Oct 22 2020
8 comments
830 views