diff --git a/src/.vuepress/theme/client/components/global/OpenApiPath.vue b/src/.vuepress/theme/client/components/global/OpenApiPath.vue index 4760625d..8d3209d0 100644 --- a/src/.vuepress/theme/client/components/global/OpenApiPath.vue +++ b/src/.vuepress/theme/client/components/global/OpenApiPath.vue @@ -17,7 +17,26 @@

{{ operation.description }}

- + + import {type OpenAPIV3_1 as OpenApiType} from 'openapi-types'; import OpenApiResponses from './OpenApiResponses.vue'; +import OpenApiRequestParam from './OpenApiRequestParam.vue'; import OpenApiOperation from './OpenApiOperation.vue'; defineProps<{ title: string; path: OpenApiType.PathItemObject; }>(); + +function isParameterType( + parameter: OpenApiType.ParameterObject | OpenApiType.ReferenceObject, +): parameter is OpenApiType.ParameterObject { + return 'in' in parameter && 'schema' in parameter; +} diff --git a/src/.vuepress/theme/client/components/global/OpenApiRequestParam.vue b/src/.vuepress/theme/client/components/global/OpenApiRequestParam.vue new file mode 100644 index 00000000..11e1bef2 --- /dev/null +++ b/src/.vuepress/theme/client/components/global/OpenApiRequestParam.vue @@ -0,0 +1,131 @@ + + + diff --git a/src/.vuepress/theme/client/components/global/OpenApiSchema.vue b/src/.vuepress/theme/client/components/global/OpenApiSchema.vue index c8e5216e..6f279b62 100644 --- a/src/.vuepress/theme/client/components/global/OpenApiSchema.vue +++ b/src/.vuepress/theme/client/components/global/OpenApiSchema.vue @@ -1,7 +1,5 @@