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

Spec is inconsistent about version values treated as floating numbers #167

Open
Shishqa opened this issue Jun 2, 2024 · 1 comment
Open

Comments

@Shishqa
Copy link
Contributor

Shishqa commented Jun 2, 2024

Hi! I've recently noticed that TOSCA 2.0 spec contains the note about the necessity of wrapping 2-unit version value with quotes (link)

When specifying a version string that contains just a major and a minor version number, the version string must be enclosed in quotes to prevent the YAML parser from treating the version as a floating point value.

However, all the examples contain not enclosed version values. Some links:

Could you please clarify the actual state spec here? Should version values be enclosed?

@lauwers
Copy link
Contributor

lauwers commented Jun 3, 2024

Thanks @Shishqa for catching this. Yes, all TOSCA version values in TOSCA files must be quoted, since the YAML parser will automatically convert unquoted 2-unit version values to floats. We will go through the draft of the spec to correct all examples.

Note however, that the same does not necessarily apply to version values in TOSCA.meta files, since those files are not defined to be YAML files.

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

2 participants