Skip to content

Conversation

@jeremyfiel
Copy link

fixes: #2492

still needs some advice on the plugin options. I didn't find much in the docs

if you have a few different combos to test against the schema, that would be great too

cc @mrlubos

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@changeset-bot
Copy link

changeset-bot bot commented Oct 28, 2025

🦋 Changeset detected

Latest commit: e27159c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hey-api/openapi-ts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Oct 28, 2025

@jeremyfiel is attempting to deploy a commit to the Hey API Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. feature 🚀 New feature or request labels Oct 28, 2025
@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 30.59%. Comparing base (a71d840) to head (e27159c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2869   +/-   ##
=======================================
  Coverage   30.59%   30.59%           
=======================================
  Files         488      488           
  Lines       39938    39938           
  Branches     2442     2442           
=======================================
  Hits        12219    12219           
  Misses      27685    27685           
  Partials       34       34           
Flag Coverage Δ
unittests 30.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 28, 2025

Open in StackBlitz

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/codegen-core@2869
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/nuxt@2869
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/openapi-ts@2869
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/vite-plugin@2869

commit: e27159c

@mrlubos
Copy link
Member

mrlubos commented Oct 28, 2025

@jeremyfiel Oh wow, nice. Do you think this should live in the docs project since we want to host it on that URL? There's also an argument for being close to the project it represents...

@jeremyfiel
Copy link
Author

Typically, I would recommend to keep it closer to the code because it's a code artifact and should be treated as such.


Btw, I found this example that doesn't align to the updated input docs.

458441d#diff-f490838eb37f47f4292dc143475314fee58f9215519b484e31e514d1af34037eR225

which variation is valid?

{
    "input": "path/to/file"
}

or an array of strings?

{
    "input": ["path/to/file", "path/to/another/file"]
}

@mrlubos
Copy link
Member

mrlubos commented Oct 28, 2025

@jeremyfiel I agree, but if I want a simple schema URL like in the original issue, how would that be achieved? I don't want to set up a pipeline for copying the schema to the docs public folder... should it work based on redirect and point to the raw file hosted on GitHub? Should it use a symlink to the file and docs could resolve it on build? Other?

RE examples, why do you say it doesn't align? Both approaches are valid, depending on what you're trying to do https://heyapi.dev/openapi-ts/configuration#advanced

@jeremyfiel
Copy link
Author

RE examples, why do you say it doesn't align? Both approaches are valid, depending on what you're trying to do https://heyapi.dev/openapi-ts/configuration#advanced

It seems the recent changes to the input description changed the behavior.

458441d#diff-ccd100256339832cc981d75c7790f5229823c46be9b1c4de031e9f0602647b78R12-R54

The text no longer indicates an array of input is valid.

string path, URL, API registry, an object containing any of these, or an object representing an OpenAPI specification.

@mrlubos
Copy link
Member

mrlubos commented Oct 28, 2025

It never mentioned arrays, you're looking at a pull request commit that got modified before merging. There's a link to the advanced section below as it needs more context than simply saying you can pass an array and it's something 99% of people don't need to use/know about

@jeremyfiel
Copy link
Author

Oh ok. In that case, the schema should be revised to support a string of arrays for input and output. If you can provide more information about the plugin options, I will try to finish the schema soon.

@mrlubos
Copy link
Member

mrlubos commented Oct 28, 2025

@jeremyfiel This makes me think whether we should be generating this schema from types? There are many plugins and keeping these in sync will be pain

@jeremyfiel
Copy link
Author

@jeremyfiel This makes me think whether we should be generating this schema from types? There are many plugins and keeping these in sync will be pain

the main benefit of the schema is for using intellisense in IDEs. It provides a much better user experience for any devs trying to construct a config file from scratch. It also produces an external facing description of the functionality.

It can definitely take some additional maintenance but IMO, the benefits outweigh the maintenance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 🚀 New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve YAML and JSON config support

2 participants