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

http://json.schemastore.org/template is out of date #1980

Closed
mrlacey opened this issue Dec 16, 2021 · 5 comments
Closed

http://json.schemastore.org/template is out of date #1980

mrlacey opened this issue Dec 16, 2021 · 5 comments

Comments

@mrlacey
Copy link

mrlacey commented Dec 16, 2021

Description of the JSON schema.

This is the schema used for .NET Templating Engine (template.json) files, but is out of date and is not reflective of the latest version of the library that consumes it. (6.0.100)

Supporting information.

The underlying engine deprecated some properties in favor of new/different ones but these aren't reflected in the schema, even though it has subsequently been updated to support new fields available from .NET 6.

I'd be happy to create and upload a new version of the schema but I'm not clear how a new version should be numbered. Should it just be a "v2" or something else? It feels like "v6" might be more appropriate but it's possible to use the existing schema version with v6 of the templating libraries. Also, without any process to keep the libraries and schema versions in sync going forward, any version numbering pattern I choose could easily end up causing potential confusion in the future.

What to do?

Are you making a PR for this?

Yes, I will create a PR.

@madskristensen
Copy link
Contributor

/cc @sayedihashimi

@sayedihashimi
Copy link

@vlada-shubina @baronfel can you provide some guidance on how the schema for template.json should be updated? It sounds like @mrlacey is willing to help with a PR, but needs some info on how it should be approached.

@baronfel
Copy link
Contributor

I agree that versioning should be taken into account, and based on what's in this repo it could look like this:

  • we can't break existing consumers of the schema url, so the 'latest' version of the schema should be the template.json file.
  • as versions rotate out, files of the form template-<VERSION>.json should be created.

Examples of versioning in this repo already include

Ansible roles:
image

Various Azure schemas:
image

No one is currently doing versioning with latest/backwards compatibility as I proposed above, but I really don't want to lose the version-less json schema, as that breaks existing users.

What do y'all think?

@vlada-shubina
Copy link
Contributor

We do have an item on this dotnet/templating#2594, but it didn't make it to .NET 6 due to low priority. Original idea for versioning were to make versions per release (including feature band releases), however skip schema version in case of no change. Since we are not doing too many changes in feature band releases, imo we can stick to major version only.

@mrlacey
Copy link
Author

mrlacey commented Dec 17, 2021

While the versioning discussion is possibly useful on a wider level, there is no change needed here. I'd just misunderstood the implication of a property in the consuming library being made obsolete.

@mrlacey mrlacey closed this as completed Dec 17, 2021
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

5 participants