Luxoft / gengen

Tool for generating models and Angular services based on OpenAPIs and Swagger's JSON.
MIT License
17 stars 8 forks source link

Add support for url parameters #7

Closed aleshchev closed 3 years ago

aleshchev commented 4 years ago

Generator does not generate methods who parameters placed in URL. Need to add support. Example

"/api/v1/Product/Product/{id}": {
      "get": {
        "tags": [
          "Product"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          }
        }
      }
    },