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(next): some openapi-codegen args are ignored #633

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

darai0512
Copy link

Summary

Some arguments of openapi-codegen (especially out and api_docs_url) are ignored on next branch. So, try to fix it.

(This problem & PR are not significant. I think next branch is under development, and you may have better ideas. If this change is unnecessary, please close this.)
(I think it is better to use lazy_static for Command::parse().)

Checklist

Copy link
Collaborator

@mzeitlin11 mzeitlin11 left a comment

Choose a reason for hiding this comment

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

Thanks for contributing @darai0512, sorry this slipped through the cracks! Left a comment on the api_docs_url option - I also think the out option is not particularly useful since there's no reason that out directly would ever clash with something a user already has. So would be happy to remove that as well (maybe could replace usage of "out" with a constant), instead of adding complexity with making Command globally accessible.

let unprefixed_link = self.doc_links.get(object)?;
Some(format!("https://stripe.com/docs/api{}", unprefixed_link))
Some(format!("{}{}", args.api_docs_url, unprefixed_link))
Copy link
Collaborator

Choose a reason for hiding this comment

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

There was a bunch of churn at some point around how Stripe structured their docs and a bunch of the handling for this stuff changed. I think this argument is a relic of that and the option can just be safely removed

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.

2 participants