sam-goodwin / eventual

Build scalable and durable micro-services with APIs, Messaging and Workflows
https://docs.eventual.ai
MIT License
174 stars 4 forks source link

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

Closed thantos closed 1 year ago

thantos commented 1 year ago

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" }),
    }),