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

Generate Outcome_Group.schema.json using Pydantic #736

Open
ahouseholder opened this issue Mar 4, 2025 · 0 comments
Open

Generate Outcome_Group.schema.json using Pydantic #736

ahouseholder opened this issue Mar 4, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@ahouseholder
Copy link
Contributor

Describe the solution you'd like

Back-port the fields that are found in the hand-built JSON Schema

https://github.com/CERTCC/SSVC/blob/main/data/schema/v1/Outcome_Group-1-0-1.schema.json

to create a functional match using Pydantic's JSON schema feature set.

The net result should be that the output of

from ssvc.outcomes.base import OutcomeGroup
import json
print(json.dumps(OutcomeGroup.model_json_schema(),indent=2))

is as close as possible to https://github.com/CERTCC/SSVC/blob/main/data/schema/v1/Outcome_Group-1-0-1.schema.json

@ahouseholder ahouseholder added the enhancement New feature or request label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant