Skip to content

Validate field names from spec, check for special characters disallowed in rust (/, ., etc) #14

@stano45

Description

@stano45

https://github.com/asyncapi/spec-json-schemas#custom-validation-needs

If you decide to validate AsyncAPI documents only with the JSON Schema files provided in this repo, your AsyncAPI documents will not be properly validated. It's recommended to use AsyncAPI JavaScript Parser that uses the AsyncAPI JSON Schema files for validation but also implements additional custom validations.

The following additional custom validations need to be provided:

  • Variables provided in the URL property have a corresponding variable object defined and its example is correct.
  • operationIds are not duplicated in the document.
  • messageIds are not duplicated in the document.
  • Server security is declared properly and the name has a corresponding securitySchemes definition in components with the same name.
  • Server securitySchemes is an empty array when the security type requires it.
  • Parameters specified in the channel name have corresponding parameters object defined.
  • Channel names do not contain URL parameters.
  • All servers listed for a channel in the servers property are declared in the top-level servers object.
  • Tags specified in any object have no duplicates. Check must be done for: the top-level object, operations (publish and subscribe), operation traits, channels, messages, and message traits.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions