Skip to content

queries not working after upgrading from 0.5.3 to 1.0.6 #75

Closed
@sourceful-mia

Description

@sourceful-mia

Very cool repo! Love the work that's being done.

I have an issue with version 1.0 when trying to codegen for a very simple OpenAPI Spec.

When doing codegen with v0.5.3, I get content in my generated index.ts (eg: useDefaultServiceGetProjects)
However, when doing codegen with v1.0.6, none of the files contain the above hook.

My spec is generated with tsoa and valid according to https://editor.swagger.io/

Is something missing from my spec, or is there a bug in this repo?

Here's the spec

openapi: 3.0.0
components:
  examples: {}
  headers: {}
  parameters: {}
  requestBodies: {}
  responses: {}
  schemas:
    Project:
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
      required:
        - id
        - name
        - description
      type: object
      additionalProperties: false
    ProjectCreateParams:
      properties:
        name:
          type: string
      required:
        - name
      type: object
      additionalProperties: false
  securitySchemes: {}
info:
  title: projects-api
  version: 1.0.0
  description: Projects backend for frontend
  license:
    name: ISC
  contact: {}
paths:
  /v1/projects:
    get:
      operationId: GetProjects
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/Project"
                type: array
      security: []
      parameters: []
    post:
      operationId: CreateProject
      responses:
        "201":
          description: Created
      security: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProjectCreateParams"
  /v1/projects/{id}:
    get:
      operationId: GetProject
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Project"
      security: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
servers:
  - url: /

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions