Skip to content

Use Cases and Requirements document #1369

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

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

awwright
Copy link
Member

@awwright awwright commented Dec 16, 2022

This is a document I've been working on for a little bit that I think would be very relevant to some of the discussion right now.

We're trying to figure out what parts of the specification are "stable," but (IMO) stability is something that you determine with respect to a particular use case. An example I pointed out earlier, if I publish a GPU-intensive program that stops being effective as a space heater because I improved the algorithm, too bad for you because it was never "stable" for home heating purposes, only cat detection purposes (or whatever).

This document would describe the use cases that we actually intend to support; when we make changes to the specification, we can point to this document and say "this feature in Use Cases would break if we made this change." Or we can make a change and point at this to say "yes, the change breaks cat detection, but JSON Schema was never intended to perform image analysis."

Here's a PDF rendering (note how it's not a "draft"): jsonschema-use-cases.pdf

While it currently specifies applications as "Use Cases," a "Requirements" section would be expanded to actually list the particular methods that implement each use case.

@Relequestual
Copy link
Member

This is actually super useful, so thanks.
I think there are a few things missing...

  • Code generation, specifically "models" or classes, which is a really common use case, and "types" for typed languages
  • UI generation, mostly generating forms or other UI elements, which are pretty common. (Some impelementations have larger followings than we do... at least I think)
  • Documentation generation - I've seen at least 3 articles talk about JSON Schema primerily for generating documentation. I don't see that covered in your doc

Given how frequently I see these things, I'd expect them to be explicitly called out.


You mention database constraints in section 3.7. Can you explain why this is in section 3 as opposed to a note in section 4, aka a use case for extensions.

Given this work, maybe you could propose a short bulleted list of what's "in scope" for our charter work?
👉 json-schema-org/community#286 (comment)

Copy link
Member

@gregsdennis gregsdennis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I question the need for this document. The use cases that @Relequestual mentioned exist as a result of not explicitly listing use cases. I fear that explicitly listing use cases will hinder our users' creativity as they will see that their need doesn't fit within the scope of the project and they'll go find another solution.

Furthermore, some of these are not areas that we have, in the past, officially supported. By declaring them, you are changing our stance on that. While I agree that we should start supporting some of these, I don't know that we have the expertise or personnel required to do so to the degree that declaring "officially supported use cases" would necessitate.

Personally, I think data validation and annotation should remain our focus, and we should isntead encourage others to devise new use cases and join our community in order to support and spread knowledge of their ideas.

@awwright
Copy link
Member Author

I updated the PDF rendering: jsonschema-use-cases.pdf

Copy link
Member

@gregsdennis gregsdennis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just some minor nits.

@awwright awwright merged commit 4089b1e into json-schema-org:main Mar 27, 2023
@awwright awwright deleted the use-cases branch March 27, 2023 00:32
@awwright awwright restored the use-cases branch March 27, 2023 01:13
@awwright awwright deleted the use-cases branch March 27, 2023 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants