question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how should we generate clients with no host

See original GitHub issue

Got an [issue](If host is not specified, it is assumed to be the same host where the API documentation is being served.) on the autorest.python repo that partially arose since the person didn’t define a host in their swagger. I told them to use a host, but from this, it does look like we’re not handling a “no host” client very well.

Accordinig to the open api docs,

If host is not specified, it is assumed to be the same host where the API documentation is being served.

This isn’t something we’re doinig rn. I’m thinking for implementation of this that m4 should set the cliientDefaultValue to the host where the API documentation is, does this sound right / doable? Thanks!

Task:

  • Add docs for generators #3793
  • Python generator make host required if not provided Azure/autorest.python/pull/868
  • CSharp generator make host required if not provided
  • Typescript generator make host required if not provided
  • Golang generator make host required if not provided

cc @daviwil @lmazuel @timotheeguerin

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
lmazuelcommented, Jan 16, 2021

That would make sense then, if no host in Swagger then it’s a required parameter. I can deal with that. But using the host where the Swagger is is a non-concept in SDK, that will never give something useful (my two cents)

1reaction
pakrymcommented, Jan 15, 2021

.net generates an optional parameter for the endpoint(host) but we can also generate a required one just as easily.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Get More Clients In 2022 - 20+ Actionable Tips
Wondering how to get more clients for your agency? Here are 11 practical tips and advice from experts to boost your earnings and...
Read more >
How to Get More Clients: 15 Proven Ways + Expert Tips
Leverage influencer marketing. Host virtual events, such as webinars and online workshops. Use paid advertising to get clients.
Read more >
What to say to clients who insist on self-hosting - The Admin Bar
Convincing clients to allow you to host their site may feel like an awkward conversation or an uncomfortably hard sell. But if you...
Read more >
How to Get Clients Online: 103 GREAT Ways in 2022
Want to know how to get clients online? Today, I share the 103 best strategies for getting clients now and in the future....
Read more >
Should you Host or Not Host Client Websites?
Should you Host or Not Host Client Websites: the Classic "Build vs Buy" Decision · Build a new Revenue Steam for Your Company...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found