swagger.yaml中的cache control max age头

9w11ddsr  于 2021-07-09  发布在  Java
关注(0)|答案(0)|浏览(283)

我的swagger.yaml工作正常,唯一的问题是缓存控制头。我在回复中没有看到。我定义如下。你能告诉我它怎么了吗?

/{empId}/class:
get:
  tags:
  - "School"
  summary: "Some Summary"
  description: "Some description"
  operationId: "getDataForEmp"
  produces:
  - "application/json;charset=UTF-8"
  parameters:
  - name: "empId"
    in: "path"
    description:  "The emp id for which record is to be fetched."
    required: true
    type: "string"
  responses:
    200:
      description: "Data retrieved successfully."
      schema:
        $ref: "#/definitions/MyResponse"
      headers:
        Cache-Control:
          default:  "public, max-age=43200"
    401:
      description: "You are not authorised to make this change."
    403:
      description: "Accessing the resource you were trying to reach is forbidden."
    404:
      description: "The resource you were trying to reach is not found."

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题