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

docs: fix nullable json schema #31938

Merged
merged 4 commits into from
Oct 14, 2024

Conversation

samchungy
Copy link
Contributor

@samchungy samchungy commented Oct 14, 2024

Changes

  • Enables nullable JSON schema to be generated as the appropriate type: [TYPE, 'null'].

I'm not sure if all or other schemas are nullable but I went with a workaround to avoid completely re-writing the entire codebase.

Context

I was trying to utilise the "$schema": "https://docs.renovatebot.com/renovate-schema.json" field but my IDE was flagging a nullable field as invalid.

image

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

Ran the generate schema command locally and viewed the rendered schema:

image

@CLAassistant
Copy link

CLAassistant commented Oct 14, 2024

CLA assistant check
All committers have signed the CLA.

@samchungy samchungy changed the title Enable null json schema docs: Fix nullable JSON Schema Oct 14, 2024
@samchungy samchungy changed the title docs: Fix nullable JSON Schema docs: fix nullable json schema Oct 14, 2024
@samchungy samchungy marked this pull request as ready for review October 14, 2024 06:20
@rarkins
Copy link
Collaborator

rarkins commented Oct 14, 2024

Can you post a diff of the resulting json schema file?

@samchungy
Copy link
Contributor Author

samchungy commented Oct 14, 2024

Can you post a diff of the resulting json schema file?

Good call, caught something I missed.

Here's the new diff: samchungy@69d13af

@rarkins rarkins requested review from viceice and secustor October 14, 2024 09:29
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

LGTM

@rarkins rarkins added this pull request to the merge queue Oct 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 14, 2024
@rarkins rarkins added this pull request to the merge queue Oct 14, 2024
Merged via the queue into renovatebot:main with commit 6c00935 Oct 14, 2024
39 checks passed
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 38.122.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants