Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Message context not populated when validating response headers

未关闭
#25 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@Stachu270 已经在做这个了。

开始于 2026年6月28日。

  • #27 来自 @Stachu270 —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
java, openapi
领域
api, testing-qa

调研方向

首先比较响应头验证与请求头验证,跟踪验证消息如何获取参数上下文和 schema 键。重现 X-Env 的无效 enum 情况,并检查响应头验证的入口点;当失败的 header 名称和参数上下文能够一致地暴露时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

As title says, there is no way to extract any information about header which failed validation while validating response.

For instance, let's say your openapi spec says response header should look like this

responses:
  '200':
    description: blah blah
    headers:
      X-Env:
       description: Environment enum header
       schema:
         type: string
         enum: [dev, test, prod]

when response has header X-Env: 'wrong' validator produces this king of message does not have a value in the enumeration ["dev", "test", "prod"].
Context DOES NOT HAVE parameter value, it DOES NOT HAVE pointers.instance value. There is no way to which header this message is related to.

Generally it would be nice to have headers validation similar to request headers.
I don't understand why validating request headers produces messages with keys validation.request.parameter.schema.(...) and validating response headers produces messages with keys validation.response.header.schema.(...)
It should both be ...parameter.schema and parameter information in context should be populated with proper parameter names

主要语言
Java
星标
17
派生
6
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

atlassian/openapi-request-validator 的其他 Issue

查看 atlassian/openapi-request-validator 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。