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

Elaborate things that would be ideal from a schema and which schemas have them #3

Open
plocket opened this issue Oct 7, 2023 · 2 comments

Comments

@plocket
Copy link
Owner

plocket commented Oct 7, 2023

Description of the feature / enhancement.

Need JSON Schema
Only allow certain siblings
Exclude certain siblings (so we don't have to list all the props as allowed props)
Require certain siblings
Allow "continue button field" to be alone sometimes, but also with other props sometimes
Only allow certain pre-defined values
questions sometimes can just have buttons and sometimes it needs more (e.g. exit needs something more to trigger the screen) probably
Specify a type of string, like mako, python, var names, etc. See comments

Are you making a PR for this?

Yes, I will create a PR.

@plocket
Copy link
Owner Author

plocket commented Oct 13, 2023

[I'm currently using draft-07.] In JSON Schema draft 2019-09, they add "content schemas" that may help us with python and such. I'm unclear on whether their content can be customized or is limited to certain values

@plocket
Copy link
Owner Author

plocket commented Oct 15, 2023

Draft 2020-12 has "content" that includes contentEncoding, contentMediaType, and contentSchema. It's a little hard to tell what values those are allowed to have.

Edit:
More resources have links to a more readable list that seems to include programming languages. It has javascript, css, and markdown, but I don't see mako or python. This may just be a limited list, though, and the spec may be broader than this.

.py as a MIME type: text/x-script.phyton.

No character set name other than those defined above may be used in
Internet mail without the publication of a formal specification and
its registration with IANA, or by private agreement, in which case
the character set name must begin with "X-".

- RFC2046

It looks like mako (templates) is a python template engine. I don't know if that means it's a python lib, its own filetype/MIME type, or what. Some feedback:

Mako is a language used in another file type, not a file type itself


Some drafts have the format keyword, where you can sometimes specify custom formats, though the ones I see supported for 2020-12 wouldn't be enough for us.

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

No branches or pull requests

1 participant