Skip to content
This repository has been archived by the owner on Jul 27, 2020. It is now read-only.

d11n/486 cleanup after 482, part 2 #507

Merged
merged 3 commits into from
Aug 15, 2019
Merged

Conversation

d11n
Copy link
Member

@d11n d11n commented Aug 14, 2019

further fixes #486, fixes #471

just to be tidy

@d11n d11n requested a review from gr2m August 14, 2019 20:26
@d11n
Copy link
Member Author

d11n commented Aug 14, 2019

ugh...more DoSing

@gr2m
Copy link
Contributor

gr2m commented Aug 14, 2019

Did npm run test:ci pass for you locally? It fails for me

@gr2m
Copy link
Contributor

gr2m commented Aug 14, 2019

Might be related to overrides maybe?

        # Subtest: https://developer.github.com/v3/git/trees/#get-a-tree to JSON from ./openapi/api.github.com/index.json
            not ok 1 - should be equivalent
              ---
              found:
                - path: /repos/{owner}/{repo}/git/trees/{tree_sha}
                  method: get
                  operation:
                    summary: Get a tree
                    description: If `truncated` in the response is `true`, the number of items in the
                      `tree` array exceeded our maximum limit. If you need to fetch more
                      items, omit the `recursive` parameter, and fetch one sub-tree at a time.
                      If you need to fetch even more items, you can clone the repository and
                      iterate over the Git data locally.
                    operationId: git-get-tree
                    tags:
                      - git
                    externalDocs:
                      description: API method documentation
                      url: https://developer.github.com/v3/git/trees/#get-a-tree
                    parameters:
                      - name: accept
                        description: Setting to `application/vnd.github.v3+json` is recommended
                        in: header
                        schema:
                          type: string
                          default: application/vnd.github.v3+json
                      - name: owner
                        in: path
                        schema:
                          type: string
                        required: true
                        description: owner parameter
                      - name: repo
                        in: path
                        schema:
                          type: string
                        required: true
                        description: repo parameter
                      - name: tree_sha
                        in: path
                        schema:
                          type: string
                        required: true
                        description: tree_sha parameter
                      - name: recursive
                        in: query
                        schema:
                          type: integer
                          enum:
                            - 1
                        description: recursive parameter
                    responses:
                      "418":
                        description: Response definition missing
                    x-code-samples:
                      - lang: Shell
                        source: >-
                          curl \
                            -H"Accept: application/vnd.github.v3+json" \
                            https://developer.github.com/repos/octocat/:repo/git/trees/:tree_sha
                      - lang: JS
                        source: |-
                          octokit.git.get({
                            owner: 'octocat',
                            repo: 'hello-world',
                            tree_sha: 'tree_sha'
                          })
                    x-github:
                      legacy: false
                      enabledForApps: true
                      githubCloudOnly: false
                      overridden: true
                    x-changes: []
              wanted:
                - path: /repos/{owner}/{repo}/git/trees/{tree_sha}
                  method: get
                  operation:
                    summary: Get a tree
                    description: If `truncated` in the response is `true`, the number of items in the
                      `tree` array exceeded our maximum limit. If you need to fetch more
                      items, omit the `recursive` parameter, and fetch one sub-tree at a time.
                      If you need to fetch even more items, you can clone the repository and
                      iterate over the Git data locally.
                    operationId: git/get-tree
                    tags:
                      - git
                    externalDocs:
                      description: API method documentation
                      url: https://developer.github.com/v3/git/trees/#get-a-tree
                    parameters:
                      - name: accept
                        description: Setting to `application/vnd.github.v3+json` is recommended
                        in: header
                        schema:
                          type: string
                          default: application/vnd.github.v3+json
                      - name: owner
                        description: owner parameter
                        in: path
                        required: true
                        schema:
                          type: string
                      - name: repo
                        description: repo parameter
                        in: path
                        required: true
                        schema:
                          type: string
                      - name: tree_sha
                        description: tree_sha parameter
                        in: path
                        required: true
                        schema:
                          type: string
                      - name: recursive
                        description: recursive parameter
                        in: query
                        schema:
                          type: integer
                          enum:
                            - 1
                    responses:
                      "418":
                        description: Response definition missing
                    x-code-samples:
                      - lang: Shell
                        source: >-
                          curl \
                            -H"Accept: application/vnd.github.v3+json" \
                            https://developer.github.com/repos/octocat/:repo/git/trees/:tree_sha
                      - lang: JS
                        source: |-
                          octokit.git.getTree({
                            owner: 'octocat',
                            repo: 'hello-world',
                            tree_sha: 'tree_sha'
                          })
                    x-github:
                      legacy: false
                      enabledForApps: true
                      githubCloudOnly: false
                      overridden: true
                    x-changes: []
              diff: >-
                --- expected
              
                +++ actual
                 Array [
                   Object {
                     "path": "/repos/{owner}/{repo}/git/trees/{tree_sha}",
                     "method": "get",
                     "operation": Object {
                       "summary": "Get a tree",
                       "description": "If `truncated` in the response is `true`, the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, omit the `recursive` parameter, and fetch one sub-tree at a time. If you need to fetch even more items, you can clone the repository and iterate over the Git data locally.",
                -      "operationId": "git/get-tree",
              
                +      "operationId": "git-get-tree",
                       "tags": Array [
                         "git",
                       ],
                       "externalDocs": Object {
                         "description": "API method documentation",
                         "url": "https://developer.github.com/v3/git/trees/#get-a-tree",
                       },
                       "parameters": Array [
                         Object {
                           "name": "accept",
                           "description": "Setting to `application/vnd.github.v3+json` is recommended",
                           "in": "header",
                           "schema": Object {
                             "type": "string",
                             "default": "application/vnd.github.v3+json",
                           },
                         },
                         Object {
                           "name": "owner",
                           "in": "path",
                           "schema": Object {
                             "type": "string",
                           },
                           "required": true,
                           "description": "owner parameter",
                         },
                         Object {
                           "name": "repo",
                           "in": "path",
                           "schema": Object {
                             "type": "string",
                           },
                           "required": true,
                           "description": "repo parameter",
                         },
                         Object {
                           "name": "tree_sha",
                           "in": "path",
                           "schema": Object {
                             "type": "string",
                           },
                           "required": true,
                           "description": "tree_sha parameter",
                         },
                         Object {
                           "name": "recursive",
                           "in": "query",
                           "schema": Object {
                             "type": "integer",
                             "enum": Array [
                               1,
                             ],
                           },
                           "description": "recursive parameter",
                         },
                       ],
                       "responses": Object {
                         "418": Object {
                           "description": "Response definition missing",
                         },
                       },
                       "x-code-samples": Array [
                         Object {
                           "lang": "Shell",
                           "source": "curl \\\n  -H\"Accept: application/vnd.github.v3+json\" \\\n  https://developer.github.com/repos/octocat/:repo/git/trees/:tree_sha",
                         },
                         Object {
                           "lang": "JS",
                -          "source": "octokit.git.getTree({\n  owner: 'octocat',\n  repo: 'hello-world',\n  tree_sha: 'tree_sha'\n})",
              
                +          "source": "octokit.git.get({\n  owner: 'octocat',\n  repo: 'hello-world',\n  tree_sha: 'tree_sha'\n})",
                         },
                       ],
                       "x-github": Object {
                         "legacy": false,
                         "enabledForApps": true,
                         "githubCloudOnly": false,
                         "overridden": true,
                       },
                       "x-changes": Array [],
                     },
                   },
                 ]
              at:
                line: 29
                column: 9
                file: test/integration/endpoints-test.js
                type: Test
                function: test
              stack: |
                Test.test (test/integration/endpoints-test.js:29:9)
              source: |2
                      const actual = routeMap.get(url).sort(sortByPathThenMethod)
                      t.deepEquals(actual, expected)
                --------^
                      t.end()
                    })
              ...
            
            1..1
            # failed 1 test
        not ok 240 - https://developer.github.com/v3/git/trees/#get-a-tree to JSON from ./openapi/api.github.com/index.json # time=37.683ms

@d11n
Copy link
Member Author

d11n commented Aug 15, 2019

ah i had that on another branch...a failure at juggling branches

@gr2m gr2m merged commit 1879421 into master Aug 15, 2019
@delete-merged-branch delete-merged-branch bot deleted the d11n/486-cleanup-after-482-2 branch August 15, 2019 19:18
@github-actions
Copy link
Contributor

🎉 This PR is included in version 22.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released Released via semantic-release label Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
released Released via semantic-release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up after PR #482 OpenAPI: replace overrides with the new OpenAPI operations format
2 participants