{"openapi":"3.0.0","paths":{"/api/v1/health":{"get":{"operationId":"HealthController_check","parameters":[],"responses":{"200":{"description":"Service is healthy"},"503":{"description":"Service is unhealthy"}},"summary":"Health check endpoint","tags":["Health"]}},"/api/v1/status":{"get":{"operationId":"StatusController_getStatus","parameters":[],"responses":{"200":{"description":"Service status with dependency health","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponseDto"}}}}},"summary":"Detailed service status for all dependencies","tags":["Health"]}},"/api/v1/movies/search":{"get":{"operationId":"MoviesController_search","parameters":[{"name":"q","required":true,"in":"query","description":"Search query string","schema":{"minLength":1,"example":"batman","type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResultDto"}}}},"400":{"description":"Invalid query parameters"},"429":{"description":"Too many requests"}},"summary":"Search movies by text","tags":["Movies"]}},"/api/v1/movies/popular":{"get":{"operationId":"MoviesController_getPopular","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}}],"responses":{"200":{"description":"Popular movies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResultDto"}}}}},"summary":"Get popular movies","tags":["Movies"]}},"/api/v1/movies/top-rated":{"get":{"operationId":"MoviesController_getTopRated","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}}],"responses":{"200":{"description":"Top rated movies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResultDto"}}}}},"summary":"Get top rated movies","tags":["Movies"]}},"/api/v1/movies/upcoming":{"get":{"operationId":"MoviesController_getUpcoming","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}}],"responses":{"200":{"description":"Upcoming movies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResultDto"}}}}},"summary":"Get upcoming movies","tags":["Movies"]}},"/api/v1/movies/{id}":{"get":{"operationId":"MoviesController_getById","parameters":[{"name":"id","required":true,"in":"path","description":"Movie ID","schema":{"type":"number"}}],"responses":{"200":{"description":"Movie details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovieDetailDto"}}}},"404":{"description":"Movie not found"}},"summary":"Get movie by ID","tags":["Movies"]}},"/api/v1/movies/{id}/similar":{"get":{"operationId":"MoviesController_getSimilar","parameters":[{"name":"id","required":true,"in":"path","description":"Movie ID","schema":{"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}}],"responses":{"200":{"description":"Similar movies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResultDto"}}}}},"summary":"Get similar movies","tags":["Movies"]}},"/api/v1/genres":{"get":{"operationId":"GenresController_getAll","parameters":[],"responses":{"200":{"description":"List of genres","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenresResultDto"}}}}},"summary":"Get all movie genres","tags":["Genres"]}},"/api/v1/genres/{id}/movies":{"get":{"operationId":"GenresController_getMoviesByGenre","parameters":[{"name":"id","required":true,"in":"path","description":"Genre ID","schema":{"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}}],"responses":{"200":{"description":"Movies in genre","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResultDto"}}}}},"summary":"Get movies by genre","tags":["Genres"]}},"/api/v1/metrics/top-searches":{"get":{"description":"Returns the most popular search terms within the specified time period","operationId":"MetricsController_getTopSearches","parameters":[{"name":"period","required":false,"in":"query","description":"Time period for metrics","schema":{"default":"7d","example":"7d","type":"string","enum":["1h","6h","12h","24h","7d","30d","90d"]}},{"name":"limit","required":false,"in":"query","description":"Number of results to return","schema":{"minimum":1,"maximum":100,"default":10,"example":10,"type":"number"}}],"responses":{"200":{"description":"Top search terms retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopSearchesResponseDto"}}}}},"summary":"Get top search terms","tags":["Metrics"]}},"/api/v1/metrics/top-movies":{"get":{"description":"Returns the most viewed movies within the specified time period","operationId":"MetricsController_getTopMovies","parameters":[{"name":"period","required":false,"in":"query","description":"Time period for metrics","schema":{"default":"7d","example":"7d","type":"string","enum":["1h","6h","12h","24h","7d","30d","90d"]}},{"name":"limit","required":false,"in":"query","description":"Number of results to return","schema":{"minimum":1,"maximum":100,"default":10,"example":10,"type":"number"}}],"responses":{"200":{"description":"Top movies retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopMoviesResponseDto"}}}}},"summary":"Get most viewed movies","tags":["Metrics"]}},"/api/v1/metrics/requests-per-hour":{"get":{"description":"Returns the number of API requests grouped by hour","operationId":"MetricsController_getRequestsPerHour","parameters":[{"name":"period","required":false,"in":"query","description":"Time period for metrics","schema":{"default":"7d","example":"7d","type":"string","enum":["1h","6h","12h","24h","7d","30d","90d"]}},{"name":"limit","required":false,"in":"query","description":"Number of results to return","schema":{"minimum":1,"maximum":100,"default":10,"example":10,"type":"number"}}],"responses":{"200":{"description":"Requests per hour retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestsPerHourResponseDto"}}}}},"summary":"Get requests per hour","tags":["Metrics"]}},"/api/v1/metrics/endpoints-usage":{"get":{"description":"Returns usage statistics for each API endpoint including request count and average response time","operationId":"MetricsController_getEndpointsUsage","parameters":[{"name":"period","required":false,"in":"query","description":"Time period for metrics","schema":{"default":"7d","example":"7d","type":"string","enum":["1h","6h","12h","24h","7d","30d","90d"]}},{"name":"limit","required":false,"in":"query","description":"Number of results to return","schema":{"minimum":1,"maximum":100,"default":10,"example":10,"type":"number"}}],"responses":{"200":{"description":"Endpoints usage statistics retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointsUsageResponseDto"}}}}},"summary":"Get endpoints usage statistics","tags":["Metrics"]}},"/api/v1/metrics/summary":{"get":{"description":"Returns a comprehensive summary of all API metrics including total requests, unique visitors, and cache performance","operationId":"MetricsController_getSummary","parameters":[{"name":"period","required":false,"in":"query","description":"Time period for metrics","schema":{"default":"7d","example":"7d","type":"string","enum":["1h","6h","12h","24h","7d","30d","90d"]}},{"name":"limit","required":false,"in":"query","description":"Number of results to return","schema":{"minimum":1,"maximum":100,"default":10,"example":10,"type":"number"}}],"responses":{"200":{"description":"Metrics summary retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsSummaryResponseDto"}}}}},"summary":"Get metrics summary","tags":["Metrics"]}},"/api/v1/swapi/people":{"get":{"operationId":"SwapiController_getPeople","parameters":[{"name":"search","required":false,"in":"query","description":"Search query string","schema":{"example":"luke","type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"example":1,"type":"number"}}],"responses":{"200":{"description":"People results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapiPeopleResultDto"}}}},"400":{"description":"Invalid query parameters"}},"summary":"List or search Star Wars people","tags":["SWAPI"]}},"/api/v1/swapi/people/{id}":{"get":{"operationId":"SwapiController_getPersonById","parameters":[{"name":"id","required":true,"in":"path","description":"Person ID","schema":{"type":"number"}}],"responses":{"200":{"description":"Person details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapiPersonDetailDto"}}}},"404":{"description":"Person not found"}},"summary":"Get a Star Wars person by ID","tags":["SWAPI"]}},"/api/v1/swapi/planets":{"get":{"operationId":"SwapiController_getPlanets","parameters":[{"name":"search","required":false,"in":"query","description":"Search query string","schema":{"example":"luke","type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"example":1,"type":"number"}}],"responses":{"200":{"description":"Planets results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapiPlanetsResultDto"}}}},"400":{"description":"Invalid query parameters"}},"summary":"List or search Star Wars planets","tags":["SWAPI"]}},"/api/v1/swapi/planets/{id}":{"get":{"operationId":"SwapiController_getPlanetById","parameters":[{"name":"id","required":true,"in":"path","description":"Planet ID","schema":{"type":"number"}}],"responses":{"200":{"description":"Planet details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapiPlanetDetailDto"}}}},"404":{"description":"Planet not found"}},"summary":"Get a Star Wars planet by ID","tags":["SWAPI"]}},"/api/v1/swapi/films":{"get":{"operationId":"SwapiController_getFilms","parameters":[{"name":"search","required":false,"in":"query","description":"Search query string","schema":{"example":"luke","type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"example":1,"type":"number"}}],"responses":{"200":{"description":"Films results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapiFilmsResultDto"}}}},"400":{"description":"Invalid query parameters"}},"summary":"List or search Star Wars films","tags":["SWAPI"]}},"/api/v1/swapi/films/{id}":{"get":{"operationId":"SwapiController_getFilmById","parameters":[{"name":"id","required":true,"in":"path","description":"Film ID","schema":{"type":"number"}}],"responses":{"200":{"description":"Film details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapiFilmDetailDto"}}}},"404":{"description":"Film not found"}},"summary":"Get a Star Wars film by ID","tags":["SWAPI"]}},"/api/v1/swapi/starships":{"get":{"operationId":"SwapiController_getStarships","parameters":[{"name":"search","required":false,"in":"query","description":"Search query string","schema":{"example":"luke","type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"example":1,"type":"number"}}],"responses":{"200":{"description":"Starships results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapiStarshipsResultDto"}}}},"400":{"description":"Invalid query parameters"}},"summary":"List or search Star Wars starships","tags":["SWAPI"]}},"/api/v1/swapi/starships/{id}":{"get":{"operationId":"SwapiController_getStarshipById","parameters":[{"name":"id","required":true,"in":"path","description":"Starship ID","schema":{"type":"number"}}],"responses":{"200":{"description":"Starship details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapiStarshipDetailDto"}}}},"404":{"description":"Starship not found"}},"summary":"Get a Star Wars starship by ID","tags":["SWAPI"]}}},"info":{"title":"APIs4Dev - Public API Gateway","description":"## Overview\nAPI Gateway que expone datos de multiples fuentes externas (TMDB, SWAPI) con cache persistente en MongoDB y cache rapido en Redis.\n\n## APIs disponibles\n- **Movies** (TMDB): Busqueda, populares, top-rated, upcoming, detalle, similares, por genero\n- **SWAPI** (Star Wars): People, planets, films, starships con busqueda y detalle\n- **Genres**: Generos de peliculas\n- **Metrics**: Estadisticas de uso de la API\n\n## Cache de 3 capas\n1. **Redis** - Cache rapido con TTL (minutos/horas)\n2. **MongoDB** - Cache persistente (no expira)\n3. **API externa** - Solo se consulta si no hay datos en cache\n\n## Rate Limiting\n- General: 100 requests / 15 minutos por IP\n- Search: 30 requests / minuto por IP\n\n## Headers de respuesta\n- `X-Response-Time`: Tiempo de respuesta en ms\n- `X-Cache-Hit`: Si la respuesta vino de cache\n\n## Importar API\n- OpenAPI JSON: `/api/docs-json`\n- OpenAPI YAML: `/api/docs-yaml`\n\n## Codigos de error\n- `400`: Parametros invalidos\n- `404`: Recurso no encontrado\n- `429`: Rate limit excedido\n- `503`: Servicio externo no disponible\n","version":"1.0.0","contact":{"name":"kokixx19","url":"https://github.com/kokixx19","email":"jorge.cortes.mail@gmail.com"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"tags":[{"name":"Movies","description":"Busqueda y consulta de peliculas (TMDB)"},{"name":"Genres","description":"Generos de peliculas"},{"name":"SWAPI","description":"Star Wars API - People, Planets, Films, Starships"},{"name":"Metrics","description":"Estadisticas y analiticas de uso"},{"name":"Health","description":"Health check para monitoreo"}],"servers":[{"url":"https://api4devs.com","description":"Production"},{"url":"http://localhost:3000","description":"Development"}],"components":{"schemas":{"ServiceStatusDto":{"type":"object","properties":{"status":{"type":"string","example":"up","enum":["up","down"],"description":"Service status"},"latencyMs":{"type":"number","example":1,"description":"Latency in milliseconds"}},"required":["status","latencyMs"]},"ServicesDto":{"type":"object","properties":{"database":{"description":"Database status","allOf":[{"$ref":"#/components/schemas/ServiceStatusDto"}]},"cache":{"description":"Cache service status","allOf":[{"$ref":"#/components/schemas/ServiceStatusDto"}]},"queue":{"description":"Message queue status","allOf":[{"$ref":"#/components/schemas/ServiceStatusDto"}]}},"required":["database","cache","queue"]},"StatusResponseDto":{"type":"object","properties":{"status":{"type":"string","example":"healthy","enum":["healthy","degraded","unhealthy"],"description":"Overall system status"},"version":{"type":"string","example":"0.0.1","description":"API version"},"environment":{"type":"string","example":"production","description":"Current environment"},"uptime":{"type":"number","example":3600,"description":"Uptime in seconds"},"timestamp":{"type":"string","example":"2026-02-11T20:00:00.000Z","description":"Timestamp of the check"},"services":{"description":"Individual service statuses","allOf":[{"$ref":"#/components/schemas/ServicesDto"}]}},"required":["status","version","environment","uptime","timestamp","services"]},"MovieDto":{"type":"object","properties":{"id":{"type":"number","example":550,"description":"TMDB movie ID"},"title":{"type":"string","example":"Fight Club","description":"Movie title"},"overview":{"type":"string","example":"A depressed man suffering from insomnia...","description":"Movie overview"},"posterUrl":{"type":"object","example":"https://image.tmdb.org/t/p/w500/pB8BM7pdSp6B6Ih7QZ4DrQ3PmJK.jpg","description":"Full URL to movie poster image (500px width)","nullable":true},"backdropUrl":{"type":"object","example":"https://image.tmdb.org/t/p/w1280/hZkgoQYus5vegHoetLkCJzb17zJ.jpg","description":"Full URL to movie backdrop image (1280px width)","nullable":true},"voteAverage":{"type":"number","example":8.4,"description":"Average vote"},"voteCount":{"type":"number","example":24653,"description":"Vote count"},"releaseDate":{"type":"string","example":"1999-10-15","description":"Release date"},"genreIds":{"example":[18,53],"description":"Genre IDs","type":"array","items":{"type":"string"}},"originalLanguage":{"type":"string","example":"en","description":"Original language"},"originalTitle":{"type":"string","example":"Fight Club","description":"Original title"},"popularity":{"type":"number","example":63.8,"description":"Popularity score"},"adult":{"type":"boolean","example":false,"description":"Is adult content"},"video":{"type":"boolean","example":false,"description":"Is a video"}},"required":["id","title","overview","posterUrl","backdropUrl","voteAverage","voteCount","releaseDate","genreIds","originalLanguage","originalTitle","popularity","adult","video"]},"PaginationDto":{"type":"object","properties":{"page":{"type":"number","example":1,"description":"Current page"},"limit":{"type":"number","example":20,"description":"Items per page"},"totalPages":{"type":"number","example":100,"description":"Total pages"},"totalResults":{"type":"number","example":2000,"description":"Total results"},"hasNextPage":{"type":"boolean","example":true,"description":"Has next page"},"hasPreviousPage":{"type":"boolean","example":false,"description":"Has previous page"}},"required":["page","limit","totalPages","totalResults","hasNextPage","hasPreviousPage"]},"SearchResultDto":{"type":"object","properties":{"movies":{"description":"List of movies","type":"array","items":{"$ref":"#/components/schemas/MovieDto"}},"pagination":{"description":"Pagination info","allOf":[{"$ref":"#/components/schemas/PaginationDto"}]},"cacheHit":{"type":"boolean","example":true,"description":"Whether result was from cache"}},"required":["movies","pagination","cacheHit"]},"MovieDetailDto":{"type":"object","properties":{"movie":{"description":"Movie details","allOf":[{"$ref":"#/components/schemas/MovieDto"}]},"cacheHit":{"type":"boolean","example":false,"description":"Whether result was from cache"}},"required":["movie","cacheHit"]},"GenreDto":{"type":"object","properties":{"id":{"type":"number","example":28,"description":"Genre ID"},"name":{"type":"string","example":"Action","description":"Genre name"}},"required":["id","name"]},"GenresResultDto":{"type":"object","properties":{"genres":{"description":"List of genres","type":"array","items":{"$ref":"#/components/schemas/GenreDto"}},"cacheHit":{"type":"boolean","example":true,"description":"Whether result was from cache"}},"required":["genres","cacheHit"]},"TopSearchDto":{"type":"object","properties":{"searchTerm":{"type":"string","example":"batman","description":"Search term"},"count":{"type":"number","example":150,"description":"Number of times searched"}},"required":["searchTerm","count"]},"TopSearchesResponseDto":{"type":"object","properties":{"searches":{"description":"List of top search terms","type":"array","items":{"$ref":"#/components/schemas/TopSearchDto"}},"period":{"type":"string","example":"7d","description":"Time period for the data"}},"required":["searches","period"]},"TopMovieDto":{"type":"object","properties":{"tmdbMovieId":{"type":"number","example":550,"description":"TMDB movie ID"},"movieTitle":{"type":"string","example":"Fight Club","description":"Movie title"},"hits":{"type":"number","example":89,"description":"Number of views"}},"required":["tmdbMovieId","movieTitle","hits"]},"TopMoviesResponseDto":{"type":"object","properties":{"movies":{"description":"List of most viewed movies","type":"array","items":{"$ref":"#/components/schemas/TopMovieDto"}},"period":{"type":"string","example":"7d","description":"Time period for the data"}},"required":["movies","period"]},"RequestsPerHourDto":{"type":"object","properties":{"hour":{"type":"string","example":"2024-01-15T14:00:00Z","description":"Hour timestamp"},"count":{"type":"number","example":245,"description":"Number of requests in this hour"}},"required":["hour","count"]},"RequestsPerHourResponseDto":{"type":"object","properties":{"data":{"description":"Requests grouped by hour","type":"array","items":{"$ref":"#/components/schemas/RequestsPerHourDto"}},"period":{"type":"string","example":"24h","description":"Time period for the data"}},"required":["data","period"]},"EndpointUsageDto":{"type":"object","properties":{"endpoint":{"type":"string","example":"/api/v1/movies/search","description":"Endpoint path"},"method":{"type":"string","example":"GET","description":"HTTP method"},"count":{"type":"number","example":1250,"description":"Number of requests to this endpoint"},"avgResponseTimeMs":{"type":"number","example":45.5,"description":"Average response time in milliseconds"}},"required":["endpoint","method","count","avgResponseTimeMs"]},"EndpointsUsageResponseDto":{"type":"object","properties":{"endpoints":{"description":"Usage statistics per endpoint","type":"array","items":{"$ref":"#/components/schemas/EndpointUsageDto"}},"period":{"type":"string","example":"7d","description":"Time period for the data"}},"required":["endpoints","period"]},"MetricsSummaryResponseDto":{"type":"object","properties":{"totalRequests":{"type":"number","example":15420,"description":"Total number of requests"},"uniqueVisitors":{"type":"number","example":1250,"description":"Number of unique IP addresses"},"totalSearches":{"type":"number","example":3200,"description":"Total number of searches"},"totalMovieViews":{"type":"number","example":8900,"description":"Total number of movie detail views"},"avgResponseTimeMs":{"type":"number","example":42.3,"description":"Average response time in milliseconds"},"cacheHitRatio":{"type":"number","example":0.85,"description":"Cache hit ratio (0-1)"},"topSearchTerm":{"type":"string","example":"batman","description":"Most popular search term"},"topMovie":{"type":"string","example":"Fight Club","description":"Most viewed movie title"},"periodStart":{"type":"string","example":"2024-01-15T00:00:00Z","description":"Start of the summary period"},"periodEnd":{"type":"string","example":"2024-01-15T23:59:59Z","description":"End of the summary period"}},"required":["totalRequests","uniqueVisitors","totalSearches","totalMovieViews","avgResponseTimeMs","cacheHitRatio","topSearchTerm","topMovie","periodStart","periodEnd"]},"SwapiPersonDto":{"type":"object","properties":{"id":{"type":"number","example":1},"name":{"type":"string","example":"Luke Skywalker"},"height":{"type":"string","example":"172"},"mass":{"type":"string","example":"77"},"hairColor":{"type":"string","example":"blond"},"skinColor":{"type":"string","example":"fair"},"eyeColor":{"type":"string","example":"blue"},"birthYear":{"type":"string","example":"19BBY"},"gender":{"type":"string","example":"male"},"homeworldUrl":{"type":"string","example":"https://swapi.dev/api/planets/1/"},"filmUrls":{"type":"array","items":{"type":"string"}},"speciesUrls":{"type":"array","items":{"type":"string"}},"vehicleUrls":{"type":"array","items":{"type":"string"}},"starshipUrls":{"type":"array","items":{"type":"string"}},"created":{"type":"string","example":"2014-12-09T13:50:51.644000Z"},"edited":{"type":"string","example":"2014-12-20T21:17:56.891000Z"},"url":{"type":"string","example":"https://swapi.dev/api/people/1/"}},"required":["id","name","height","mass","hairColor","skinColor","eyeColor","birthYear","gender","homeworldUrl","filmUrls","speciesUrls","vehicleUrls","starshipUrls","created","edited","url"]},"SwapiPaginationDto":{"type":"object","properties":{"page":{"type":"number","example":1},"limit":{"type":"number","example":10},"totalPages":{"type":"number","example":9},"totalResults":{"type":"number","example":82},"hasNextPage":{"type":"boolean","example":true},"hasPreviousPage":{"type":"boolean","example":false}},"required":["page","limit","totalPages","totalResults","hasNextPage","hasPreviousPage"]},"SwapiPeopleResultDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SwapiPersonDto"}},"pagination":{"$ref":"#/components/schemas/SwapiPaginationDto"},"cacheHit":{"type":"boolean","example":false}},"required":["items","pagination","cacheHit"]},"SwapiPersonDetailDto":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/SwapiPersonDto"},"cacheHit":{"type":"boolean","example":false}},"required":["item","cacheHit"]},"SwapiPlanetDto":{"type":"object","properties":{"id":{"type":"number","example":1},"name":{"type":"string","example":"Tatooine"},"rotationPeriod":{"type":"string","example":"23"},"orbitalPeriod":{"type":"string","example":"304"},"diameter":{"type":"string","example":"10465"},"climate":{"type":"string","example":"arid"},"gravity":{"type":"string","example":"1 standard"},"terrain":{"type":"string","example":"desert"},"surfaceWater":{"type":"string","example":"1"},"population":{"type":"string","example":"200000"},"residentUrls":{"type":"array","items":{"type":"string"}},"filmUrls":{"type":"array","items":{"type":"string"}},"created":{"type":"string","example":"2014-12-09T13:50:49.641000Z"},"edited":{"type":"string","example":"2014-12-20T20:58:18.411000Z"},"url":{"type":"string","example":"https://swapi.dev/api/planets/1/"}},"required":["id","name","rotationPeriod","orbitalPeriod","diameter","climate","gravity","terrain","surfaceWater","population","residentUrls","filmUrls","created","edited","url"]},"SwapiPlanetsResultDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SwapiPlanetDto"}},"pagination":{"$ref":"#/components/schemas/SwapiPaginationDto"},"cacheHit":{"type":"boolean","example":false}},"required":["items","pagination","cacheHit"]},"SwapiPlanetDetailDto":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/SwapiPlanetDto"},"cacheHit":{"type":"boolean","example":false}},"required":["item","cacheHit"]},"SwapiFilmDto":{"type":"object","properties":{"id":{"type":"number","example":1},"title":{"type":"string","example":"A New Hope"},"episodeId":{"type":"number","example":4},"openingCrawl":{"type":"string","example":"It is a period of civil war..."},"director":{"type":"string","example":"George Lucas"},"producer":{"type":"string","example":"Gary Kurtz, Rick McCallum"},"releaseDate":{"type":"string","example":"1977-05-25"},"characterUrls":{"type":"array","items":{"type":"string"}},"planetUrls":{"type":"array","items":{"type":"string"}},"starshipUrls":{"type":"array","items":{"type":"string"}},"vehicleUrls":{"type":"array","items":{"type":"string"}},"speciesUrls":{"type":"array","items":{"type":"string"}},"created":{"type":"string","example":"2014-12-10T14:23:31.880000Z"},"edited":{"type":"string","example":"2014-12-20T19:49:45.256000Z"},"url":{"type":"string","example":"https://swapi.dev/api/films/1/"}},"required":["id","title","episodeId","openingCrawl","director","producer","releaseDate","characterUrls","planetUrls","starshipUrls","vehicleUrls","speciesUrls","created","edited","url"]},"SwapiFilmsResultDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SwapiFilmDto"}},"pagination":{"$ref":"#/components/schemas/SwapiPaginationDto"},"cacheHit":{"type":"boolean","example":false}},"required":["items","pagination","cacheHit"]},"SwapiFilmDetailDto":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/SwapiFilmDto"},"cacheHit":{"type":"boolean","example":false}},"required":["item","cacheHit"]},"SwapiStarshipDto":{"type":"object","properties":{"id":{"type":"number","example":9},"name":{"type":"string","example":"Death Star"},"model":{"type":"string","example":"DS-1 Orbital Battle Station"},"manufacturer":{"type":"string","example":"Imperial Department of Military Research"},"costInCredits":{"type":"string","example":"1000000000000"},"length":{"type":"string","example":"120000"},"maxAtmospheringSpeed":{"type":"string","example":"n/a"},"crew":{"type":"string","example":"342,953"},"passengers":{"type":"string","example":"843,342"},"cargoCapacity":{"type":"string","example":"1000000000000"},"consumables":{"type":"string","example":"3 years"},"hyperdriveRating":{"type":"string","example":"4.0"},"mglt":{"type":"string","example":"10"},"starshipClass":{"type":"string","example":"Deep Space Mobile Battlestation"},"pilotUrls":{"type":"array","items":{"type":"string"}},"filmUrls":{"type":"array","items":{"type":"string"}},"created":{"type":"string","example":"2014-12-10T16:36:50.509000Z"},"edited":{"type":"string","example":"2014-12-20T21:26:24.783000Z"},"url":{"type":"string","example":"https://swapi.dev/api/starships/9/"}},"required":["id","name","model","manufacturer","costInCredits","length","maxAtmospheringSpeed","crew","passengers","cargoCapacity","consumables","hyperdriveRating","mglt","starshipClass","pilotUrls","filmUrls","created","edited","url"]},"SwapiStarshipsResultDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SwapiStarshipDto"}},"pagination":{"$ref":"#/components/schemas/SwapiPaginationDto"},"cacheHit":{"type":"boolean","example":false}},"required":["items","pagination","cacheHit"]},"SwapiStarshipDetailDto":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/SwapiStarshipDto"},"cacheHit":{"type":"boolean","example":false}},"required":["item","cacheHit"]}}}}