traverse/walk through Response schema
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
traverse/walk through Response schema
what library can I refer to traverse/walk through response schema of each Path?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @pradeepnr,
You need an OpenAPI/Swagger parser. There are parsers for different programming languages, check out https://openapi.tools/#parsers.
Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@HKosova, Thankyou very much for responding. I am aware of the parsers. With these parsers I will be able to parse the openAPI 3.0 doc. Is there any library that will use these parsers to traverse through the responses.
I want to traverse through the response structure to list all the attributes, sub-attributes, sub-sub-...attributes and so on.
Thanks,
Pradeep
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Parsers should have methods to get the schema for a response. Once you have the response schema you will be able to traverse its properties.
Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@HKosova Thank you for responding. Is there any library you are aware of for schema traversal?
I did find one schema walker. But it is for different draft.
Thanks,
Pradeep
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Parsers themselves most likely have classes/interfaces that represent OpenAPI Schema Object and that could be used to read schema attributes and access sub-schemas.
Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
