Contributions
Re: Failed to fetch default response
Himsens,there's no way to do this unfortunately.Swagger UI won't let you "fake" a response when the entire request fails. If you want this behavior, I suggest putting a load balancer or reverse proxy in front of your server that is capable of sending back HTTP 500 responses when your API server is unavailable.2.5KViews1like0CommentsRe: Download updated Swagger JSON after setting host
HisuhasOracle! There's no way to haveSwagger UI produce a JSON document based on the host information you're setting withsetHost(), but you can have it dynamically change based on the URL of your swagger.json by leavinghost out completely: If the host is not included, the host serving the documentation is to be used (including the port) OpenAPI 2.0 Specification1.2KViews2likes0CommentsRe: Codeblock color and text color changed itself
Hicricketics! We recently changed the code block styling to be more consistent throughoutSwagger UI - previously, the styling differed based on where your code block was in your document. We may change it again in the future, as there's a larger review of our design and UX going on. In the meantime, here's some custom CSS that may restore the functionality you want: .swagger-ui .markdown code, .swagger-ui .renderedMarkdown code { color: white; background-color: black; }2KViews1like2CommentsRe: Can "try it out" be disabled/hidden from online editor
Swagger UI is free as well, you can find it onGitHub:http://github.com/swagger-api/swagger-ui/ You don't need to switch toSwagger UI to use the option I mentioned, though.Swagger Editor hasSwagger UI embedded, so you can just pass anySwagger UI option you'd like toSwagger Editor and it will be handed off toSwagger UI.15KViews1like1CommentRe: Code block markdown in description help required
No problem! Glad you got it fixed. Here's a page with some helpful information about multiline strings in YAML:https://yaml-multiline.info Specifically, you might want to take a look at what the | character is doing for you behind the scenes, and consider using ablock indentation indicator if you really want to change how indentation detection is happening.3.3KViews2likes1CommentRe: Code block markdown in description help required
Hi cricketics! You're seeing this because your `"message"` line is less indented than the first line of your string, which has the triple-backticks. YAML requires that you not go below the initial line's indentation level when writing a multiline string.3.3KViews2likes3Comments