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

Unit tests for JSON Schema of CSDL JSON #51

Merged
merged 2 commits into from Dec 16, 2021
Merged

Unit tests for JSON Schema of CSDL JSON #51

merged 2 commits into from Dec 16, 2021

Conversation

ralfhandl
Copy link
Contributor

@ralfhandl ralfhandl commented Dec 13, 2021

Schema changes:

  • added schemas for SimpleIdentifier and QualifiedName and used them where appropriate
  • used "simple identifier" pattern for schema children, structured type properties, enum members, and container children
  • used "qualified name" pattern for schema names
  • made $Version required on document root
  • fixed a spelling error

Cleanup

  • run test workflow only with Node 16.x
  • recommend code spell checker extension
  • add some words to the cspell dictionary
  • depend on AJV directly, no longer on AJV CLI and thus indirectly on AJV
  • removed use of AJV CLI
  • added unit tests for csdl.schema.json using AJV

Copy link
Contributor

@HeikoTheissen HeikoTheissen left a comment

Choose a reason for hiding this comment

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

Perhaps add test cases for valid/invalid identifiers?

schemas/csdl.schema.json Outdated Show resolved Hide resolved
@ralfhandl
Copy link
Contributor Author

Perhaps add test cases for valid/invalid identifiers?

Already there:

  • invalid schema name
  • invalid schema child name
  • invalid property name (entity type)
  • invalid property type name

Added:

  • invalid property name (complex type)
  • invalid enumeration member name
  • invalid action parameter name
  • invalid function parameter name

schemas/csdl.schema.json Show resolved Hide resolved
schemas/csdl.schema.json Show resolved Hide resolved
Copy link
Contributor

@HeikoTheissen HeikoTheissen left a comment

Choose a reason for hiding this comment

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

Found an error in Org.OData.Capabilities.V1.permissions-sample.xml.

@ralfhandl
Copy link
Contributor Author

Found an error in Org.OData.Capabilities.V1.permissions-sample.xml.

We fixed that with oasis-tcs/odata-vocabularies#170

@ralfhandl ralfhandl merged commit 5d60e4b into main Dec 16, 2021
@ralfhandl ralfhandl deleted the test-json-schema branch December 16, 2021 16:48
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

Successfully merging this pull request may close these issues.

None yet

2 participants