-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Autocomplete of OAS3 with 3scale account data #1935
Conversation
Could you point this to master in order to see all the changes? |
@didierofrivia |
@josemigallas @didierofrivia |
It looks simpler and better |
I think this is the right path to follow, you can close #1863 if you want 👍 |
c9ffdd1
to
c57cecc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a final minor comment, but the most important thing is that it matches the current behaviour 100%. If that's the case, it's good to go!
4b19b5a
to
8d3a4ef
Compare
8d3a4ef
to
0acec6a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squash the commits before merging.
@damianpm be carefull to reference the correct jira in branch name. as now parent issue was moved to ready for testing |
What this PR does / why we need it:
Implements autocomplete of OAS 3 using 3scale account data
Which issue(s) this PR fixes
https://issues.redhat.com/browse/THREESCALE-4857
Notes
This PR is an alternative to #1863
#1863 uses the plugins system of swagger ui to wrap and modify the components.
This PR uses a different approach: intercepts the response, injects the data to autocomplete and leaves swagger-ui do the rendering.
See
responseInterceptor
in https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/PROS:
CONS:
I don't think it's a great problem, as we are autocompleting only the parameters using 3scale acccount data (from
/p/admin/api_docs/account_data.json
endpoint.).Steps to reproduce
Documentation
shared/swagger_ui:
Replace the
<script></script>
section at the end of the document with: