Skip to content

Conversation

@shelbys
Copy link
Contributor

@shelbys shelbys commented Oct 19, 2020

If you appreciate this contribution, please add a hacktoberfest-accepted Label to the PR, so it'll be tracked

Description

Add same ability to show x- extensions for Response objects, just like already supported for Operations, Parameters, and Schemas

Motivation and Context

We actively use x- extensions on Response objects to better detail individual cases, but they're currently not shown in `swagger-ui

How Has This Been Tested?

I manually verified locally with changes to PetStore, but didn't find any automated tests to extend. Let me know if I missed anything

Checklist

My PR contains...

  • No code changes (src/ is unmodified: changes to documentation, CI, metadata, etc.)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fixes (non-breaking change which fixes an issue)
  • Improvements (misc. changes to existing features)
  • Features (non-breaking change which adds functionality)

My changes...

  • are breaking changes to a public API (config options, System API, major UI change, etc).
  • are breaking changes to a private API (Redux, component props, utility functions, etc.).
  • are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).
  • are not breaking changes.

Documentation

  • My changes do not require a change to the project documentation.
  • My changes require a change to the project documentation.
  • If yes to above: I have updated the documentation accordingly.

Automated tests

  • My changes can not or do not need to be tested.
  • My changes can and should be tested by unit and/or integration tests.
  • If yes to above: I have added tests to cover my changes.
  • If yes to above: I have taken care to cover edge cases in my tests.
  • All new and existing tests passed.

@shelbys shelbys changed the title Added support for showExtensions on Response objects Add support for showExtensions on Response objects Oct 19, 2020
@tim-lai
Copy link
Contributor

tim-lai commented Oct 20, 2020

@shelbys Thanks for the PR! Functionally looks good. However, it should come with new tests 1) where using x- extension does in fact render, and 2) where not using x- extension does not render the Response Extension component.

@shelbys shelbys requested a review from tim-lai October 21, 2020 03:34
* upstream/master:
  housekeeping(dev-deps): nightwatch@1.5.0
  fix(auth): Allow PKCE for legacy AccessCode OAuth2 Grant Type (swagger-api#6011)
  housekeeping(dev-deps): mini-css-extract-plugin@1.1.1
  chore(deps): bump ua-parser-js to v0.7.22 (swagger-api#6539)
  housekeeping(dev-deps): eslint-plugin-react@7.21.5
@shelbys
Copy link
Contributor Author

shelbys commented Oct 21, 2020

@tim-lai - Renamed to ResponseExtension, and tests added

@tim-lai tim-lai merged commit 6a4e52a into swagger-api:master Oct 22, 2020
@tim-lai
Copy link
Contributor

tim-lai commented Oct 22, 2020

@shelbys Merged! Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants