Steps:
- Go to API portal -> Develop -> Create in API Designer
- Write OAS 3.0 specification and you will be able to see related documentation. The Google Book API is used for example purpose. You can use any available public API to test.
openapi: 3.0.1info:title: Google Book APIdescription: This is a sample API for calling Google Book APIversion: 1.0.0servers:- url: 'https://www.googleapis.com/books/v1'paths:/volumes:get:operationId: getBooks# CommonMark is used to change the description to italicdescription: _Get a list of Books_parameters:- name: qin: querydescription: Enter queryrequired: trueschema:type: stringresponses:'200':description: successful response
3. Now we can tryout the documentation.
5. Now if you click on TryOut and exceute, you will get 404 error as the API is not deployed yet. Now deploy the API and then click on TryOut. It should work now.
No comments:
Post a Comment