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

fix: inconsistent indentation in models file when not using format: true #349

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

jordanshatford
Copy link
Collaborator

closes: #321

And the added benefit of additional spec comments making it through.

@jordanshatford jordanshatford requested a review from mrlubos April 11, 2024 06:48
Copy link

changeset-bot bot commented Apr 11, 2024

🦋 Changeset detected

Latest commit: 24c8169

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

Copy link

vercel bot commented Apr 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hey-api-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2024 7:25am

@jordanshatford jordanshatford force-pushed the fix/indentation-of-models-without-prettier branch from 68c2a8b to 8f9bd6f Compare April 11, 2024 06:51
Copy link

codecov bot commented Apr 11, 2024

Codecov Report

Attention: Patch coverage is 67.85714% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 84.50%. Comparing base (5424493) to head (24c8169).

Files Patch % Lines
packages/openapi-ts/src/utils/write/models.ts 67.85% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #349      +/-   ##
==========================================
+ Coverage   83.42%   84.50%   +1.07%     
==========================================
  Files          74       74              
  Lines        4815     4776      -39     
  Branches      551      551              
==========================================
+ Hits         4017     4036      +19     
+ Misses        797      739      -58     
  Partials        1        1              
Flag Coverage Δ
unittests 84.50% <67.85%> (+1.07%) ⬆️

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.

packages/openapi-ts/src/utils/write/models.ts Outdated Show resolved Hide resolved
isNullable: false,
isReadOnly: false,
...emptyModel,
...base,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this do anything?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, my bad. Base is Model. Ive updated to spread base and removed no longer needed fields so the toType can handle all generation of code

packages/openapi-ts/src/utils/write/models.ts Show resolved Hide resolved
@jordanshatford jordanshatford merged commit 05dd1d3 into main Apr 11, 2024
15 of 16 checks passed
@jordanshatford jordanshatford deleted the fix/indentation-of-models-without-prettier branch April 11, 2024 09:02
@github-actions github-actions bot mentioned this pull request Apr 11, 2024
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.

Inconsistent indentation in models without prettier
2 participants