Skip to content

v3.0.0

Latest
Compare
Choose a tag to compare
@marcpeters2 marcpeters2 released this 10 Sep 22:26
· 5 commits to master since this release

Version 3 drops support for the paramType field in request parameters. Instead, use the in field.
Previously, a request parameter may have been defined like this:

{
  path: "/users/{userId}",
  summary: "Returns the user with the given ID",
  method: "GET",
  parameters: [
    {
      paramType: "path",
      name: "userId",
      description: "The ID of the user.",
      type: "string",
      required: true
    }
  ]
}

You should now declare the parameter like this instead:

{
  path: "/users/{userId}",
  summary: "Returns the user with the given ID",
  method: "GET",
  parameters: [
    {
      in: "path",
      name: "userId",
      description: "The ID of the user.",
      type: "string",
      required: true
    }
  ]
}

This brings the parameter schema closer in line with the OpenAPI v3 format.