Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants