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

JSON export version attribute doesn't match JSON-Schema #720

Closed
zakandrewking opened this issue May 31, 2018 · 7 comments
Closed

JSON export version attribute doesn't match JSON-Schema #720

zakandrewking opened this issue May 31, 2018 · 7 comments
Labels
Milestone

Comments

@zakandrewking
Copy link
Contributor

zakandrewking commented May 31, 2018

Problem description

Our team (credit @dbourdeveloper) noticed that the JSON output has a version attribute as a string, but the JSON-Schema specifies that it should be a number:

JSON_SPEC = "1"

"type": "integer",

Since I'm here, a small suggestion: It would be great to pull the JSON-Schema document out into an independent file, so it can be more easily incorporated into non-Python projects.

Thanks!!

@Midnighter
Copy link
Member

It would be great to pull the JSON-Schema document out into an independent file, so it can be more easily incorporated into non-Python projects.

Sure thing. I would change the type to string, I think so that we can use a semantic version in future.

Do you have any other thoughts regarding the schema? Is it still serving your purposes?

@zakandrewking
Copy link
Contributor Author

zakandrewking commented May 31, 2018 via email

@zakandrewking
Copy link
Contributor Author

@Midnighter I can submit a PR for this if the solution is to just switch the type in the JSON Schema to "string".

I can also pull the schema out into a separate file if you want, or just leave it as is.

@Midnighter
Copy link
Member

Midnighter commented Jul 16, 2018

My rationale for waiting on this was that we will soon have compartment classes and thus need a version "2" as well. If this is very urgent for you then feel free to make a PR, please. Type string and a separate file would be nice. If you can load that file using https://importlib-resources.readthedocs.io/en/latest/ I would much appreciate it. Otherwise as announced earlier, we will do a lot of work on cobrapy in August and cover this as well.

@zakandrewking
Copy link
Contributor Author

Ok. I'm not in a rush. Let's leave this open to wait for version "2".

@Hemant27031999
Copy link
Contributor

Are there any updates on this? Though the solution of this issue is quite simple and has already been discussed, json_schema still shows the version type to be an integer instead of string.
Thanks.

@Midnighter
Copy link
Member

The basic problem was addressed by #956.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants