OSTRICHE

OSTRICHE · GPT 작업

Ostriche Online

  • GET /ostricheLista di tutte le ostriche
  • POST /ostricheCrea una nuova ostrica
  • GET /ostriche/{ostricaId}Informazioni su una specifica ostrica
원본 API 스키마
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Ostriche Online",
    "license": {
      "name": "MIT"
    }
  },
  "servers": [
    {
      "url": "https://www.ostricheonline.com/shop-ostriche-vino/OSTRICHE-c56376085"
    }
  ],
  "paths": {
    "/ostriche": {
      "get": {
        "summary": "Lista di tutte le ostriche",
        "operationId": "listOstriche",
        "tags": [
          "ostriche"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Quanti elementi restituire alla volta (max 100)",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Un array di ostriche paginato",
            "headers": {
              "x-next": {
                "description": "Un link alla pagina successiva di risposte",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ostriche"
                }
              }
            }
          },
          "default": {
            "description": "errore inaspettato",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Crea una nuova ostrica",
        "operationId": "createOstriche",
        "tags": [
          "ostriche"
        ],
        "responses": {
          "201": {
            "description": "Risposta nulla"
          },
          "default": {
            "description": "errore inaspettato",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ostriche/{ostricaId}": {
      "get": {
        "summary": "Informazioni su una specifica ostrica",
        "operationId": "showOstricaById",
        "tags": [
          "ostriche"
        ],
        "parameters": [
          {
            "name": "ostricaId",
            "in": "path",
            "required": true,
            "description": "L'id dell'ostrica da recuperare",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Risposta attesa per una richiesta valida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ostrica"
                }
              }
            }
          },
          "default": {
            "description": "errore inaspettato",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Ostrica": {
        "type": "object",
        "required": [
          "id",
          "nome"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "nome": {
            "type": "string"
          },
          "tag": {
            "type": "string"
          }
        }
      },
      "Ostriche": {
        "type": "array",
        "maxItems": 100,
        "items": {
          "$ref": "#/components/schemas/Ostrica"
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "codice",
          "messaggio"
        ],
        "properties": {
          "codice": {
            "type": "integer",
            "format": "int32"
          },
          "messaggio": {
            "type": "string"
          }
        }
      }
    }
  }
}