{
    "openrpc": "1.0.0-rc1",
    "info": {
        "version": "1.0.0",
        "title": "Petstore Expanded",
        "description": "A sample API that uses a petstore as an example to demonstrate features in the OpenRPC specification",
        "termsOfService": "https://open-rpc.org",
        "contact": {
            "name": "OpenRPC Team",
            "email": "doesntexist@open-rpc.org",
            "url": "https://open-rpc.org"
        },
        "license": {
            "name": "Apache 2.0",
            "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
        }
    },
    "servers": [
        {
            "url": "http://petstore.open-rpc.org"
        }
    ],
    "methods": [
        {
            "name": "get_pets",
            "description": "Returns all pets from the system that the user has access to\nNam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam.",
            "params": [
                {
                    "name": "tags",
                    "description": "tags to filter by",
                    "schema": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                {
                    "name": "limit",
                    "description": "maximum number of results to return",
                    "schema": {
                        "type": "integer"
                    }
                }
            ],
            "result": {
                "name": "pet",
                "description": "pet response",
                "schema": {
                    "type": "array",
                    "items": {
                        "$ref": "#/components/schemas/Pet"
                    }
                }
            }
        },
        {
            "name": "create_pet",
            "description": "Creates a new pet in the store.  Duplicates are allowed",
            "params": [
                {
                    "name": "newPet",
                    "description": "Pet to add to the store.",
                    "schema": {
                        "$ref": "#/components/schemas/NewPet"
                    }
                }
            ],
            "result": {
                "name": "pet",
                "description": "the newly created pet",
                "schema": {
                    "$ref": "#/components/schemas/Pet"
                }
            }
        },
        {
            "name": "get_pet_by_id",
            "description": "Returns a user based on a single ID, if the user does not have access to the pet",
            "params": [
                {
                    "name": "id",
                    "description": "ID of pet to fetch",
                    "required": true,
                    "schema": {
                        "type": "integer"
                    }
                }
            ],
            "result": {
                "name": "pet",
                "description": "pet response",
                "schema": {
                    "$ref": "#/components/schemas/Pet"
                }
            }
        },
        {
            "name": "delete_pet_by_id",
            "description": "deletes a single pet based on the ID supplied",
            "params": [
                {
                    "name": "id",
                    "description": "ID of pet to delete",
                    "required": true,
                    "schema": {
                        "type": "integer"
                    }
                }
            ],
            "result": {
                "name": "pet",
                "description": "pet deleted",
                "schema": {}
            }
        }
    ],
    "components": {
        "schemas": {
            "Pet": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/NewPet"
                    },
                    {
                        "required": [
                            "id"
                        ],
                        "properties": {
                            "id": {
                                "type": "integer"
                            }
                        }
                    }
                ]
            },
            "NewPet": {
                "type": "object",
                "required": [
                    "name"
                ],
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "tag": {
                        "type": "string"
                    }
                }
            }
        }
    }
}
