swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
17.02k stars 6.03k forks source link

typescript-angular is horribly outdated and generates invalid code #8844

Open ghost opened 6 years ago

ghost commented 6 years ago
Description

I have built a a simple WebAPI using Swashbuckle for use in my Angular 6.2.5 project. The output of the client SDK for this project type: "typescript-angular" is terribly outdated and produces erroneous code to boot. I spend about 40 minutes each time I download this typescript-angular SDK formatting and fixing it so it will work without breaking the build in my production app.

Swagger-codegen version

Swagger Codegen Version is latest as of 10/23/218, I cannot locate the specific version

Steps to reproduce

Upload swagger docs json to SwaggerHub, get the client sdk as typescript-angular. Make sure to check all but the last checkbox for options of the typescript-angular package. Download and witness the mess that is produced. The version box at the bottom does absolutely nothing.

Suggest a fix/enhancement

Someone test this output before publishing to the world. This output code produces errors with interfaces, rxjs imports, many http imports, completely botches import for Interfaces, produces many linting errors.

Here is the JSON used in Swagger Hub

{
  "swagger": "2.0",
  "info": {
    "version": "v1",
    "title": "CustomerFacingAPI"
  },
  "host": "localhost:55045",
  "schemes": [
    "http"
  ],
  "paths": {
    "/amazon/GetItems": {
      "get": {
        "tags": [
          "Amazon"
        ],
        "summary": "Returns all amazon items, active or inactive",
        "operationId": "Amazon_GetAllAmazonItems",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "OnlyActive",
            "in": "query",
            "description": "Return only active items?",
            "required": false,
            "type": "boolean"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerFacingAPI.DTOs.AmazonItemDTO"
              }
            }
          }
        }
      }
    },
    "/amazon/GetItem": {
      "get": {
        "tags": [
          "Amazon"
        ],
        "summary": "REturns a single amazon item",
        "operationId": "Amazon_GetAmazonItem",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "itemUPC",
            "in": "query",
            "description": "The UPC of the item",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CustomerFacingAPI.DTOs.AmazonItemDTO"
            }
          }
        }
      }
    },
    "/amazon/GetASIN": {
      "get": {
        "tags": [
          "Amazon"
        ],
        "summary": "Returns an item's ASIN",
        "operationId": "Amazon_GetItemASIN",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "itemUPC",
            "in": "query",
            "description": "The UPC of the item",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/analytics/RegisterUser": {
      "post": {
        "tags": [
          "Analytics"
        ],
        "summary": "Registers a user for collecting analytics",
        "operationId": "Analytics_RegisterUser",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "userIdentifier",
            "in": "query",
            "description": "The unique identifier generated by the client to represent this user",
            "required": true,
            "type": "string"
          },
          {
            "name": "cameFrom",
            "in": "query",
            "description": "If possible, where the user came from",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        }
      }
    },
    "/analytics/LogLanding": {
      "post": {
        "tags": [
          "Analytics"
        ],
        "summary": "Logs a registered user hitting the app",
        "operationId": "Analytics_LogLanding",
        "consumes": [],
        "produces": [],
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "description": "The Id generated by the registerUser method",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "cameFrom",
            "in": "query",
            "description": "If possible, where the user came from",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/analytics/LogClick": {
      "post": {
        "tags": [
          "Analytics"
        ],
        "summary": "Logs a click by a registered user",
        "operationId": "Analytics_LogClick",
        "consumes": [],
        "produces": [],
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "description": "THe Id generated by the registerUser method",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "clickedOnWhat",
            "in": "query",
            "description": "What did the user click on?",
            "required": true,
            "type": "string"
          },
          {
            "name": "linksToWhere",
            "in": "query",
            "description": "If it is a link, where does it link to?",
            "required": true,
            "type": "string"
          },
          {
            "name": "imageClicked",
            "in": "query",
            "description": "If an image was clicked, what image was it?",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/analytics/LogExit": {
      "post": {
        "tags": [
          "Analytics"
        ],
        "summary": "Logs a registered user who exits the app",
        "operationId": "Analytics_LogExit",
        "consumes": [],
        "produces": [],
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "description": "THe Id generated by the registerUser method",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "headedWhere",
            "in": "query",
            "description": "If possible, where was the user headed?",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/cart/CreateCart": {
      "post": {
        "tags": [
          "Cart"
        ],
        "summary": "Creates a cart for a registered user",
        "operationId": "Cart_CreateCart",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "description": "The Id of the user",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        }
      }
    },
    "/cart/AddItemToCart": {
      "post": {
        "tags": [
          "Cart"
        ],
        "summary": "Adds an Item to a Cart",
        "operationId": "Cart_AddItemToCart",
        "consumes": [],
        "produces": [],
        "parameters": [
          {
            "name": "cartId",
            "in": "query",
            "description": "The Id of the cart to add to",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "itemNumber",
            "in": "query",
            "description": "The item number of the item to add",
            "required": true,
            "type": "string"
          },
          {
            "name": "itemQuantity",
            "in": "query",
            "description": "That quantity of the item to add",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/cart/UpdateQuantity": {
      "post": {
        "tags": [
          "Cart"
        ],
        "summary": "Updates the quantity of an Item in a Cart",
        "operationId": "Cart_UpdateItemInCart",
        "consumes": [],
        "produces": [],
        "parameters": [
          {
            "name": "cartId",
            "in": "query",
            "description": "The Id of the cart to operate on",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "itemNumber",
            "in": "query",
            "description": "The item number of the item to effect",
            "required": true,
            "type": "string"
          },
          {
            "name": "itemQuantity",
            "in": "query",
            "description": "That quantity of the item to update to",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/cart/EmptyCart": {
      "post": {
        "tags": [
          "Cart"
        ],
        "summary": "Empties a Cart's contents",
        "operationId": "Cart_EmptyCart",
        "consumes": [],
        "produces": [],
        "parameters": [
          {
            "name": "cartId",
            "in": "query",
            "description": "The Id of the cart to operate on",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/cart/DeleteCart": {
      "post": {
        "tags": [
          "Cart"
        ],
        "summary": "Deletes a Cart",
        "operationId": "Cart_DeleteCart",
        "consumes": [],
        "produces": [],
        "parameters": [
          {
            "name": "cartId",
            "in": "query",
            "description": "The Id of the cart to operate on",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/cart/GetContents": {
      "get": {
        "tags": [
          "Cart"
        ],
        "summary": "Returns a Cart's contents",
        "operationId": "Cart_GetContents",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "cartId",
            "in": "query",
            "description": "The Id of the cart to operate on",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerFacingAPI.DTOs.CartContentsDTO"
              }
            }
          }
        }
      }
    },
    "/catalog/GetCatalogs": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Returns all catalogs from the catalog",
        "operationId": "Catalogue_GetAllCatalogs",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerFacingAPI.DTOs.CatalogDTO"
              }
            }
          }
        }
      }
    },
    "/catalog/GetBrands": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Returns all brands from the catalog",
        "operationId": "Catalogue_GetBrands",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerFacingAPI.DTOs.BrandDTO"
              }
            }
          }
        }
      }
    },
    "/catalog/GetCategories": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Returns all categories from the catalog",
        "operationId": "Catalogue_GetCategories",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerFacingAPI.DTOs.CategoryDTO"
              }
            }
          }
        }
      }
    },
    "/catalog/GetProductLines": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Returns all product lines from the catalog",
        "operationId": "Catalogue_GetProductLines",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerFacingAPI.DTOs.ProductLineDTO"
              }
            }
          }
        }
      }
    },
    "/catalog/GetItems": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Returns all amazon items from the catalog",
        "operationId": "Catalogue_GetItems",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerFacingAPI.DTOs.ItemDTO"
              }
            }
          }
        }
      }
    },
    "/catalog/GetItem": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Returns an items from the catalog",
        "operationId": "Catalogue_GetItem",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "itemUPC",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CustomerFacingAPI.DTOs.ItemDTO"
            }
          }
        }
      }
    },
    "/catalog/GetEngines": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Returns all engines from the catalog",
        "operationId": "Catalogue_GetEngines",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerFacingAPI.DTOs.EngineDTO"
              }
            }
          }
        }
      }
    },
    "/catalog/GetEngineApplications": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Returns all engine applications for an item",
        "operationId": "Catalogue_GetItemAttributes",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "itemUPC",
            "in": "query",
            "description": "The UPC of the item to get applications for",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerFacingAPI.DTOs.EngineApplicationDTO"
              }
            }
          }
        }
      }
    },
    "/catalog/GetImages": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Returns all images for an item in the catalog",
        "operationId": "Catalogue_GetItemImages",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "itemUPC",
            "in": "query",
            "description": "The UPC of the item to get images for",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerFacingAPI.DTOs.ItemImageDTO"
              }
            }
          }
        }
      }
    },
    "/catalog/GetInterchange": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Returns the interchange for an item",
        "operationId": "Catalogue_GetInterchange",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "itemUPC",
            "in": "query",
            "description": "The UPC of the item to get the interchange of",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerFacingAPI.DTOs.InterchangeDTO"
              }
            }
          }
        }
      }
    },
    "/catalog/GetPrice": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Returns the price, list and dealer, for an item",
        "operationId": "Catalogue_GetPrice",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "itemUPC",
            "in": "query",
            "description": "The UPC of the item to get the price of",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerFacingAPI.DTOs.ItemPriceDTO"
              }
            }
          }
        }
      }
    },
    "/catalog/GetDocuments": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Returns the documents for an item",
        "operationId": "Catalogue_GetDocuments",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "itemUPC",
            "in": "query",
            "description": "The UPC of the item to get the documents from",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerFacingAPI.DTOs.DocumentDTO"
              }
            }
          }
        }
      }
    },
    "/catalog/GetRelatedItems": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Returns the item's related to an item",
        "operationId": "Catalogue_GetRelatedItems",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "itemUPC",
            "in": "query",
            "description": "The UPC of the item to get the related items for",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerFacingAPI.DTOs.RelatedItemDTO"
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "CustomerFacingAPI.DTOs.AmazonItemDTO": {
      "type": "object",
      "properties": {
        "ASIN": {
          "type": "string"
        },
        "ItemNumber": {
          "type": "string"
        },
        "IsActive": {
          "type": "boolean"
        },
        "Title": {
          "type": "string"
        },
        "UPC": {
          "type": "string"
        },
        "LastUpdated": {
          "format": "date-time",
          "type": "string"
        }
      }
    },
    "CustomerFacingAPI.DTOs.CartContentsDTO": {
      "type": "object",
      "properties": {
        "CartId": {
          "format": "int32",
          "type": "integer"
        },
        "ItemNumber": {
          "type": "string"
        },
        "Quantity": {
          "format": "int32",
          "type": "integer"
        },
        "LastUpdated": {
          "format": "date-time",
          "type": "string"
        }
      }
    },
    "CustomerFacingAPI.DTOs.CatalogDTO": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "int32",
          "type": "integer"
        },
        "Title": {
          "type": "string"
        }
      }
    },
    "CustomerFacingAPI.DTOs.BrandDTO": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "int32",
          "type": "integer"
        },
        "BrandName": {
          "type": "string"
        }
      }
    },
    "CustomerFacingAPI.DTOs.CategoryDTO": {
      "type": "object",
      "properties": {
        "ParentCategory": {
          "type": "string"
        },
        "ChildCategory": {
          "type": "string"
        }
      }
    },
    "CustomerFacingAPI.DTOs.ProductLineDTO": {
      "type": "object",
      "properties": {
        "ProductLine": {
          "type": "string"
        }
      }
    },
    "CustomerFacingAPI.DTOs.ItemDTO": {
      "type": "object",
      "properties": {
        "ItemNumber": {
          "type": "string"
        },
        "ProductLine": {
          "type": "string"
        },
        "Depth": {
          "format": "double",
          "type": "number"
        },
        "Weight": {
          "format": "double",
          "type": "number"
        },
        "Height": {
          "format": "double",
          "type": "number"
        },
        "Width": {
          "format": "double",
          "type": "number"
        },
        "ShortDescription": {
          "type": "string"
        },
        "LongDescription": {
          "type": "string"
        },
        "ParentCategory": {
          "type": "string"
        },
        "ChildCategory": {
          "type": "string"
        },
        "UPC": {
          "type": "string"
        },
        "SuperceedsTo": {
          "type": "string"
        },
        "UnitOfMeasure": {
          "type": "string"
        },
        "Status": {
          "type": "string"
        },
        "InnerPack": {
          "format": "int32",
          "type": "integer"
        },
        "OuterPack": {
          "format": "int32",
          "type": "integer"
        },
        "HSC": {
          "type": "string"
        },
        "ECCN": {
          "type": "string"
        },
        "Origin": {
          "type": "string"
        },
        "IsHazmat": {
          "type": "boolean"
        },
        "HasSDS": {
          "type": "boolean"
        },
        "Image1": {
          "type": "string"
        },
        "Image2": {
          "type": "string"
        }
      }
    },
    "CustomerFacingAPI.DTOs.EngineDTO": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "int32",
          "type": "integer"
        },
        "ModelNumber": {
          "type": "string"
        },
        "HorsePower": {
          "type": "string"
        },
        "YearStart": {
          "format": "int32",
          "type": "integer"
        },
        "YearStop": {
          "format": "int32",
          "type": "integer"
        },
        "Stroke": {
          "format": "int32",
          "type": "integer"
        },
        "Cylinders": {
          "format": "int32",
          "type": "integer"
        },
        "Liters": {
          "format": "int32",
          "type": "integer"
        },
        "CubicInchDisplacement": {
          "format": "int32",
          "type": "integer"
        },
        "CC": {
          "format": "int32",
          "type": "integer"
        },
        "Notes": {
          "type": "string"
        },
        "MoreNotes": {
          "type": "string"
        },
        "Description": {
          "type": "string"
        },
        "SerialStart": {
          "type": "string"
        },
        "SerialEnd": {
          "type": "string"
        },
        "Brand": {
          "type": "string"
        }
      }
    },
    "CustomerFacingAPI.DTOs.EngineApplicationDTO": {
      "type": "object",
      "properties": {
        "Brand": {
          "type": "string"
        },
        "StartYear": {
          "format": "int32",
          "type": "integer"
        },
        "EndYear": {
          "format": "int32",
          "type": "integer"
        },
        "Notes": {
          "type": "string"
        },
        "MoreNotes": {
          "type": "string"
        },
        "EvenMoreNotes": {
          "type": "string"
        },
        "EngineId": {
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "CustomerFacingAPI.DTOs.ItemImageDTO": {
      "type": "object",
      "properties": {
        "File": {
          "type": "string"
        },
        "Type": {
          "type": "string"
        }
      }
    },
    "CustomerFacingAPI.DTOs.InterchangeDTO": {
      "type": "object",
      "properties": {
        "Brand": {
          "type": "string"
        },
        "OENumber": {
          "type": "string"
        },
        "OENumberStripped": {
          "type": "string"
        }
      }
    },
    "CustomerFacingAPI.DTOs.ItemPriceDTO": {
      "type": "object",
      "properties": {
        "List": {
          "format": "double",
          "type": "number"
        },
        "Dealer": {
          "format": "double",
          "type": "number"
        },
        "LastUpdated": {
          "format": "date-time",
          "type": "string"
        }
      }
    },
    "CustomerFacingAPI.DTOs.DocumentDTO": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string"
        },
        "Description": {
          "type": "string"
        },
        "File": {
          "type": "string"
        },
        "Type": {
          "type": "string"
        },
        "LastUpdated": {
          "format": "date-time",
          "type": "string"
        }
      }
    },
    "CustomerFacingAPI.DTOs.RelatedItemDTO": {
      "type": "object",
      "properties": {
        "Type": {
          "type": "string"
        },
        "Item": {
          "type": "string"
        }
      }
    }
  }
}
Fredx87 commented 6 years ago

I agree that there are some bugs in the generated code. I think that it is better so specify them better, so I created some related issues: https://github.com/swagger-api/swagger-codegen/issues/8857, https://github.com/swagger-api/swagger-codegen/issues/8856, https://github.com/swagger-api/swagger-codegen/issues/8855, https://github.com/swagger-api/swagger-codegen/issues/8854