Skip to content

feat: generate OpenAPI spec API#139

Open
o-az wants to merge 1 commit intomainfrom
o-az/openapi=schema
Open

feat: generate OpenAPI spec API#139
o-az wants to merge 1 commit intomainfrom
o-az/openapi=schema

Conversation

@o-az
Copy link
Copy Markdown
Collaborator

@o-az o-az commented Apr 28, 2026

ability to generate OpenAPI v3.2.0 automatically

import { Cli, Openapi, z } from 'incur'

const cli = Cli.create('my-cli', { description: 'My CLI' }).command('users list', {
  options: z.object({ limit: z.coerce.number().optional() }),
  run() {
    return { users: [] }
  },
})

const spec = Openapi.fromCli(cli)

validate: in exmaples/npm:

bun cli.ts

curl http://localhost:3000/openapi.json

note: other 'unrelated' changes are from pnpm check

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 28, 2026

Open in StackBlitz

npm i https://pkg.pr.new/incur@139

commit: 5eb5686

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​scalar/​openapi-types@​0.8.01001009098100

View full report

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.

1 participant