Skip to content

Commit

Permalink
update openapi schema name (github#16231)
Browse files Browse the repository at this point in the history
  • Loading branch information
rachmari authored Oct 27, 2020
1 parent 174d853 commit 1fe4e51
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/all-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ const plans = [
releases: [latestNonNumberedRelease],
latestRelease: latestNonNumberedRelease,
nonEnterpriseDefault: true, // permanent way to refer to this plan if the name changes
openApiBaseName: 'dotcom'
openApiBaseName: 'api.github.com'
},
{
plan: 'enterprise-server',
planTitle: 'Enterprise Server',
releases: enterpriseServerReleases.supported,
latestRelease: enterpriseServerReleases.latest,
hasNumberedReleases: true,
openApiBaseName: ''
openApiBaseName: 'ghes-'
}
]

Expand Down
4 changes: 4 additions & 0 deletions lib/rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ let allCategories = []
allVersionKeys.forEach(currentVersion => {
// Translate the versions from the openapi to versions used in the docs
const openApiVersion = allVersions[currentVersion].openApiVersionName

// Check that the openApiVersion is configured in the OpenAPI
if (!operations[openApiVersion]) return

operations[currentVersion] = operations[openApiVersion]
delete operations[openApiVersion]

Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@github-docs/data-directory": "^1.2.0",
"@github-docs/frontmatter": "^1.3.1",
"@github-docs/render-content": "^5.2.0",
"@github/rest-api-operations": "^3.2.1",
"@github/rest-api-operations": "^3.2.2",
"@octokit/rest": "^16.38.1",
"@primer/css": "^15.1.0",
"@primer/octicons": "^11.0.0",
Expand Down

0 comments on commit 1fe4e51

Please sign in to comment.