{
  "openapi": "3.0.3",
  "info": {
    "title": "vorbesteromana.de Open Data API",
    "version": "1.0.0",
    "description": "API static, read-only, fără cheie, cu servicii din Germania unde se vorbește română. Fiecare intrare are sourceUrl și verifiedOn. Licență CC BY 4.0, atribuire „vorbesteromana.de”.",
    "license": {
      "name": "CC BY 4.0",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    },
    "contact": {
      "email": "robertaremare@gmail.com",
      "url": "https://vorbesteromana.de/api/"
    }
  },
  "servers": [
    {
      "url": "https://vorbesteromana.de"
    }
  ],
  "paths": {
    "/api/listings.json": {
      "get": {
        "operationId": "listAllListings",
        "summary": "Toate intrările",
        "description": "Returnează toate cele 563 intrări verificate.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "lastVerified": {
                      "type": "string",
                      "format": "date"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "license": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        },
                        "attribution": {
                          "type": "string"
                        }
                      }
                    },
                    "listings": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Listing"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/listings.csv": {
      "get": {
        "operationId": "downloadListingsCsv",
        "summary": "Toate intrările în CSV",
        "description": "Aceleași date ca listings.json, format CSV (UTF-8).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/{oras}/{categorie}.json": {
      "get": {
        "operationId": "listListingsByCityAndCategory",
        "summary": "Intrări după oraș și categorie",
        "description": "Ex. /api/muenchen/stomatolog.json. Slug-urile apar în listings.json (citySlug, categorySlug).",
        "parameters": [
          {
            "name": "oras",
            "in": "path",
            "required": true,
            "description": "Slug oraș (citySlug)",
            "schema": {
              "type": "string",
              "example": "muenchen"
            }
          },
          {
            "name": "categorie",
            "in": "path",
            "required": true,
            "description": "Slug categorie (categorySlug)",
            "schema": {
              "type": "string",
              "example": "stomatolog"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "lastVerified": {
                      "type": "string"
                    },
                    "license": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        },
                        "attribution": {
                          "type": "string"
                        }
                      }
                    },
                    "listings": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Listing"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resursa nu există",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/events.json": {
      "get": {
        "operationId": "listUpcomingEvents",
        "summary": "Evenimente românești viitoare",
        "description": "Petreceri, concerte și evenimente românești viitoare în Germania, cu sursă.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "license": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        },
                        "attribution": {
                          "type": "string"
                        }
                      }
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Event"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Listing": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "categorySlug": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "cityDetail": {
            "type": "string"
          },
          "citySlug": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "description": "Bundesland"
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true,
            "description": "Doar numere de firmă publicate de sursă"
          },
          "website": {
            "type": "string",
            "nullable": true
          },
          "languages": {
            "type": "string",
            "description": "Limbile menționate de sursă"
          },
          "sourceUrl": {
            "type": "string",
            "format": "uri",
            "description": "Sursa publică ce confirmă limba română"
          },
          "verifiedOn": {
            "type": "string",
            "format": "date"
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "path": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "category",
          "city",
          "sourceUrl",
          "verifiedOn"
        ]
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "start": {
            "type": "string"
          },
          "end": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "venue": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "organizer": {
            "type": "string",
            "nullable": true
          },
          "price": {
            "type": "string",
            "nullable": true
          },
          "sourceUrl": {
            "type": "string"
          },
          "verifiedOn": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "resolution": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  },
  "x-cities": 277,
  "x-categories": [
    "agentie-de-munca",
    "asigurari",
    "asociatie-culturala",
    "avocat",
    "biserica",
    "consiliere-sociala",
    "consultant-fiscal",
    "consultanta",
    "farmacie",
    "ginecolog",
    "institutie",
    "magazin-romanesc",
    "medic-de-familie",
    "medic-internist",
    "medic-specialist",
    "pediatru",
    "psiholog",
    "restaurant",
    "service-auto",
    "stomatolog",
    "scoala-de-soferi",
    "traducator-autorizat",
    "traduceri",
    "transport-romania-germania"
  ]
}