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

Drafter allows duplicate attribute and generates JSON Schema with duplicate required fields #493

Closed
honzajavorek opened this issue Aug 7, 2017 · 0 comments
Assignees
Labels

Comments

@honzajavorek
Copy link
Contributor

honzajavorek commented Aug 7, 2017

Following document

# Data Structures

## Struct (object)
+ field (required)
+ field (required)

# test [GET /]

+ Response 200 (application/json)
    + Attributes (object)
        + data (required, array[Struct], fixed-type)

will result in no user warning and in JSON Schema with "required": ["field", "field"]. I think this situation (basically user typo) should be handled more gracefully on parser level. See apiaryio/dredd#840 reported by @basavind for more details.

@kylef kylef added the bug label Aug 7, 2017
@tjanc tjanc self-assigned this Aug 10, 2017
@tjanc tjanc closed this as completed in efbfedc Sep 26, 2017
tjanc added a commit that referenced this issue Sep 26, 2017
Fix #493 repeated item in JSON schema required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants