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

Format is not only allowed for string values #187

Open
m-mohr opened this issue Jul 9, 2019 · 22 comments · May be fixed by #664
Open

Format is not only allowed for string values #187

m-mohr opened this issue Jul 9, 2019 · 22 comments · May be fixed by #664
Assignees
Labels
📝 Documentation Indicates improvements or additions to documentation. good first issue Good for newcomers Status: In Progress This issue is being worked on, and has someone assigned.

Comments

@m-mohr
Copy link

m-mohr commented Jul 9, 2019

At https://json-schema.org/understanding-json-schema/reference/string.html#format it says:

The format keyword allows for basic semantic validation on certain kinds of string values that are commonly used.

As discussed in issue json-schema-org/json-schema-spec#759, format is also defined for non-string types. Therefore, the description should be made more general and moved to another place as it doesn't really fit where it is now. I guess it's better placed at the end of https://json-schema.org/understanding-json-schema/reference/type.html or so...

@embray
Copy link

embray commented Jul 24, 2019

On one hand, the wording "[the] format keyword allows for basic semantic validation on certain kinds of string values", does not explicitly imply that it can't also be used with other types of values. On the other hand, the fact that the documentation for format only appears alongside reference for the "string" type gives the false impression that it's uniquely for use with strings.

It's also true that the only value for format that are explicitly defined by the spec apply only to string instances, so it still might be helpful to have documentation on pre-defined formats that apply only to strings in the string documentation where it already is; however, more general documentation on "format", and custom formats, could belong elsewhere as you suggest.

Is there a good, real-world example you could point to, of using "format" with another instance type? Maybe the "int32", "int64", etc. example?

@handrews
Copy link

@embray https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#dataTypeFormat

@handrews
Copy link

(although note that their byte and binary formats should actually be handled wth contentEncoding)

@embray
Copy link

embray commented Jul 25, 2019

Thank you--yes, I had seen that posted in another issue but it's good to have here too.

@benjagm benjagm transferred this issue from json-schema-org/understanding-json-schema Nov 2, 2023
@benjagm benjagm added 📝 Documentation Indicates improvements or additions to documentation. good first issue Good for newcomers labels Nov 23, 2023
@benjagm benjagm added the Status: Available No one has claimed responsibility for resolving this issue. label Feb 20, 2024
@Sanket-0510
Copy link
Contributor

@benjagm can I work on this?

@benjagm
Copy link
Collaborator

benjagm commented Feb 25, 2024

@Sanket-0510 Let me check if we can proceed with this one.

@gregsdennis
Copy link
Member

We should either add these changes to #326 or wait until that's merged to work on this.

@benjagm
Copy link
Collaborator

benjagm commented Feb 26, 2024

@Sanket-0510 #326 is now merged. You can work on this. Thanks!

@benjagm benjagm added Status: In Progress This issue is being worked on, and has someone assigned. and removed agenda To be added to the next Community Meeting Status: Available No one has claimed responsibility for resolving this issue. labels Feb 26, 2024
@benjagm
Copy link
Collaborator

benjagm commented Mar 2, 2024

@Sanket-0510 still interested in this issue?

@Sanket-0510
Copy link
Contributor

yes

@benjagm
Copy link
Collaborator

benjagm commented Mar 6, 2024

Please go ahead @Sanket-0510 with the usage of the tags described here as used in #326.

@lalitkumawat1m
Copy link
Contributor

Hey @Sanket-0510,
Are you still working on this ?

@Kavisha4
Copy link

Hey @lalitkumawat1m Would love to collaborate on this with you, lets take this issue up together and collaborate?

@lalitkumawat1m
Copy link
Contributor

Hey @Kavisha4 I will definitely do collaborate with you. If @benjagm allows because this issue is already assigned to @Sanket-0510. I'm not sure does he working on this or not.

@Sanket-0510
Copy link
Contributor

Hey @Kavisha4 I will definitely do collaborate with you. If @benjagm allows because this issue is already assigned to @Sanket-0510. I'm not sure does he working on this or not.

Hey @lalitkumawat1m feel free to take this issue, I have not started to work on this yet.

@benjagm
Copy link
Collaborator

benjagm commented Mar 21, 2024

@lalitkumawat1m please go ahead. See this previous comment please.

@Kavisha4
Copy link

Hey @benjagm I would be collaborating with @lalitkumawat1m on this

@benjagm
Copy link
Collaborator

benjagm commented Apr 11, 2024

@lalitkumawat1m are you still working on this issue?

@lalitkumawat1m
Copy link
Contributor

No, I'm not working on this issue.

@benjagm
Copy link
Collaborator

benjagm commented Apr 11, 2024

Thanks Lalit. I am leaving this issue available for other contributors as there has been no progress in weeks.

@benjagm benjagm added Status: Available No one has claimed responsibility for resolving this issue. and removed Status: In Progress This issue is being worked on, and has someone assigned. labels Apr 11, 2024
@bhavukkalra
Copy link
Contributor

Hey There @benjagm. Could I take this issue up? If it's still available?

@benjagm
Copy link
Collaborator

benjagm commented Apr 16, 2024

Thanks @bhavukkalra . Please go ahead!

@benjagm benjagm added Status: In Progress This issue is being worked on, and has someone assigned. and removed Status: Available No one has claimed responsibility for resolving this issue. labels Apr 16, 2024
@bhavukkalra bhavukkalra linked a pull request Apr 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📝 Documentation Indicates improvements or additions to documentation. good first issue Good for newcomers Status: In Progress This issue is being worked on, and has someone assigned.
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

9 participants