Fix docs/implementation consistency issues; convert naming-only $id to title - #188
Open
wol-soft wants to merge 1 commit into
Open
Fix docs/implementation consistency issues; convert naming-only $id to title#188wol-soft wants to merge 1 commit into
wol-soft wants to merge 1 commit into
Conversation
…d to title Reviews docs/source and README for divergence from the actual implementation: - Converts $id usages that only existed to name example classes into title, matching the real class-naming priority (title outranks $id). generic/references.rst keeps $id since it specifically documents id-based $ref resolution, with root values changed to realistic URIs. - Fixes stale API references: new Generator() -> new ModelGenerator(), setter return types shown as concrete classes instead of static, getRawModelDataInput() which doesn't exist -> meta()->rawInput(), NestedObjectException's wrong namespace. - Fixes invalid JSON in several example schemas (missing/trailing commas) and several wrong setter parameter names that didn't match their property. - Fixes broken/wrong doc links and a duplicated toctree entry. - Corrects generic/meta.rst's outdated "ID" naming explanation and adds the missing $anchor step to complexTypes/object.rst's naming priority list. - Documents minContains/maxContains (implemented but previously undocumented), the Draft 2019-09/2020-12 draft classes, and the enum exception message truncation behavior for large enums. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TcoPe6sLfqkEqNEBoV2Wgi
Coverage Report for CI Build 31333517295Coverage remained the same at 98.76%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reviewed
docs/sourceandREADME.mdfor divergence from the actual implementation, and for$idusage wheretitleshould be used instead.$idusages that only existed to name example classes intotitle, matching the real class-naming priority (titleoutranks$id, verified againstClassNameGenerator).generic/references.rstkeeps$idsince it specifically documents id-based$refresolution — its root-level values were changed to realistic URIs instead.new Generator()→new ModelGenerator(), setter return types shown as a concrete class instead ofstatic,getRawModelDataInput()(doesn't exist anywhere in the codebase) →meta()->rawInput(),NestedObjectException's wrong namespace (Generic→Object).Model.phptplnaming rule).customDraft.generic/meta.rst's outdated "ID" naming explanation (it predatedtitlesupport) and added the missing$anchorstep tocomplexTypes/object.rst's naming priority list.minContains/maxContains(fully implemented, previously undocumented anywhere), theDraft_2019_09/Draft_2020_12draft classes (existing, tested, but absent from the docs' draft table), and the enum exception message truncation behavior for enums with more than 8 values.php-json-schema-model-generator-productionrepo where docs quote its classes directly.Test plan
docs/sourcewith a script; all now parse as valid JSON (excluding intentionally-abbreviated fragments using...)src/and the production repodocs/not rendered with Sphinx in this session — recommend a docs build to catch any RST syntax issues before merge🤖 Generated with Claude Code
https://claude.ai/code/session_01TcoPe6sLfqkEqNEBoV2Wgi
Generated by Claude Code