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

fix: update json-schema #22262

Merged
merged 3 commits into from May 17, 2023
Merged

fix: update json-schema #22262

merged 3 commits into from May 17, 2023

Conversation

viceice
Copy link
Member

@viceice viceice commented May 16, 2023

Changes

  • Allow ^regex:.* as versioning
  • Add description to global array objects (like packageRules or regexManagers)

Context

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

@viceice viceice requested review from rarkins and secustor May 16, 2023 13:57
@rarkins
Copy link
Collaborator

rarkins commented May 16, 2023

1054a1055,1058
>               "description": {
>                 "type": "string",
>                 "description": "A custom description"
>               },
1553a1558,1561
>               "description": {
>                 "type": "string",
>                 "description": "A custom description"
>               },
2069a2078,2081
>               "description": {
>                 "type": "string",
>                 "description": "A custom description"
>               },
2329a2342,2345
>               "description": {
>                 "type": "string",
>                 "description": "A custom description"
>               },
2748,2784c2764,2808
<       "enum": [
<         "aws-machine-image",
<         "azure-rest-api",
<         "bazel-module",
<         "cargo",
<         "composer",
<         "conan",
<         "deb",
<         "debian",
<         "docker",
<         "git",
<         "go-mod-directive",
<         "gradle",
<         "hashicorp",
<         "helm",
<         "hermit",
<         "hex",
<         "ivy",
<         "kubernetes-api",
<         "loose",
<         "maven",
<         "nixpkgs",
<         "node",
<         "npm",
<         "nuget",
<         "pep440",
<         "perl",
<         "poetry",
<         "python",
<         "redhat",
<         "regex",
<         "rez",
<         "ruby",
<         "semver",
<         "semver-coerced",
<         "swift",
<         "ubuntu"
---
>       "oneOf": [
>         {
>           "enum": [
>             "aws-machine-image",
>             "azure-rest-api",
>             "bazel-module",
>             "cargo",
>             "composer",
>             "conan",
>             "deb",
>             "debian",
>             "docker",
>             "git",
>             "go-mod-directive",
>             "gradle",
>             "hashicorp",
>             "helm",
>             "hermit",
>             "hex",
>             "ivy",
>             "kubernetes-api",
>             "loose",
>             "maven",
>             "nixpkgs",
>             "node",
>             "npm",
>             "nuget",
>             "pep440",
>             "perl",
>             "poetry",
>             "python",
>             "redhat",
>             "regex",
>             "rez",
>             "ruby",
>             "semver",
>             "semver-coerced",
>             "swift",
>             "ubuntu"
>           ]
>         },
>         {
>           "type": "string",
>           "pattern": "^regex:"
>         }

@rarkins
Copy link
Collaborator

rarkins commented May 16, 2023

@viceice I don't understand this "a custom description" change. Here's an example:

    "hostRules": {
      "description": "Host rules/configuration including credentials.",
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "description": {
                "type": "string",
                "description": "A custom description"
              },
              "abortIgnoreStatusCodes": {
                "description": "A list of HTTP status codes safe to ignore even when `abortOnError=true`.",
                "type": "array",
                "items": {
                  "type": "number"
                }
              },

@viceice
Copy link
Member Author

viceice commented May 16, 2023

it adds the description field to the schema, which we already heavily use to describe package rules. so the editor can suggest that field now.

@viceice
Copy link
Member Author

viceice commented May 16, 2023

i can change the description of the description property, it seems to confusing 😬

@viceice
Copy link
Member Author

viceice commented May 17, 2023

@viceice I don't understand this "a custom description" change. Here's an example:

    "hostRules": {
      "description": "Host rules/configuration including credentials.",
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "description": {
                "type": "string",
                "description": "A custom description"
              },
              "abortIgnoreStatusCodes": {
                "description": "A list of HTTP status codes safe to ignore even when `abortOnError=true`.",
                "type": "array",
                "items": {
                  "type": "number"
                }
              },

description is added for child objects of these root properties:
image

tools/docs/schema.ts Outdated Show resolved Hide resolved
rarkins
rarkins previously approved these changes May 17, 2023
@viceice viceice enabled auto-merge May 17, 2023 08:05
@viceice viceice added this pull request to the merge queue May 17, 2023
Merged via the queue into main with commit 1c13cf4 May 17, 2023
11 checks passed
@viceice viceice deleted the fix/update-json-schema branch May 17, 2023 08:48
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 35.90.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 17, 2023
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.

Allow regex:* strings in versioning for JSON schema
3 participants