import { type Service,
field,
referenceType,
nullableReferenceType,
objectType
} from '../yizy';
export const secretService: Service = {
serviceName: 'SecretService',
baseUrls: ['http://localhost:8080'],
endpoints: [
{
url: '/agents/getAgentByName',
name: 'getAgentByName',
requestModel: objectType('GetAgentByNameRequest',
[
field('name', 'string')
]),
responseModel: objectType('GetAgentByNameResponse',
[
field('error', nullableReferenceType('Grenade')),
field('agent', referenceType('Agent'))
])
}
],
referenceTypes: [
objectType('Agent', [
field('name', 'string'),
field('age', 'int'),
field('department', 'string')
]),
objectType('Grenade',
[
field('code', 'int'),
field('msg', 'string'),
field('name', 'string')
])
]
};
Tailored for Schema First API Design, Decoupling Frontend and Backend
Request and Response Model Generation for Server and Client
Instant Code Generation with Zero Configuration
Multi-Language Support
POST Request Under the Hood
Generate Open API Spec for Tool Chain Support