stoplightio / spectral

A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v3.1, v3.0, and v2.0 as well as AsyncAPI v2.x.
https://stoplight.io/spectral
Apache License 2.0
2.43k stars 235 forks source link

AsyncAPI - Add rule to check object keys in fixed fields #2503

Open Amzani opened 1 year ago

Amzani commented 1 year ago

Chore summary

As a user I want to know if all the fixed fields are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9.-_]+$

https://www.asyncapi.com/docs/reference/specification/v2.6.0#componentsObject

Currently spectral trigger only an asyncapi-document-unresolved error

Example of an invalid asyncAPI file: https://gist.github.com/Amzani/7df1d67d7eb665bdc7a2a5dd7e794e0c

Tasks

Additional context