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

Support additionalProperties with subschema #611

Merged
merged 1 commit into from
Feb 23, 2021

Conversation

kylef
Copy link
Member

@kylef kylef commented Feb 23, 2021

I'd suggest reviewing the tests first, they show the interactions with required which may be clearer when reading tests than the code.

@kylef kylef added the openapi2 label Feb 23, 2021
@kylef kylef requested a review from opichals February 23, 2021 15:52

expect(dataStructure.content.length).to.equal(1);

const member = dataStructure.content.getMember('');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typically, the key of the member is a "sample" key, but we don't really have one so I have used an empty string.

Note this structure is equivalent to API Blueprint, except the key name where API Blueprint provides a sample name.

+ Response 200 (application/json)
    + Attributes (fixed-type)
        + *name* (string)

Copy link
Contributor

@opichals opichals left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kylef kylef merged commit f4d25cd into master Feb 23, 2021
@kylef kylef deleted the kylef/oas2-additionalProperties-schema branch February 23, 2021 19:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants