feat(api): add openapi tags
This commit is contained in:
parent
ab0286fd71
commit
415bba96f0
@ -7,6 +7,7 @@ import { HTTPException } from 'hono/http-exception'
|
|||||||
export const route = createRoute({
|
export const route = createRoute({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
path: '/:id',
|
path: '/:id',
|
||||||
|
tags: ['changelog'],
|
||||||
request: {
|
request: {
|
||||||
params: ChangelogByIdParams,
|
params: ChangelogByIdParams,
|
||||||
},
|
},
|
||||||
|
@ -9,6 +9,7 @@ import { verifyAuthentication } from '../../utils/authentication'
|
|||||||
export const route = createRoute({
|
export const route = createRoute({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
path: '/',
|
path: '/',
|
||||||
|
tags: ['commit'],
|
||||||
request: {
|
request: {
|
||||||
body: {
|
body: {
|
||||||
content: {
|
content: {
|
||||||
|
@ -10,6 +10,7 @@ import { verifyAuthentication } from '../../utils/authentication'
|
|||||||
const route = createRoute({
|
const route = createRoute({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
path: '/',
|
path: '/',
|
||||||
|
tags: ['commit'],
|
||||||
request: {
|
request: {
|
||||||
query: CommitListParams,
|
query: CommitListParams,
|
||||||
},
|
},
|
||||||
|
@ -8,6 +8,7 @@ import { createRoute, type z } from '@hono/zod-openapi'
|
|||||||
export const route = createRoute({
|
export const route = createRoute({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
path: '/',
|
path: '/',
|
||||||
|
tags: ['changelog'],
|
||||||
request: {
|
request: {
|
||||||
body: {
|
body: {
|
||||||
content: {
|
content: {
|
||||||
|
@ -7,6 +7,7 @@ import { HTTPException } from 'hono/http-exception'
|
|||||||
export const route = createRoute({
|
export const route = createRoute({
|
||||||
method: 'delete',
|
method: 'delete',
|
||||||
path: '/:id',
|
path: '/:id',
|
||||||
|
tags: ['changelog'],
|
||||||
responses: {
|
responses: {
|
||||||
200: {
|
200: {
|
||||||
content: {
|
content: {
|
||||||
|
@ -6,6 +6,7 @@ import { eq } from 'drizzle-orm'
|
|||||||
export const route = createRoute({
|
export const route = createRoute({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
path: '/',
|
path: '/',
|
||||||
|
tags: ['changelog'],
|
||||||
responses: {
|
responses: {
|
||||||
200: {
|
200: {
|
||||||
content: {
|
content: {
|
||||||
|
@ -6,6 +6,7 @@ import { and, eq } from 'drizzle-orm'
|
|||||||
export const byId = createRoute({
|
export const byId = createRoute({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
path: '/:id',
|
path: '/:id',
|
||||||
|
tags: ['version'],
|
||||||
request: {
|
request: {
|
||||||
params: VersionByIdParams,
|
params: VersionByIdParams,
|
||||||
},
|
},
|
||||||
|
@ -13,6 +13,7 @@ import semver from 'semver'
|
|||||||
export const create = createRoute({
|
export const create = createRoute({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
path: '/',
|
path: '/',
|
||||||
|
tags: ['version'],
|
||||||
request: {
|
request: {
|
||||||
body: {
|
body: {
|
||||||
content: {
|
content: {
|
||||||
|
@ -7,6 +7,7 @@ import { HTTPException } from 'hono/http-exception'
|
|||||||
export const remove = createRoute({
|
export const remove = createRoute({
|
||||||
method: 'delete',
|
method: 'delete',
|
||||||
path: '/:id',
|
path: '/:id',
|
||||||
|
tags: ['version'],
|
||||||
responses: {
|
responses: {
|
||||||
200: {
|
200: {
|
||||||
content: {
|
content: {
|
||||||
|
@ -7,6 +7,7 @@ import { HTTPException } from 'hono/http-exception'
|
|||||||
export const update = createRoute({
|
export const update = createRoute({
|
||||||
method: 'put',
|
method: 'put',
|
||||||
path: '/:id',
|
path: '/:id',
|
||||||
|
tags: ['version'],
|
||||||
request: {
|
request: {
|
||||||
body: {
|
body: {
|
||||||
content: {
|
content: {
|
||||||
|
@ -8,6 +8,7 @@ import { verifyAuthentication } from '../utils/authentication'
|
|||||||
|
|
||||||
const route = createRoute({
|
const route = createRoute({
|
||||||
method: 'delete',
|
method: 'delete',
|
||||||
|
tags: ['page'],
|
||||||
path: '/:id',
|
path: '/:id',
|
||||||
request: {
|
request: {
|
||||||
params: PageByIdParams,
|
params: PageByIdParams,
|
||||||
|
Loading…
Reference in New Issue
Block a user