Skip to content
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

Adding autocomplete to params using x-data-threescale-name field #1991

Merged
merged 3 commits into from
Jun 26, 2020

Conversation

damianpm
Copy link
Contributor

@damianpm damianpm commented Jun 25, 2020

What this PR does / why we need it:

Implements autocomplete of API keys, using the x-data-threescale-name field (see docs)
This PR is a continuation of the job started in #1935, later reverted in #1989

Which issue(s) this PR fixes

https://issues.redhat.com/browse/THREESCALE-4857

Verification steps

  • Go to a Service's active docs section: apiconfig/services/2/api_docs
  • Create a new OAS v3 using the x-data-threescale-name fields, as described here. You can use this example
  • Add a new page or replace the default Documentation page with the following snippet (see docs):
{% content_for javascripts %}
    {{ 'active_docs.js' | javascript_include_tag }}
{% endcontent_for %}

<h1>Documentation</h1>

<div class="swagger-section">
  <div id="message-bar" class="swagger-ui-wrap">&nbsp;</div>
  <div id="swagger-ui-container" class="swagger-ui-wrap"></div>
</div>

<script type="text/javascript">
  (function () {
    var url = "{{provider.api_specs.first.url}}";

    SwaggerUI({ url: url, dom_id: "#swagger-ui-container" });
  }());
</script>

Special notes for your reviewer:

To switch from user_key to app_id / app_key, authentication, go to the edit integration settings page (/apiconfig/services/2/integration) and select an authentication method:
edit-settings


Admin Portal:

admin-user-key


admin-app-id


Developer Portal:

developer-user-key


developer-app-id

@damianpm damianpm force-pushed the THREESCALE-4212-OAS-ActiveDocs_features-C branch 2 times, most recently from ad101eb to a1f7e4f Compare June 25, 2020 13:18
@damianpm damianpm marked this pull request as ready for review June 25, 2020 13:36
@damianpm damianpm force-pushed the THREESCALE-4212-OAS-ActiveDocs_features-C branch from a1f7e4f to f8714c8 Compare June 25, 2020 14:37
@damianpm damianpm force-pushed the THREESCALE-4212-OAS-ActiveDocs_features-C branch from f8714c8 to b5e600e Compare June 25, 2020 15:17
@damianpm damianpm force-pushed the THREESCALE-4212-OAS-ActiveDocs_features-C branch from b5e600e to 623017c Compare June 25, 2020 15:38
@damianpm damianpm force-pushed the THREESCALE-4212-OAS-ActiveDocs_features-C branch 2 times, most recently from 3b03f5a to f203b83 Compare June 26, 2020 07:57
app/javascript/packs/active_docs.js Outdated Show resolved Hide resolved
app/javascript/src/Types/SwaggerTypes.jsx Outdated Show resolved Hide resolved
spec/javascripts/ActiveDocs/ActiveDocsSpec.spec.jsx Outdated Show resolved Hide resolved
spec/javascripts/ActiveDocs/ActiveDocsSpec.spec.jsx Outdated Show resolved Hide resolved
@damianpm damianpm force-pushed the THREESCALE-4212-OAS-ActiveDocs_features-C branch from f203b83 to 8813ab5 Compare June 26, 2020 09:28
Copy link
Contributor

@josemigallas josemigallas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Copy link
Member

@didierofrivia didierofrivia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎖️

@damianpm damianpm merged commit 7e3795e into master Jun 26, 2020
@josemigallas josemigallas deleted the THREESCALE-4212-OAS-ActiveDocs_features-C branch June 26, 2020 17:37
@damianpm damianpm added the javascript Pull requests that update Javascript code label Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants