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

Dynamite: validate more types #1247

Closed
Leptopoda opened this issue Dec 7, 2023 · 2 comments · Fixed by #1980
Closed

Dynamite: validate more types #1247

Leptopoda opened this issue Dec 7, 2023 · 2 comments · Fixed by #1980
Assignees

Comments

@Leptopoda
Copy link
Member

Leptopoda commented Dec 7, 2023

Dynamite should support validating more strict types:

This can all fit nicely into: https://github.com/nextcloud/neon/blob/main/packages/dynamite/dynamite/lib/src/helpers/pattern_check.dart. We must not only consider validating these schemas inside objects but also when uses as a parameter in an operation.

@provokateurin
Copy link
Member

String enums with patterns are broken:

{
	"type": "string",
	"pattern": "^a$",
	"enum": [
		"a",
		"b"
	]
}

The pattern match method is called but the enum it is given is not the expected String.

@provokateurin
Copy link
Member

Required keys of objects are not checked to be present in the properties keys.

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

Successfully merging a pull request may close this issue.

2 participants