8000 Some schema are not appeared in generated code · Issue #324 · astahmer/openapi-zod-client · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Some schema are not appeared in generated code #324
Open
@AobaIwaki123

Description

@AobaIwaki123

About

When I define a schema which has only one property in openapi.yaml
That schema will not appear in generate code like below.
But if I define two or more properties, it works properly.
I want to know how can I solve this issue. Thanks

Open API YAML

  schemas:
    PostJobsRequest:
      type: object
      properties:
        job_id:
          type: string
          description: Job ID
      required:
        - job_id

Generated

const PostJobsRequest = z.object({ job_id: z.string() }).passthrough();
...
const endpoints = makeApi([
...
        schema: z.object({ job_id: z.string() }).passthrough(),

Expected

const PostJobsRequest = z.object({ job_id: z.string() }).passthrough();
...
const endpoints = makeApi([
...
        schema: PostJobsRequest,

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

      0