Skip to content

Conversation

@shockey
Copy link

@shockey shockey commented Apr 19, 2019

Description

Phase 3 of my schema validation improvements (phase 2: #1985).

This PR almost exclusively consists of moves from oneOf/anyOf to switch statements in the validation schema documents.

How Has This Been Tested?

New unit tests were added to ensure that error quality won't erode over time.

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 marked this pull request as ready for review April 22, 2019 20:11
@shockey shockey merged commit 2e021b5 into swagger-api:master Apr 22, 2019
shockey added a commit to shockey/swagger-editor that referenced this pull request May 23, 2019
…i#1987)

* add schema construct documentation

* `*/Reference` oneOfs -> pivot key existential switches

* 2.0 `Response.schema` oneOf -> complex switch

* `Schema.additionalProperties` oneOf -> switch

* `HTTPSecurityScheme.bearerFormat` oneOf -> switch

* 2.0 `Schema.additionalProperties` oneOf -> switch

* simplify 2.0 `Schema.items` validation
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.

1 participant