-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update vitepress-theme-openapi
- Loading branch information
1 parent
e0aad91
commit d1fe041
Showing
28 changed files
with
2,052 additions
and
2,098 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 10 additions & 18 deletions
28
.vitepress/scripts/templates/operations/[operationId].paths.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
import { useOpenapi } from 'vitepress-theme-openapi' | ||
import { OpenApi } from 'vitepress-theme-openapi' | ||
import spec from '../../public/REPLACE_REGION/openapi.json' assert { type: 'json' } | ||
|
||
export default { | ||
paths() { | ||
const openapi = useOpenapi() | ||
openapi.setSpec(spec) | ||
const openapi = OpenApi({ spec }) | ||
|
||
if (!openapi?.spec?.paths) { | ||
return [] | ||
} | ||
|
||
return Object.keys(openapi.spec.paths) | ||
.map((path) => { | ||
const { operationId } = openapi.spec.paths[path].get | ||
const summary = openapi.spec.paths[path].get.summary | ||
return { | ||
params: { | ||
operationId, | ||
pageTitle: `${summary} - CriptoYa API`, | ||
}, | ||
} | ||
}) | ||
return openapi.getPathsByVerbs().map(({ operationId, summary }) => { | ||
return { | ||
params: { | ||
operationId, | ||
pageTitle: `${summary} - CriptoYa API`, | ||
}, | ||
} | ||
}) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
import { useOpenapi } from 'vitepress-theme-openapi' | ||
import { OpenApi } from 'vitepress-theme-openapi' | ||
import spec from '../../public/argentina/openapi.json' assert { type: 'json' } | ||
|
||
export default { | ||
paths() { | ||
const openapi = useOpenapi() | ||
openapi.setSpec(spec) | ||
const openapi = OpenApi({ spec }) | ||
|
||
if (!openapi?.spec?.paths) { | ||
return [] | ||
} | ||
|
||
return Object.keys(openapi.spec.paths) | ||
.map((path) => { | ||
const { operationId } = openapi.spec.paths[path].get | ||
const summary = openapi.spec.paths[path].get.summary | ||
return { | ||
params: { | ||
operationId, | ||
pageTitle: `${summary} - CriptoYa API`, | ||
}, | ||
} | ||
}) | ||
return openapi.getPathsByVerbs().map(({ operationId, summary }) => { | ||
return { | ||
params: { | ||
operationId, | ||
pageTitle: `${summary} - CriptoYa API`, | ||
}, | ||
} | ||
}) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
import { useOpenapi } from 'vitepress-theme-openapi' | ||
import { OpenApi } from 'vitepress-theme-openapi' | ||
import spec from '../../public/bolivia/openapi.json' assert { type: 'json' } | ||
|
||
export default { | ||
paths() { | ||
const openapi = useOpenapi() | ||
openapi.setSpec(spec) | ||
const openapi = OpenApi({ spec }) | ||
|
||
if (!openapi?.spec?.paths) { | ||
return [] | ||
} | ||
|
||
return Object.keys(openapi.spec.paths) | ||
.map((path) => { | ||
const { operationId } = openapi.spec.paths[path].get | ||
const summary = openapi.spec.paths[path].get.summary | ||
return { | ||
params: { | ||
operationId, | ||
pageTitle: `${summary} - CriptoYa API`, | ||
}, | ||
} | ||
}) | ||
return openapi.getPathsByVerbs().map(({ operationId, summary }) => { | ||
return { | ||
params: { | ||
operationId, | ||
pageTitle: `${summary} - CriptoYa API`, | ||
}, | ||
} | ||
}) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
import { useOpenapi } from 'vitepress-theme-openapi' | ||
import { OpenApi } from 'vitepress-theme-openapi' | ||
import spec from '../../public/brazil/openapi.json' assert { type: 'json' } | ||
|
||
export default { | ||
paths() { | ||
const openapi = useOpenapi() | ||
openapi.setSpec(spec) | ||
const openapi = OpenApi({ spec }) | ||
|
||
if (!openapi?.spec?.paths) { | ||
return [] | ||
} | ||
|
||
return Object.keys(openapi.spec.paths) | ||
.map((path) => { | ||
const { operationId } = openapi.spec.paths[path].get | ||
const summary = openapi.spec.paths[path].get.summary | ||
return { | ||
params: { | ||
operationId, | ||
pageTitle: `${summary} - CriptoYa API`, | ||
}, | ||
} | ||
}) | ||
return openapi.getPathsByVerbs().map(({ operationId, summary }) => { | ||
return { | ||
params: { | ||
operationId, | ||
pageTitle: `${summary} - CriptoYa API`, | ||
}, | ||
} | ||
}) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
import { useOpenapi } from 'vitepress-theme-openapi' | ||
import { OpenApi } from 'vitepress-theme-openapi' | ||
import spec from '../../public/chile/openapi.json' assert { type: 'json' } | ||
|
||
export default { | ||
paths() { | ||
const openapi = useOpenapi() | ||
openapi.setSpec(spec) | ||
const openapi = OpenApi({ spec }) | ||
|
||
if (!openapi?.spec?.paths) { | ||
return [] | ||
} | ||
|
||
return Object.keys(openapi.spec.paths) | ||
.map((path) => { | ||
const { operationId } = openapi.spec.paths[path].get | ||
const summary = openapi.spec.paths[path].get.summary | ||
return { | ||
params: { | ||
operationId, | ||
pageTitle: `${summary} - CriptoYa API`, | ||
}, | ||
} | ||
}) | ||
return openapi.getPathsByVerbs().map(({ operationId, summary }) => { | ||
return { | ||
params: { | ||
operationId, | ||
pageTitle: `${summary} - CriptoYa API`, | ||
}, | ||
} | ||
}) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
import { useOpenapi } from 'vitepress-theme-openapi' | ||
import { OpenApi } from 'vitepress-theme-openapi' | ||
import spec from '../../public/colombia/openapi.json' assert { type: 'json' } | ||
|
||
export default { | ||
paths() { | ||
const openapi = useOpenapi() | ||
openapi.setSpec(spec) | ||
const openapi = OpenApi({ spec }) | ||
|
||
if (!openapi?.spec?.paths) { | ||
return [] | ||
} | ||
|
||
return Object.keys(openapi.spec.paths) | ||
.map((path) => { | ||
const { operationId } = openapi.spec.paths[path].get | ||
const summary = openapi.spec.paths[path].get.summary | ||
return { | ||
params: { | ||
operationId, | ||
pageTitle: `${summary} - CriptoYa API`, | ||
}, | ||
} | ||
}) | ||
return openapi.getPathsByVerbs().map(({ operationId, summary }) => { | ||
return { | ||
params: { | ||
operationId, | ||
pageTitle: `${summary} - CriptoYa API`, | ||
}, | ||
} | ||
}) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.