website
website copied to clipboard
Format is not only allowed for string values
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 https://github.com/json-schema-org/json-schema-spec/issues/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...
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?
@embray https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#dataTypeFormat
(although note that their byte and binary formats should actually be handled wth contentEncoding)
Thank you--yes, I had seen that posted in another issue but it's good to have here too.
@benjagm can I work on this?
@Sanket-0510 Let me check if we can proceed with this one.
We should either add these changes to #326 or wait until that's merged to work on this.
@Sanket-0510 #326 is now merged. You can work on this. Thanks!
@Sanket-0510 still interested in this issue?
yes
Please go ahead @Sanket-0510 with the usage of the tags described here as used in https://github.com/json-schema-org/website/pull/326.
Hey @Sanket-0510, Are you still working on this ?
Hey @lalitkumawat1m Would love to collaborate on this with you, lets take this issue up together and collaborate?
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 @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.
@lalitkumawat1m please go ahead. See this previous comment please.
Hey @benjagm I would be collaborating with @lalitkumawat1m on this
@lalitkumawat1m are you still working on this issue?
No, I'm not working on this issue.
Thanks Lalit. I am leaving this issue available for other contributors as there has been no progress in weeks.
Hey There @benjagm. Could I take this issue up? If it's still available?
Thanks @bhavukkalra . Please go ahead!
@benjagm assign this issue to me
We are making this issue available to other contributors due to inactivity.
Hii @benjagm I hope you are doing well , I am Jagpreet Singh , am understand this issue , can u assign me if someone are not able to resolve yet.
@jagpreetrahi thanks for your interest. Please go ahead.
i want to work on this issue,kindly assign me this issue @benjagm
What's the difference between this and #963, which doesn't seem to have an issue listed?
I think this is already being worked.