Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

1.1.48 patch release introduced a breaking change #862

Open
lbeschastny opened this issue May 27, 2019 · 2 comments
Open

1.1.48 patch release introduced a breaking change #862

lbeschastny opened this issue May 27, 2019 · 2 comments

Comments

@lbeschastny
Copy link

lbeschastny commented May 27, 2019

In 1.1.48 you've updated raml-definition-system package, which resulted in a breaking change.

Before 1.1.48 the following Draft 4 schema was considered valid:

{
	"type": "object",
	"properties": {
		"example": {
			"type": "string"
		}
	},
	"required": ["example"]
}

But since 1.1.48 all schemas without $schema property are assumed to be in Draft 3, which result in the following parser error when used with rejectOnErrors: true:

{
    "code": "REQUIRED_MUST_BE_BOOLEAN_IN_DRAFT_3",
    "message": "Draft 3 schema must have boolean as 'required' property value"
}

Related to raml-org/raml-typesystem#113

@JoshLitt
Copy link

JoshLitt commented Jun 7, 2019

Additionally, specifying draft-07 schema results in being treated like draft 3 and having complaints about "required" being non-boolean (though only in some uses of "required").

@postatum
Copy link
Contributor

postatum commented Sep 25, 2019

Note that raml-js-parser-2 has been deprecated, the new official parser is webapi-parser. Feel free to attempt to reproduce this issue with webapi-parser and report any issue you may have on that repository.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants