asyncapi / studio

Visually design your AsyncAPI files and event-driven architecture.
https://studio.asyncapi.com
Apache License 2.0
154 stars 96 forks source link

Date values don't need quotes #1119

Open ccudennec-otto opened 1 week ago

ccudennec-otto commented 1 week ago

Describe the bug

My schema contains a string property with format "date":

       - type: "object"
          properties:
            appointmentDate:
              type: "string"
              format: "date"

The file also contains an example for this property:

examples:
- appointmentDate: 2015-07-20

If the value is not quoted, I can see the following error in the "Diagnostics" section of https://studio.asyncapi.com/

"appointmentDate" property must match format "date"

If I read the YAML specification correctly, the above value does not need quotes to be interpreted as a valid string.

How to Reproduce

Described above.

Expected behavior

I don't see an error if the value is not quoted.

For your information: I've also created an issue in the library that I use the generate the asyncapi.yaml to go around this: https://github.com/springwolf/springwolf-core/issues/820

But in general IMHO the core issue is that AsyncAPI Studio should not mark unquoted values as error.

github-actions[bot] commented 1 week ago

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.