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.

may the host and schemes be optional?

See original GitHub issue

I upgraded recently from guardrail 0.43.0 to 0.45.2, and in doing so the cli crashed:

Exception in thread "main" java.net.URISyntaxException: Expected scheme-specific part at index 5: http:
        at java.net.URI$Parser.fail(URI.java:2848)
        at java.net.URI$Parser.failExpecting(URI.java:2854)
        at java.net.URI$Parser.parse(URI.java:3057)
        at java.net.URI.<init>(URI.java:673)
        at com.twilio.guardrail.Common$.$anonfun$prepareDefinitions$8(Common.scala:55)
        at cats.data.NonEmptyList.map(NonEmptyList.scala:76)
        at com.twilio.guardrail.Common$.$anonfun$prepareDefinitions$7(Common.scala:53)
        at scala.Option.map(Option.scala:146)
        at com.twilio.guardrail.Common$.$anonfun$prepareDefinitions$1(Common.scala:53)

Looks like guardrail now expects host and schemes to be defined: https://github.com/twilio/guardrail/blob/320afebc2c26f800de7699bd009b314d4ed4c6be/modules/codegen/src/main/scala/com/twilio/guardrail/Common.scala#L55

Are these required in swagger or can they be optional?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
blast-hardcheesecommented, Mar 29, 2019

@dsilvasc Excellent! Thanks for confirming!

0reactions
blast-hardcheesecommented, Mar 31, 2019

Resolved in 0.45.3, which has now been released. Feel free to reopen if necessary, as I deviated slightly from the version you tested, in order to maintain the default scheme (http) in the case of having the domain segment of the host specified.

Read more comments on GitHub >

github_iconTop Results From Across the Web

API Host and Base Path - Swagger
host and schemes can be omitted for a more dynamic association. In this case, the host and scheme used to serve the API...
Read more >
Parsing URL with port and without scheme - Stack Overflow
I am trying to parse a URL in Go and get host and scheme from the URL. But while parsing the ...
Read more >
OpenAPI Specification v3.1.0 | Introduction, Definitions, & More
description, string, An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text ...
Read more >
URL blocklist filter format - Chrome Enterprise and Education ...
This field is optional, and must be followed by ://. For details, see Schemes you can use. Not case sensitive. host (required). A...
Read more >
domaindrivendev/Swashbuckle.WebApi - GitHub
This provides a convenient way for users to browse documentation for different API versions. Describing Security/Authorization Schemes. You can use BasicAuth, ...
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