76 lines
1.5 KiB
JavaScript
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
|
||
|
}
|