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

Refactor json_schema.py to_regex as a class, subclass to allow YAML generation #36

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lapp0
Copy link
Owner

@lapp0 lapp0 commented Jun 28, 2024

Overview

Refactor json_schema.py to be more coherent and extensible. Use extensibility to implement JSON Schema to yaml.

Changes

  • raise not implemented (TODO expand)
    TODO, finish this section

Behavioral Changes

A number of changes have been made to conform with the JSON Schema spec.

This needs to be part of the release notes and documentation

including but not limited to:

  • anyOf: Previously broken
  • allOf: Previously broken
  • oneOf: Disabled, not feasible

JSON Schema Compliance

This is a large change-set. To verify correctness, in addition to ensuring current tests pass, test_json_schema_full.py tests compliance with JSON Schema by retrieving 1,245 test cases from the official json-schema.org test suite.

On this Branch

  • 243 tests pass
  • 29 tests fail
  • 973 raise NotImplementedError

On main

  • TODO

TODO

  • Refactor json_schema so its clean and extensible
  • Validate refactor integrity through extensive json-schema test suite
  • Implement JSON Schema to YAML
  • Finish integrating patrice's patterns
  • Update docs to reflect new, correct json-schema implementation

Further Work

  • Implement all NotImplementedError conditions. There are ~20 (mostly different key types)

@lapp0 lapp0 force-pushed the json-schema-yaml branch from 3efb728 to 99fa1ec Compare October 1, 2024 23:13
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

Successfully merging this pull request may close these issues.

1 participant