Skip to content

Conversation

@richvdh
Copy link
Member

@richvdh richvdh commented Apr 30, 2024

richvdh added 9 commits April 23, 2024 19:44
Just documenting the current situation.
…ct-table`

Previously, we were stripping `additionalProperties` and `patternProperties`
from all objects except top-level objects. Obviously, this was no good for
objects where a nested property contains such properties.

Fixing that (in `clean-object`) *ought* to be simple enough, except that it
turned out we were relying on the fact that would give us an "empty" entry in
the array of types-to-render-tables-for returned by
`resolve-additional-types`. (Normally, we don't want an object that only has
`additionalProperties` to have its own table, since we just embed it in the
parent table.)

So, we need to add more logic to `resolve-additional-types-inner` to suppress
such tables.

This commit doesn't change the rendered output at all (verified via `diff`):
it's just preparation for what comes next.
It would be nice to make the headers and body more of a unit somehow, but this
is an improvement at least.
@richvdh richvdh force-pushed the rav/registration_terms branch from 83b2254 to 90c5e30 Compare April 30, 2024 18:12
Copy link
Member

@uhoreg uhoreg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits, but otherwise lgtm

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.

3 participants