YIZY API

Aggressively Simple Json RPC

Powered By Post Request

Write API Spec in Typescript and Generate Typesafe Models, Http Client SDKs, API Documentation, and Open API Specification in an Instant with Zero Configs.

 
 

Instant Code Generation with Zero Config


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')
                   ])
	]
};
 
 

What Makes it YIZY?

Schema First Design

Tailored for Schema First API Design, Decoupling Frontend and Backend

E2E Type Safety

Request and Response Model Generation for Server and Client

Blazingly Fast Code Genenration

Instant Code Generation with Zero Configuration

Language Agnostic

Multi-Language Support

Aggressively Simple

POST Request Under the Hood

Open API Spec Support

Generate Open API Spec for Tool Chain Support