chore: Simplified payloads and endpoints

This commit is contained in:
Davidson Gomes
2024-06-07 13:00:35 -03:00
parent a578384e85
commit 8fd082ad80
25 changed files with 1329 additions and 1403 deletions

View File

@@ -0,0 +1,19 @@
import { JSONSchema7 } from 'json-schema';
import { v4 } from 'uuid';
import { isNotEmpty } from './validate.schema';
export const proxySchema: JSONSchema7 = {
$id: v4(),
type: 'object',
properties: {
enabled: { type: 'boolean', enum: [true, false] },
host: { type: 'string' },
port: { type: 'string' },
protocol: { type: 'string' },
username: { type: 'string' },
password: { type: 'string' },
},
required: ['enabled', 'host', 'port', 'protocol'],
...isNotEmpty('enabled', 'host', 'port', 'protocol'),
};