Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve schema output and allow providing additional fields #335

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

thantos
Copy link
Contributor

@thantos thantos commented Apr 11, 2023

Goal: support openapi schema for openai

  1. allow overriding top level info field via new openApi property on Service
  2. Allow per command description and summary fields
  3. improved input and output schema output on commands and rest apis

TODO: document how to handle per object/property descriptions.
TODO: update documentation with the above changes

import { extendApi } from "@anatine/zod-openapi";

...

    input: z.object({
      userId: extendApi(z.string(), { description: "The user ID to retrieve" }),
    }),

@thantos thantos requested a review from sam-goodwin April 11, 2023 23:51
@thantos thantos merged commit f9da39a into main Apr 12, 2023
@thantos thantos deleted the sussman/feat/impr_openapi branch April 12, 2023 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants