Allow checking for Set-Cookie _response_ headers

Abierto
#86 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
node.js, openapi, typescript

Línea de trabajo

Start by tracing how response headers are normalized and validated, then inspect the header schema handling used for response validation. Reproduce the issue with the supplied 204 response and Set-Cookie example; done means validation recognizes the response cookie header instead of reporting it missing. No source file or test is named in the issue, so first locate the relevant validation tests and entry point.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug help wanted

I do response validation, and I want to make sure that when my login endpoint is responding with a successful http response code that it's setting at least one cookie.

I put this in my spec:

responses: {
    "204": {
        description: "success",
        headers: {
            "Set-Cookie": {
                description: "Cookie",
                schema: {
                    type: "string",
                    minLength: 1,

But validation always fails, despite the chrome inspector telling me that there were two "Set-Cookie" headers.

Here's the error from openid-backend:

{
    "keyword": "required",
    "dataPath": ".headers",
    "schemaPath": "#/properties/headers/required",
    "params": {
        "missingProperty": "set-cookie"
    },
    "message": "should have required property 'set-cookie'"
}
Lenguaje dominante
TypeScript
Estrellas
689
Forks
97
Merge medio
2 h 36 min
PR fusionados (30 d)
11

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de openapistack/openapi-backend

Todos los issues de openapistack/openapi-backend

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.