Skip to content

Dot (.) in function and parameter name. #43

@yantrab

Description

@yantrab

Thanks for the package.

my problem is that it is generates classes with dot in the parameters and functions:

export const _PASSPORT_CTRL.LOGIN_START = 's/PassportCtrl/_PASSPORT_CTRL.LOGIN_START'

export function PassportCtrl.login(body: api.UserLogin): Promise<api.Response<api.User>> {
  const parameters: api.OperationParamGroups = {
    body: {
      body
    }
  }
  return gateway.request(PassportCtrl.loginOperation, parameters)
}

and my swagger.json:

{
  "swagger": "2.0",
  "info": {
    "version": "1.0.0",
    "title": "Api documentation",
    "description": "",
    "termsOfService": ""
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {},
  "tags": [
    {
      "name": "PassportCtrl"
    }
  ],
  "paths": {
    "/rest/auth/login": {
      "post": {
        "operationId": "PassportCtrl.login",
        "tags": [
          "PassportCtrl"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UserLogin"
            }
          }
        ],
        "consumes": [],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/User"
            }
          },
          "400": {
            "description": "Missing required parameter"
          }
        },
        "security": [],
        "produces": [],
        "description": "Description of this route",
        "summary": "Summary of this route"
      }
    },
    "/rest/auth/isAuthenticated": {
      "post": {
        "operationId": "PassportCtrl.isAuthenticated",
        "tags": [
          "PassportCtrl"
        ],
        "parameters": [],
        "consumes": [],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/User"
            }
          }
        },
        "security": [],
        "produces": [],
        "description": "return the user if is Authenticated and  exists in database",
        "summary": "Check if is user Authenticated"
      }
    },
    "/rest/auth/logout": {
      "get": {
        "operationId": "PassportCtrl.logout",
        "tags": [
          "PassportCtrl"
        ],
        "parameters": [],
        "consumes": [],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [],
        "produces": []
      }
    }
  },
  "definitions": {
    "User": {
      "properties": {
        "_id": {
          "minLength": 3,
          "maxLength": 20,
          "type": "string"
        },
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      },
      "required": [
        "_id"
      ],
      "type": "object"
    },
    "UserLogin": {
      "properties": {
        "email": {
          "format": "email",
          "type": "string"
        },
        "password": {
          "minLength": 6,
          "type": "string"
        }
      },
      "required": [
        "email",
        "password"
      ],
      "type": "object"
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions