Skip to content

Commit 0e5b748

Browse files
committed
feat(openapi-metadata): complete rewrite
1 parent 0edc226 commit 0e5b748

File tree

123 files changed

+1795
-5305
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

+1795
-5305
lines changed

docs/.vitepress/en.ts

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,14 @@ export default defineConfig({
7575
{ text: "Getting Started", link: "/openapi-react-query/" },
7676
{ text: "useQuery", link: "/openapi-react-query/use-query" },
7777
{ text: "useMutation", link: "/openapi-react-query/use-mutation" },
78-
{ text: "useSuspenseQuery", link: "/openapi-react-query/use-suspense-query" },
79-
{ text: "queryOptions", link: "/openapi-react-query/query-options" },
78+
{
79+
text: "useSuspenseQuery",
80+
link: "/openapi-react-query/use-suspense-query",
81+
},
82+
{
83+
text: "queryOptions",
84+
link: "/openapi-react-query/query-options",
85+
},
8086
{ text: "About", link: "/openapi-react-query/about" },
8187
],
8288
},
@@ -94,10 +100,15 @@ export default defineConfig({
94100
],
95101
},
96102
{
97-
text: "openapi-decorators",
103+
text: "openapi-metadata",
98104
items: [
99-
{ text: "Getting Started", link: "/openapi-decorators/" },
100-
{ text: "Decorators", link: "/openapi-decorators/decorators" },
105+
{ text: "Getting Started", link: "/openapi-metadata/" },
106+
{ text: "Decorators", link: "/openapi-metadata/decorators" },
107+
{ text: "Metadata", link: "/openapi-metadata/metadata" },
108+
{ text: "Type loader", link: "/openapi-metadata/type-loader" },
109+
{ text: "UI Integrations", link: "/openapi-metadata/ui" },
110+
{ text: "Examples", link: "/openapi-metadata/examples" },
111+
{ text: "About", link: "/openapi-metadata/about" },
101112
],
102113
},
103114
],
@@ -110,6 +121,12 @@ export default defineConfig({
110121
indexName: "openapi-ts",
111122
},
112123
},
124+
socialLinks: [
125+
{
126+
icon: "github",
127+
link: "https://github.com/openapi-ts/openapi-typescript",
128+
},
129+
],
113130
footer: {
114131
message:
115132
'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

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/openapi-adonis/decorators.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/openapi-adonis/index.md

Lines changed: 0 additions & 70 deletions
This file was deleted.

docs/openapi-decorators/decorators.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/openapi-decorators/index.md

Lines changed: 0 additions & 194 deletions
This file was deleted.

docs/openapi-metadata/about.md

Lines changed: 23 additions & 0 deletions
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

Lines changed: 25 additions & 0 deletions
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)