API: OpenAPI schema does not match live responses (breaks strict output validation)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- openapi, python
- Área
- api, backend-api-design, testing
Línea de trabajo
Comienza con el /api/v1/swagger.json publicado y compara los esquemas de los endpoints de paginación, de retorno de arrays, de recursos externos de features, de owners y de group_owners indicados con sus respuestas en vivo. Usa el rastreo de read-endpoints etiquetado con MCP y la validación de salida de FastMCP from_openapi como ruta de verificación; se considera terminado cuando los esquemas declarados validen esas respuestas, de modo que validate_output pueda volver a habilitarse.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The published OpenAPI schema (/api/v1/swagger.json) disagrees with actual API responses in several systematic ways. Any client that validates responses against the schema (e.g. the Flagsmith MCP server, which uses FastMCP's from_openapi output validation) fails on most endpoints. Found by crawling the MCP-tagged read endpoints against SaaS and validating each response against its declared schema.
1. Pagination next/previous typed string, returned null
Paginated responses declare next and previous as non-nullable string, but the API returns null when there is no adjacent page. Should be string, nullable (anyOf: [string, "null"]).
Affected: list_organizations, list_organization_groups, list_organization_invites, list_organization_roles, list_environments, list_project_features, list_project_segments, list_project_change_requests, list_feature_multivariate_options, list_feature_segments, get_environment_feature_versions (likely all paginated list endpoints).
2. Array-returning endpoints declared as a single object
The 200 response schema is the singular item serializer, but the endpoint returns a JSON array. Should be type: array, items: <object>.
GET /organisations/{id}/projects/(list_projects_in_organization)GET /projects/{id}/environments/(list_project_environments)GET /projects/{project_pk}/features/{feature_pk}/code-references/GET /projects/{project_pk}/features/{id}/evaluation-data/
3. get_feature_external_resources: missing count
GET …/feature-external-resources/ returns {"results": []} but the schema marks count as required. Either the response should include the full pagination envelope or the schema should not require count.
4. owners / group_owners typed as integer IDs but expanded in responses
Read responses expand these to nested user objects ({id,email,first_name,last_name,last_login,uuid}), while the schema types them as array<integer>. Affects get_feature_flag and list_project_features (results[].owners[]); likely anywhere a feature is serialised for read.
Impact / workaround
The MCP server currently sets validate_output=False to avoid rejecting valid responses. We'd like to re-enable output validation once the schema matches reality.
- Lenguaje dominante
- Python
- Estrellas
- 9.9k
- Forks
- 658
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 168
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Flagsmith/flagsmith
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Flagsmith/flagsmith#9119 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Fix Button Alignment in SDK Installation SectionPosiblemente ocupada @manueldezman la tomó hace 3 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Flagsmith/flagsmith#9056 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Cloud Python warehouse snippet omits the import needed by its short-lived-job guidancePosiblemente ocupada @jcd1991 la tomó hace 4 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
Flagsmith/flagsmith#9045 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Expose whether an organisation is blocked for API usagePosiblemente ocupada @PiUnknown la tomó hace 38 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Flagsmith/flagsmith#8773 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
influx_query_manager doesn't catch ApiException, so Influx error responses 500Posiblemente ocupada @SAY-5 la tomó hace 13 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Flagsmith/flagsmith#8510 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de Flagsmith/flagsmith
Issues similares
-
claude-subscription-directsdk: tool calls with raw control characters in string values are droppedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
NousResearch/hermes-official-plugins#538 ·
Los mantenedores suelen responder en 3 días
-
bug(qdiffusion): EnergyModel.score_visible_logits computes biased visible/hidden on-ratios when solver returns variable solution counts per candidatePosiblemente ocupada @houzhongyu la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
qboson/kaiwu-pytorch-plugin#2133 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
MakazhanAlpamys/Soup#3415 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días