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

Deeper arrays are not being validated #377

Closed
Khanon opened this issue Oct 21, 2022 · 1 comment
Closed

Deeper arrays are not being validated #377

Khanon opened this issue Oct 21, 2022 · 1 comment

Comments

@Khanon
Copy link

Khanon commented Oct 21, 2022

Hello, second level arrays are not being validated:

Schema:

{
      type: 'object',
      required: ['id', 'name', 'richText', 'plainText', 'parameters', 'attachments'],
      properties: {
        id: { type: 'number' },
        name: { type: 'string' },
        richText: { type: 'string' },
        plainText: { type: 'string' },
        parameters: {
          type: 'array',
          items: {
            type: 'object',
            required: ['label', 'type'],
            properties: {
              label: { type: 'string' },
              type: { type: 'string' },
            }
          }
        },
        attachments: {
          type: 'array',
          items: {
            type: 'object',
            required: ['codeMappingKey', 'fileName', 'contentType', 'blob'],
            properties: {
              codeMappingKey: { type: 'string' },
              fileName: { type: 'string' },
              contentType: { type: 'string' },
              blob: { type: 'string' }
            }
          }
        }
      }
    }

parameters and attachments arrays data types and requirements are not being validated, no error is thrown.

@Khanon Khanon closed this as completed Oct 21, 2022
@Khanon
Copy link
Author

Khanon commented Oct 21, 2022

Sorry it was a mistake in my json. I don't find the way to remove the issue.

@Khanon Khanon closed this as not planned Won't fix, can't repro, duplicate, stale Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant