feat(api): add openapi tags

This commit is contained in:
Lars Hampe 2024-10-29 22:08:10 +01:00
parent ab0286fd71
commit 415bba96f0
11 changed files with 11 additions and 0 deletions

View File

@ -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,
}, },

View File

@ -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: {

View File

@ -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,
}, },

View File

@ -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: {

View File

@ -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: {

View File

@ -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: {

View File

@ -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,
}, },

View File

@ -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: {

View File

@ -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: {

View File

@ -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: {

View File

@ -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,