XWWitPark/witpark_server/controller/schema.js
2024-09-12 08:10:00 +08:00

76 lines
1.5 KiB
JavaScript

'use strict'
const typeStirng = { type: 'string' }
const typeArray = { type: 'array' }
const swiperSchema = {
schema: {
response: {
200: {
type: 'object',
properties: {
errno: { type: 'number' },
banner: typeArray,
itmes: {
type: 'object',
properties: {
link: typeStirng,
url: typeArray
}
}
}
}
}
}
}
const codeSchema = {
schema: {
response: {
200: {
type: 'object',
properties: {
errno: { type: 'number' },
message: typeStirng
}
}
}
}
}
const userSchema = {
schema: {
response: {
200: {
type: 'object',
properties: {
errno: { type: 'number' },
message: typeStirng
}
}
}
}
}
const loginSchema = {
schema: {
response: {
200: {
type: 'object',
properties: {
errno: { type: 'number' },
message: typeStirng,
token: typeStirng
}
}
}
}
}
module.exports = {
swiperSchema,
codeSchema,
userSchema,
loginSchema
}