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

Default values and patter/length checks are not inherrited #1905

Closed
Leptopoda opened this issue Apr 11, 2024 · 1 comment · Fixed by #1945
Closed

Default values and patter/length checks are not inherrited #1905

Leptopoda opened this issue Apr 11, 2024 · 1 comment · Fixed by #1945
Assignees
Labels
bug Something isn't working package: dynamite

Comments

@Leptopoda
Copy link
Member

When generating a schema that inherits parameters from a super schema the builtvalue _initialize and _finalize hooks will not be included in the subschema.

            "SuperObject": {
                "type": "object",
                "properties": {
                    "value": {
                        "type": "string",
                        "pattern": "^[0-9]*$",
                        "minLength": 3,
                        "maxLength": 20,
                        "default": "123"
                    }
                },
                "required": [
                    "value"
                ]
            },
            "SubObject": {
                "type": "object",
                "allOf": [
                    {
                        "$ref": "#/components/schemas/SuperObject"
                    }
                ]
            }
@Leptopoda Leptopoda added bug Something isn't working package: dynamite labels Apr 11, 2024
@Leptopoda Leptopoda self-assigned this Apr 11, 2024
@provokateurin
Copy link
Member

google/built_value.dart#1310 for reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package: dynamite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants