YIZY API Spec

Write API spec in Typescript with code completion then upload your json! Check the getting started page on how to get started.

Json

{
    "serviceName": "SecretService",
    "baseUrls": [
        "http://localhost:4010",
        "http://localhost:8080"
    ],
    "endpoints": [
        {
            "url": "/agents/getAgentByName",
            "name": "getAgentByName",
            "requestModel": {
                "name": "GetAgentByNameRequest",
                "fields": [
                    {
                        "name": "name",
                        "type": "string"
                    }
                ],
                "type": "Object"
            },
            "responseModel": {
                "name": "GetAgentByNameResponse",
                "fields": [
                    {
                        "name": "error",
                        "type": {
                            "ref": "Grenade",
                            "type": "NullableReference"
                        }
                    },
                    {
                        "name": "agent",
                        "type": {
                            "ref": "Agent",
                            "type": "Reference"
                        }
                    }
                ],
                "type": "Object"
            }
        }
    ],
    "referenceTypes": [
        {
            "name": "Agent",
            "fields": [
                {
                    "name": "name",
                    "type": "string"
                },
                {
                    "name": "age",
                    "type": "int"
                },
                {
                    "name": "department",
                    "type": "string"
                }
            ],
            "type": "Object"
        },
        {
            "name": "Grenade",
            "fields": [
                {
                    "name": "code",
                    "type": "int"
                },
                {
                    "name": "msg",
                    "type": "string"
                },
                {
                    "name": "name",
                    "type": "string"
                }
            ],
            "type": "Object"
        }
    ]
}