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

Date values don't need quotes #1119

Closed
ccudennec-otto opened this issue Jun 27, 2024 · 6 comments
Closed

Date values don't need quotes #1119

ccudennec-otto opened this issue Jun 27, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@ccudennec-otto
Copy link

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: springwolf/springwolf-core#820

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

@ccudennec-otto ccudennec-otto added the bug Something isn't working label Jun 27, 2024
Copy link

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.

@kamal9580
Copy link

hey @ccudennec-otto , i wanted to solve this issue but i am unable to find the designated file folder for the same .
could you please guide for it?

@ccudennec-otto
Copy link
Author

Hi @kamal9580! Which link/file are you looking for? I've double checked the links in the description but they all seem to work. I did not attach an example file. Is that what you mean?

@ccudennec-otto
Copy link
Author

Is this issue fixed by #1124 ?

@aeworxet
Copy link
Contributor

Validation of type date was fixed in both studio and studio-next.

image

@ccudennec-otto
Copy link
Author

Great! I've just tested my example and it also works! 🥳
I'll close the issue. 🌻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants