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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ORDS Swagger

We have installed ords 20.2 on weblogic 12c and enabled the oauth2 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 oauth2 token url (https://xxxx.yyyy.net:9002/ords/hr/oauth/token) and other security details , is it possible ?
if yes, how can we generate the swagger document which includes oauth2 details.
Can someone please help me on this.

This post has been answered by Datla Avinash Varma on Nov 6 2020
Jump to Answer
Comments
Post Details
Added on Oct 23 2020
2 comments
388 views