Skip to content

Commit 45c2054

Browse files
committed
feat(openapi-metadata): complete rewrite
1 parent 9244698 commit 45c2054

File tree

123 files changed

+1788
-4852
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+1788
-4852
lines changed

docs/.vitepress/en.ts

+18-11
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,23 @@ export const en = defineConfig({
7474
{ text: "Getting Started", link: "/openapi-react-query/" },
7575
{ text: "useQuery", link: "/openapi-react-query/use-query" },
7676
{ text: "useMutation", link: "/openapi-react-query/use-mutation" },
77-
{ text: "useSuspenseQuery", link: "/openapi-react-query/use-suspense-query" },
77+
{
78+
text: "useSuspenseQuery",
79+
link: "/openapi-react-query/use-suspense-query",
80+
},
7881
{ text: "About", link: "/openapi-react-query/about" },
7982
],
8083
},
8184
{
82-
text: "openapi-adonis",
85+
text: "openapi-metadata",
8386
items: [
84-
{ text: "Getting Started", link: "/openapi-adonis/" },
85-
],
86-
},
87-
{
88-
text: "openapi-decorators",
89-
items: [
90-
{ text: "Getting Started", link: "/openapi-decorators/" },
91-
{ text: "Decorators", link: "/openapi-decorators/decorators" },
87+
{ text: "Getting Started", link: "/openapi-metadata/" },
88+
{ text: "Decorators", link: "/openapi-metadata/decorators" },
89+
{ text: "Metadata", link: "/openapi-metadata/metadata" },
90+
{ text: "Type loader", link: "/openapi-metadata/type-loader" },
91+
{ text: "UI Integrations", link: "/openapi-metadata/ui" },
92+
{ text: "Examples", link: "/openapi-metadata/examples" },
93+
{ text: "About", link: "/openapi-metadata/about" },
9294
],
9395
},
9496
],
@@ -101,7 +103,12 @@ export const en = defineConfig({
101103
indexName: "openapi-ts",
102104
},
103105
},
104-
socialLinks: [{ icon: "github", link: "https://github.com/openapi-ts/openapi-typescript" }],
106+
socialLinks: [
107+
{
108+
icon: "github",
109+
link: "https://github.com/openapi-ts/openapi-typescript",
110+
},
111+
],
105112
footer: {
106113
message:
107114
'Released under the <a href="https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE">MIT License</a>.',

docs/data/contributors.json

+1-1
Large diffs are not rendered by default.

docs/openapi-adonis/decorators.md

-7
This file was deleted.

docs/openapi-adonis/index.md

-70
This file was deleted.

docs/openapi-decorators/decorators.md

-20
This file was deleted.

docs/openapi-decorators/index.md

-194
This file was deleted.

docs/openapi-metadata/about.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: About openapi-metadata
3+
description: openapi-metadata Project Goals, comparisons, and more
4+
---
5+
6+
<script setup>
7+
import { VPTeamMembers } from 'vitepress/theme';
8+
import contributors from '../data/contributors.json';
9+
</script>
10+
11+
# About
12+
13+
## Project Goals
14+
15+
1. Must respect the OpenAPI V3 specification
16+
2. Be extensible and easily integrated inside backend frameworks
17+
3. Be focused around developer experience
18+
19+
## Contributors
20+
21+
This library wouldn’t be possible without all these amazing contributors:
22+
23+
<VPTeamMembers size="small" :members="contributors['openapi-metadata']" />

docs/openapi-metadata/decorators.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Decorators
3+
---
4+
5+
# Decorators
6+
7+
Decorators are used to enrich your OpenAPI specifications. They can be applied on a Controller, a Method or a Model. They are all prefixed with `Api`.
8+
9+
> For more information about the decorators, you can directly refer to the [source code](https://github.com/openapi-ts/openapi-typescript/packages/openapi-metadata/src/decorators).
10+
11+
| Decorator | Usage | Description |
12+
| ----------------------- | ------------------- | ------------------------------------------------------------------------ |
13+
| `@ApiBody` | Method | Sets the requestBody of the operation. |
14+
| `@ApiCookie` | Controller / Method | Adds a cookie parameter to the operation(s). |
15+
| `@ApiExcludeController` | Method | Excludes the operations of this controller from the document generation. |
16+
| `@ApiExcludeOperation` | Method | Excludes this operation from the document generation. |
17+
| `@ApiExtraModels` | Controller | Adds extra models to be loaded in the schema. |
18+
| `@ApiHeader` | Controller / Method | Adds a header parameter to the operation(s). |
19+
| `@ApiOperation` | Method | Configures an operation. |
20+
| `@ApiParam` | Controller / Method | Adds a path parameter to the operation(s). |
21+
| `@ApiProperty` | Model | Configures a schema property property. |
22+
| `@ApiQuery` | Controller / Method | Adds a query parameter to the operation(s). |
23+
| `@ApiResponse` | Controller / Method | Adds a response to the operation(s). |
24+
| `@ApiSecurity` | Controller / Method | Sets the security scheme to the operation(s). |
25+
| `@ApiTags` | Controller / Method | Adds tags to the operation(s). |

0 commit comments

Comments
 (0)