Skip to content

Commit

Permalink
chore: update vitepress-openapi
Browse files Browse the repository at this point in the history
  • Loading branch information
enzonotario committed Oct 27, 2024
1 parent b855653 commit 65764da
Show file tree
Hide file tree
Showing 15 changed files with 152 additions and 145 deletions.
22 changes: 11 additions & 11 deletions .vitepress/scripts/templates/operations/[operationId].paths.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { OpenApi } from 'vitepress-openapi'
import { usePaths } from 'vitepress-openapi'
import spec from '../../public/REPLACE_REGION/openapi.json' assert { type: 'json' }

export default {
paths() {
const openapi = OpenApi({ spec })

return openapi.getPathsByVerbs().map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
return usePaths({ spec })
.getPathsByVerbs()
.map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
},
}
17 changes: 11 additions & 6 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ import 'vitepress-openapi/dist/style.css'
import './style.css'

export default {
...DefaultTheme,
extends: DefaultTheme,
enhanceApp({ app, router, siteData }) {
const themeConfig = useTheme()
themeConfig.setI18nConfig({
locale: 'es',
useTheme({
i18n: {
locale: 'es',
},
jsonViewer: {
deep: 1,
},
schemaViewer: {
deep: 1,
},
})
themeConfig.setJsonViewerDeep(1)
themeConfig.setSchemaViewerDeep(1)

theme.enhanceApp({ app })
}
Expand Down
22 changes: 11 additions & 11 deletions argentina/operations/[operationId].paths.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { OpenApi } from 'vitepress-openapi'
import { usePaths } from 'vitepress-openapi'
import spec from '../../public/argentina/openapi.json' assert { type: 'json' }

export default {
paths() {
const openapi = OpenApi({ spec })

return openapi.getPathsByVerbs().map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
return usePaths({ spec })
.getPathsByVerbs()
.map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
},
}
22 changes: 11 additions & 11 deletions bolivia/operations/[operationId].paths.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { OpenApi } from 'vitepress-openapi'
import { usePaths } from 'vitepress-openapi'
import spec from '../../public/bolivia/openapi.json' assert { type: 'json' }

export default {
paths() {
const openapi = OpenApi({ spec })

return openapi.getPathsByVerbs().map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
return usePaths({ spec })
.getPathsByVerbs()
.map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
},
}
22 changes: 11 additions & 11 deletions brazil/operations/[operationId].paths.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { OpenApi } from 'vitepress-openapi'
import { usePaths } from 'vitepress-openapi'
import spec from '../../public/brazil/openapi.json' assert { type: 'json' }

export default {
paths() {
const openapi = OpenApi({ spec })

return openapi.getPathsByVerbs().map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
return usePaths({ spec })
.getPathsByVerbs()
.map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
},
}
22 changes: 11 additions & 11 deletions chile/operations/[operationId].paths.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { OpenApi } from 'vitepress-openapi'
import { usePaths } from 'vitepress-openapi'
import spec from '../../public/chile/openapi.json' assert { type: 'json' }

export default {
paths() {
const openapi = OpenApi({ spec })

return openapi.getPathsByVerbs().map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
return usePaths({ spec })
.getPathsByVerbs()
.map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
},
}
22 changes: 11 additions & 11 deletions colombia/operations/[operationId].paths.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { OpenApi } from 'vitepress-openapi'
import { usePaths } from 'vitepress-openapi'
import spec from '../../public/colombia/openapi.json' assert { type: 'json' }

export default {
paths() {
const openapi = OpenApi({ spec })

return openapi.getPathsByVerbs().map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
return usePaths({ spec })
.getPathsByVerbs()
.map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
},
}
22 changes: 11 additions & 11 deletions mexico/operations/[operationId].paths.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { OpenApi } from 'vitepress-openapi'
import { usePaths } from 'vitepress-openapi'
import spec from '../../public/mexico/openapi.json' assert { type: 'json' }

export default {
paths() {
const openapi = OpenApi({ spec })

return openapi.getPathsByVerbs().map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
return usePaths({ spec })
.getPathsByVerbs()
.map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
},
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"postcss": "^8.4.39",
"tailwindcss": "^3.4.6",
"vitepress": "^1.3.1",
"vitepress-openapi": "0.0.3-alpha.38"
"vitepress-openapi": "^0.0.3-alpha.44"
},
"packageManager": "[email protected]"
}
22 changes: 11 additions & 11 deletions paraguay/operations/[operationId].paths.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { OpenApi } from 'vitepress-openapi'
import { usePaths } from 'vitepress-openapi'
import spec from '../../public/paraguay/openapi.json' assert { type: 'json' }

export default {
paths() {
const openapi = OpenApi({ spec })

return openapi.getPathsByVerbs().map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
return usePaths({ spec })
.getPathsByVerbs()
.map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
},
}
22 changes: 11 additions & 11 deletions peru/operations/[operationId].paths.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { OpenApi } from 'vitepress-openapi'
import { usePaths } from 'vitepress-openapi'
import spec from '../../public/peru/openapi.json' assert { type: 'json' }

export default {
paths() {
const openapi = OpenApi({ spec })

return openapi.getPathsByVerbs().map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
return usePaths({ spec })
.getPathsByVerbs()
.map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
},
}
14 changes: 8 additions & 6 deletions pnpm-lock.yaml

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

22 changes: 11 additions & 11 deletions republica-dominicana/operations/[operationId].paths.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { OpenApi } from 'vitepress-openapi'
import { usePaths } from 'vitepress-openapi'
import spec from '../../public/republica-dominicana/openapi.json' assert { type: 'json' }

export default {
paths() {
const openapi = OpenApi({ spec })

return openapi.getPathsByVerbs().map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
return usePaths({ spec })
.getPathsByVerbs()
.map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
},
}
22 changes: 11 additions & 11 deletions uruguay/operations/[operationId].paths.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { OpenApi } from 'vitepress-openapi'
import { usePaths } from 'vitepress-openapi'
import spec from '../../public/uruguay/openapi.json' assert { type: 'json' }

export default {
paths() {
const openapi = OpenApi({ spec })

return openapi.getPathsByVerbs().map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
return usePaths({ spec })
.getPathsByVerbs()
.map(({ operationId, summary }) => {
return {
params: {
operationId,
pageTitle: `${summary} - CriptoYa API`,
},
}
})
},
}
Loading

0 comments on commit 65764da

Please sign in to comment.