小编Iac*_*ace的帖子

Swagger/OpenAPI 3.0 问题及响应示例

这是我在 Swagger 编辑器在线查看的 OpenAPI 3.0 定义的简化版本。我试图获得错误代码 401 和 403 的两个响应,它们共享相同的架构,显示不同的示例 - 这似乎不起作用,我仍然看到引用的类型作为示例。

您能帮我找出这些定义有什么问题吗?

openapi: 3.0.0
info:
  version: '1.0'
  title: A service
paths:
  /doSomething:
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: string
              example: A string
      responses:
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Denied'
components:
  responses:
    Unauthorized:
      description: The endpoint cannot be reached because the request is not authorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
    Denied:
      description: The request's authorizations don't match the required ones needed to access the resource
      content:
        application/json: …
Run Code Online (Sandbox Code Playgroud)

swagger swagger-ui swagger-editor openapi

6
推荐指数
1
解决办法
6085
查看次数

google 是否仍然尊重 https://accounts.google.com/o/oauth2/auth 请求中的“max_age”请求参数?

根据OIDC 规范,当身份验证请求包含该max_age字段时

返回的 ID 令牌必须包含auth_time声明值

从 1 月 28 日开始,我们看不到auth_time从 google auth api 返回的 ID 令牌中返回的字段。

就尊重这面旗帜而言,谷歌方面有什么变化吗?

谢谢你!

google-openid google-oauth

5
推荐指数
0
解决办法
289
查看次数