message: OpenAPI 3 fixes: definitions => components/schemas + parameters need `schema`
diff: @@ -122,6 +122,7 @@ class ExpressBridge {
  openapi: "3.0.0",
  //swagger: "2.0",
  "components": {
  + "schemas": {},
  "securitySchemes": {
  "bearerAuth": {
  "scheme": "bearer",
  @@ -131,8 +132,6 @@ class ExpressBridge {
  }
  },
  paths: {
  - },
  - definitions: {
  }
  };
  let validationError = {
  @@ -141,7 +140,7 @@ class ExpressBridge {
  "content": {
  "application/json": {
  "schema": {
  - "$ref": "#/definitions/InvalidResponse"
  + "$ref": "#/components/schemas/InvalidResponse"
  }
  }
  }
  @@ -205,7 +204,7 @@ class ExpressBridge {
  properties
  }
  let definition = {
  - "$ref": "#/definitions/" + key
  + "$ref": "#/components/schemas/" + key
  };
  let secure = (condition: any, def: boolean, item: any) => {
  item.tags = [meta.key];
  @@ -226,28 +225,28 @@ class ExpressBridge {
  "description": "limit the number of returned rows, default 100",
  "required": false,
  "style": "simple",
  - "type": "int"
  + "schema": {"type": "integer"}
  },
  {
  "name": "_page",
  "in": "query",
  "description": "to be used for paging",
  "required": false,
  - "type": "int"
  + "schema": {"type": "integer"}
  },
  {
  "name": "_sort",
  "in": "query",
  "description": "the columns to sort on",
  "required": false,
  - "type": "string"
  + "schema": {"type": "string"}
  },
  {
  "name": "_order",
  "in": "query",
  "description": "the sort order to user for the columns in `_sort`",
  "required": false,
  - "type": "string"
  + "schema": {"type": "string"}
  }, ...parameters],
  responses: {
  "200": {
  @@ -269,14 +268,14 @@ class ExpressBridge {
  "in": "path",
  "description": "id of " + key,
  "required": true,
  - "type": "string"
  + "schema": {"type": "string"},
  };
  let itemInBody = {
  "requestBody": {
  "content": {
  "application/json": {
  "schema": {
  - "$ref": "#/definitions/" + key
  + "$ref": "#/components/schemas/" + key
  }
  }
  }
  @@ -299,7 +298,7 @@ class ExpressBridge {
  "application/json": {
  "schema": {
  - "$ref": "#/definitions/" + key
  + "$ref": "#/components/schemas/" + key
  }
  }
  @@ -317,7 +316,7 @@ class ExpressBridge {
  "application/json": {
  "schema": {
  - "$ref": "#/definitions/" + key
  + "$ref": "#/components/schemas/" + key
  }
  }
  @@ -343,7 +342,7 @@ class ExpressBridge {
  "application/json": {
  "schema": {
  - "$ref": "#/definitions/" + key
  + "$ref": "#/components/schemas/" + key
  }
  }
  @@ -416,7 +415,7 @@ class ExpressBridge {
  })
  }
  }
  - spec.definitions["InvalidResponse"] = {
  + spec.components.schemas["InvalidResponse"] = {
  "type": "object",
  properties: {
  "message": {
  