Skip to content

Commit

Permalink
chore(deps): update @readme/openapi-parser (#1004)
Browse files Browse the repository at this point in the history
| [![PR App][icn]][pr] | 🚥 Resolves RM-9343 |
| :------------------: | :------------------: |

## 🧰 Changes
This bumps `@readme/openapi-parser` to include these changes:
- readmeio/openapi-parser#259
- readmeio/openapi-parser#264

These fix an issue where the existence of the `description` property
under `server.variables` would fail validation.


## 💁 Customer Impact
Customers should be able to upload valid OAS 3.1 files again without
error'ing.

## 🧬 QA & Testing
The following OAS file should not hit any validation errors:

<details>
<summary>OAS 3.1 file</summary>

```json
{
  "openapi": "3.1.0",
  "info": {
    "version": "1.0",
    "title": "Invalid API"
  },
  "servers": [
    {
      "url": "https://{subdomain}.io",
      "variables": {
        "subdomain": {
          "default": "petstore",
          "description": "Subdomain description"
        }

      }
    }
  ],
  "paths": {
    "/anything": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User-Information"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "User-Information": {
        "type": "object",
        "properties": {
          "first": {
            "type": "boolean"
          },
          "last": {
            "type": "boolean"
          }
        }
      }
    }
  }
}
```
</details>


- [Broken on next][next].
- [Working in this PR][pr]!

[next]: https://next.readme.ninja
[pr]: https://readme-pr-PR_NUMBER.readme.ninja
[ui]: https://readme-pr-PR_NUMBER.readme.ninja/ui
[icn]:
https://user-images.githubusercontent.com/886627/160426047-1bee9488-305a-4145-bb2b-09d8b757d38a.svg

<!-- Uncomment and unescape this if you don't want a PR app! -->
<!-- \[skip preview\] -->
  • Loading branch information
darrenyong authored May 28, 2024
1 parent 098dd6b commit abb8c41
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 34 deletions.
47 changes: 26 additions & 21 deletions __tests__/helpers/github-workflow-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,27 +264,32 @@
"matrix": {
"$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix",
"description": "A build matrix is a set of different configurations of the virtual environment. For example you might run a job against more than one supported version of a language, operating system, or tool. Each configuration is a copy of the job that runs and reports a status.\nYou can specify a matrix by supplying an array for the configuration options. For example, if the GitHub virtual environment supports Node.js versions 6, 8, and 10 you could specify an array of those versions in the matrix.\nWhen you define a matrix of operating systems, you must set the required runs-on keyword to the operating system of the current job, rather than hard-coding the operating system name. To access the operating system name, you can use the matrix.os context parameter to set runs-on. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.",
"oneOf": [{ "type": "object" }, { "$ref": "#/definitions/expressionSyntax" }],
"patternProperties": {
"^(in|ex)clude$": {
"$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build",
"oneOf": [
{ "$ref": "#/definitions/expressionSyntax" },
{
"type": "array",
"items": { "type": "object", "additionalProperties": { "$ref": "#/definitions/configuration" } },
"minItems": 1
"oneOf": [
{
"type": "object",
"patternProperties": {
"^(in|ex)clude$": {
"$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build",
"oneOf": [
{ "$ref": "#/definitions/expressionSyntax" },
{
"type": "array",
"items": { "type": "object", "additionalProperties": { "$ref": "#/definitions/configuration" } },
"minItems": 1
}
]
}
]
}
},
"additionalProperties": {
"oneOf": [
{ "type": "array", "items": { "$ref": "#/definitions/configuration" }, "minItems": 1 },
{ "$ref": "#/definitions/expressionSyntax" }
]
},
"minProperties": 1
},
"additionalProperties": {
"oneOf": [
{ "type": "array", "items": { "$ref": "#/definitions/configuration" }, "minItems": 1 },
{ "$ref": "#/definitions/expressionSyntax" }
]
},
"minProperties": 1
},
{ "$ref": "#/definitions/expressionSyntax" }
]
},
"reusableWorkflowCallJob": {
"$comment": "https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#calling-a-reusable-workflow",
Expand Down Expand Up @@ -392,7 +397,7 @@
"oneOf": [{ "type": "string" }, { "$ref": "#/definitions/environment" }]
},
"outputs": {
"$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjobs_idoutputs",
"$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs",
"description": "A map of outputs for a job. Job outputs are available to all downstream jobs that depend on this job.",
"type": "object",
"additionalProperties": { "type": "string" },
Expand Down
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit abb8c41

Please sign in to comment.