Skip to content

Commit

Permalink
feat(openapi-metadata): complete rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
kerwanp committed Nov 6, 2024
1 parent 9244698 commit 45c2054
Show file tree
Hide file tree
Showing 123 changed files with 1,788 additions and 4,852 deletions.
29 changes: 18 additions & 11 deletions docs/.vitepress/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,23 @@ export const en = defineConfig({
{ text: "Getting Started", link: "/openapi-react-query/" },
{ text: "useQuery", link: "/openapi-react-query/use-query" },
{ text: "useMutation", link: "/openapi-react-query/use-mutation" },
{ text: "useSuspenseQuery", link: "/openapi-react-query/use-suspense-query" },
{
text: "useSuspenseQuery",
link: "/openapi-react-query/use-suspense-query",
},
{ text: "About", link: "/openapi-react-query/about" },
],
},
{
text: "openapi-adonis",
text: "openapi-metadata",
items: [
{ text: "Getting Started", link: "/openapi-adonis/" },
],
},
{
text: "openapi-decorators",
items: [
{ text: "Getting Started", link: "/openapi-decorators/" },
{ text: "Decorators", link: "/openapi-decorators/decorators" },
{ text: "Getting Started", link: "/openapi-metadata/" },
{ text: "Decorators", link: "/openapi-metadata/decorators" },
{ text: "Metadata", link: "/openapi-metadata/metadata" },
{ text: "Type loader", link: "/openapi-metadata/type-loader" },
{ text: "UI Integrations", link: "/openapi-metadata/ui" },
{ text: "Examples", link: "/openapi-metadata/examples" },
{ text: "About", link: "/openapi-metadata/about" },
],
},
],
Expand All @@ -101,7 +103,12 @@ export const en = defineConfig({
indexName: "openapi-ts",
},
},
socialLinks: [{ icon: "github", link: "https://github.com/openapi-ts/openapi-typescript" }],
socialLinks: [
{
icon: "github",
link: "https://github.com/openapi-ts/openapi-typescript",
},
],
footer: {
message:
'Released under the <a href="https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE">MIT License</a>.',
Expand Down
2 changes: 1 addition & 1 deletion docs/data/contributors.json

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions docs/openapi-adonis/decorators.md

This file was deleted.

70 changes: 0 additions & 70 deletions docs/openapi-adonis/index.md

This file was deleted.

20 changes: 0 additions & 20 deletions docs/openapi-decorators/decorators.md

This file was deleted.

194 changes: 0 additions & 194 deletions docs/openapi-decorators/index.md

This file was deleted.

23 changes: 23 additions & 0 deletions docs/openapi-metadata/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: About openapi-metadata
description: openapi-metadata Project Goals, comparisons, and more
---

<script setup>
import { VPTeamMembers } from 'vitepress/theme';
import contributors from '../data/contributors.json';
</script>

# About

## Project Goals

1. Must respect the OpenAPI V3 specification
2. Be extensible and easily integrated inside backend frameworks
3. Be focused around developer experience

## Contributors

This library wouldn’t be possible without all these amazing contributors:

<VPTeamMembers size="small" :members="contributors['openapi-metadata']" />
25 changes: 25 additions & 0 deletions docs/openapi-metadata/decorators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Decorators
---

# Decorators

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`.

> 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).
| Decorator | Usage | Description |
| ----------------------- | ------------------- | ------------------------------------------------------------------------ |
| `@ApiBody` | Method | Sets the requestBody of the operation. |
| `@ApiCookie` | Controller / Method | Adds a cookie parameter to the operation(s). |
| `@ApiExcludeController` | Method | Excludes the operations of this controller from the document generation. |
| `@ApiExcludeOperation` | Method | Excludes this operation from the document generation. |
| `@ApiExtraModels` | Controller | Adds extra models to be loaded in the schema. |
| `@ApiHeader` | Controller / Method | Adds a header parameter to the operation(s). |
| `@ApiOperation` | Method | Configures an operation. |
| `@ApiParam` | Controller / Method | Adds a path parameter to the operation(s). |
| `@ApiProperty` | Model | Configures a schema property property. |
| `@ApiQuery` | Controller / Method | Adds a query parameter to the operation(s). |
| `@ApiResponse` | Controller / Method | Adds a response to the operation(s). |
| `@ApiSecurity` | Controller / Method | Sets the security scheme to the operation(s). |
| `@ApiTags` | Controller / Method | Adds tags to the operation(s). |
Loading

0 comments on commit 45c2054

Please sign in to comment.