Skip to content

Fix js-yaml $ref #1146

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

Merged
merged 2 commits into from
May 25, 2023
Merged

Fix js-yaml $ref #1146

merged 2 commits into from
May 25, 2023

Conversation

drwpow
Copy link
Contributor

@drwpow drwpow commented May 25, 2023

Changes

Fixes #1093. Supercedes #1097.

How to Review

Tests should pass

Checklist

  • Unit tests updated
  • README updated
  • examples/ directory updated (only applicable for openapi-typescript)

@changeset-bot
Copy link

changeset-bot bot commented May 25, 2023

🦋 Changeset detected

Latest commit: 702764b

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

This PR includes changesets to release 1 package
Name Type
openapi-typescript 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

@drwpow drwpow changed the title Fix js yaml ref Fix js-yaml $ref May 25, 2023
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 25, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 702764b
Status: ✅  Deploy successful!
Preview URL: https://3921c99b.openapi-ts.pages.dev
Branch Preview URL: https://fix-js-yaml-ref.openapi-ts.pages.dev

View logs

@drwpow drwpow force-pushed the fix-js-yaml-ref branch from 5bce5a8 to 702764b Compare May 25, 2023 22:52
};

// OpenAPI $ref
if (ref.includes("#/")) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was able to get a 2x speedup of parseRef out of refactoring it a little. Which is something, because this is used quite a lot.

@drwpow drwpow merged commit 12aa721 into main May 25, 2023
@drwpow drwpow deleted the fix-js-yaml-ref branch May 25, 2023 22:57
@github-actions github-actions bot mentioned this pull request May 25, 2023
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.

use the same openapi, json file generate ok, but yaml file generate error
1 participant