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

Sample output violates the spec #12

Closed
karagog opened this issue Sep 11, 2023 · 3 comments
Closed

Sample output violates the spec #12

karagog opened this issue Sep 11, 2023 · 3 comments

Comments

@karagog
Copy link

karagog commented Sep 11, 2023

One of the examples in the sample output violates the spec IMO. https://github.com/opencomputeproject/ocp-diag-core-python/blob/dev/examples/sample_output.txt#L59 shows that the extension content can be an arbitrary string value, but the spec says that this must be a JSON object.

Can we get clarification on whether this is valid results output, and/or update the example to show valid output?

@mimir-d
Copy link
Collaborator

mimir-d commented Oct 13, 2024

You are absolutely correct, and this was also discovered recently in writing the rust api. I'll fix this and add the schema validator check for the examples here (which is how the rust one was highlighted)

@mimir-d
Copy link
Collaborator

mimir-d commented Oct 13, 2024

add the schema validator check for the examples here

actually now i see this was already in #5

mimir-d added a commit that referenced this issue Oct 13, 2024
- fix extension example since it was outputting a string extension which
  is invalid, per the spec (also a test)
- fix the typing to disallow primitive types for extension content
- added scripts/check.sh for easier validation before github actions get
  to run on any PRs
- fixes #5, #12

Signed-off-by: mimir-d <[email protected]>
@mimir-d
Copy link
Collaborator

mimir-d commented Oct 13, 2024

fixed in #14

@mimir-d mimir-d closed this as completed Oct 13, 2024
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