Skip to content

Add support for anyOf and allOf #135

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

Merged
merged 2 commits into from
Dec 17, 2024
Merged

Add support for anyOf and allOf #135

merged 2 commits into from
Dec 17, 2024

Conversation

tomcollins
Copy link
Owner

@tomcollins tomcollins commented Dec 17, 2024

Related to #134

Add support for JSON Schema allOf and anyOf keywords.

  • Modify lib/merger.js to handle allOf and anyOf keywords in the resolveRef and mergeSchemas functions.
  • Modify lib/renderer-markdown.js to add functions for rendering allOf and anyOf rows and update the propertiesTable function.
  • Modify templates/schema.hbs to include handling for allOf and anyOf keywords.
  • Update gh-pages/support.md to indicate that allOf and anyOf are supported keywords.
  • Add example schemas gh-pages/yml/ajv-2019/allof.yml and gh-pages/yml/ajv-2019/anyof.yml demonstrating the use of allOf and anyOf keywords.
  • Modify tests/merger.test.js to add test cases for allOf and anyOf keywords in the mergeSchemas function.
  • Modify tests/renderer-markdown.test.js to add test cases for rendering allOf and anyOf rows.

For more details, open the Copilot Workspace session.

Related to #134

Add support for JSON Schema `allOf` and `anyOf` keywords.

* Modify `lib/merger.js` to handle `allOf` and `anyOf` keywords in the `resolveRef` and `mergeSchemas` functions.
* Modify `lib/renderer-markdown.js` to add functions for rendering `allOf` and `anyOf` rows and update the `propertiesTable` function.
* Modify `templates/schema.hbs` to include handling for `allOf` and `anyOf` keywords.
* Update `gh-pages/support.md` to indicate that `allOf` and `anyOf` are supported keywords.
* Add example schemas `gh-pages/yml/ajv-2019/allof.yml` and `gh-pages/yml/ajv-2019/anyof.yml` demonstrating the use of `allOf` and `anyOf` keywords.
* Modify `tests/merger.test.js` to add test cases for `allOf` and `anyOf` keywords in the `mergeSchemas` function.
* Modify `tests/renderer-markdown.test.js` to add test cases for rendering `allOf` and `anyOf` rows.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/tomcollins/json-schema-static-docs/issues/134?shareId=XXXX-XXXX-XXXX-XXXX).
@tomcollins tomcollins merged commit 9df583b into master Dec 17, 2024
2 checks passed
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