Skip to content

Conversation

@refractalize
Copy link
Contributor

Hide deprecated properties in schema examples

Motivation and Context

Showing deprecated properties in examples gives false impression that they are still current and should be used. This PR hides deprecated properties from examples shown in the UI, so new users are less likely to use deprecated properties by copy/pasting examples, or by using the examples as a form of ad-hoc documentation.

How Has This Been Tested?

Deprecated a property, verified that it does not appear in the example section of a POST request body.

Screenshots (if appropriate):

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.

@shockey shockey requested a review from webron July 27, 2018 00:44
@refractalize refractalize force-pushed the hide-deprecated-fields-in-examples branch from 99acf83 to af06caa Compare August 15, 2018 08:04
@refractalize
Copy link
Contributor Author

hi guys - i removed the dist/* stuff to resolve conflicts.

@shockey
Copy link
Contributor

shockey commented Aug 18, 2018

ping @webron

@webron
Copy link
Contributor

webron commented Aug 20, 2018

@refractalize Thanks for the PR (and apologies for the delay)! It makes perfect sense and should be a good update for the project.

@shockey shockey merged commit 9a9cfdf into swagger-api:master Aug 20, 2018
@shockey
Copy link
Contributor

shockey commented Aug 20, 2018

thanks @refractalize!

@refractalize
Copy link
Contributor Author

thanks @shockey + @webron!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants