How to hide swagger errors? - swagger-ui

Our swagger.json is lightly modified to display extra information from our api, this results in errors that are shown on top of the screen, but the api below is displayed fine. We would like to hide these errors, as they distract the developers that consume our documentation.
I've tried to set validatorUrl to false/null/undefined but that doesn't work.

Related

How to prevent automatic link preview generation for status update in Twitter API?

I am using Twitter API to post status updates programmatically.
However, when my status contains a link, Twitter automatically adds the preview for that link. Sometimes it's not the desired behaviour, however, I didn't find a property in the API to disable it.
I know we can remove the link preview when posting manually via the Twitter website, as described here Remove Preview Image when Posting a Link on Twitter, so I suspect that it's possible, but API never mentions it.
Also, I am using tweepy library for Python, but happy to resort to the raw POST if that solves my problem.
Any ideas what should I add to the request to prevent the link preview generation?
I actually tried to post to Twitter manually on the web, twice:
With the generated link preview
Explicitly removing the preview (clicking the cross button once the preview is generated)
While doing it, I observed the payload that the website sends to the Twitter servers (with Chrome Dev Tools).
And interestingly enough, the only difference between these two tweets was only one property: card_uri: tombstone://card. More specifically, this property was present in the tweet without the preview.
After that, I actually tried to go and add card_uri property to my status update request, and it actually did the job: the preview was not automatically rendered.
Conviniently, tweepy library has an optional card_uri argument in the update_status menthod.
To sum up, you need to set card_uri='tombstone://card' in your request to prevent Twitter from autogenerating the link previews.
Unfortunately, I didn't find any references to this in the API (or in Google at all), so I am not confident that this is a long-lasting solution, but that's at least something to start with.

Slack Attachment Width and Wrapping Issues

I'm trying to use slack attachments to log application errors but the large fields like the stack trace are behaving weirdly.
First, when using attachments the table seems to be fixed to some arbitrary width, is there anyway to change this so a wider value can be allowed? Otherwise 50+% of the slack window is blank, a complete waste.
Using just text works fine, but there are a number of other smaller fields included that benefit from the field format.
Also I'm having a problem with slack doing strange wrapping when the message is large. Below is just a small snippet with a few characters falling off, but on the full stack there can be substantial loss.
Example (slack message builder)
Adding a single character to the string and now it starts chopping things off (the text is all there and selectable, it's just doing a terrible job at wrapping.)
Example 2
Anyone have any suggestions to get something even slightly more useful?
I would suggest to upload the application errors as text file (Plain Text Snippet) instead putting the info into a message. That way you can post more data and the formatting is also better suited for this kind of data.
You can auto-share your uploaded file in a channel and it will appear as new message. You can also add comments to is if you want to convey more information.
Use the files.upload method to upload your error text as file with the filetype set to text to get a text snippet.
Here is an example how it looks like on Slack, when an app posts a new text snippet as described:

Make Jira Issue Collector popup draggable

As the title suggests, I'm looking for a way to make my company's Jira Issue Collector popup draggable. Many users of a particular site we're developing have complained that this feature is overly-cumbersome to use, since one must close the popup to see the underlying page and hence the error that they want to report.
I thought I could simply wrap the generated source in a Kendo UI Window, but alas, there are many supplementary scripts and CSS files that must be loaded for the popup to render correctly. Trying to make the contents of these local to our site has proved to be basically impossible, due to the sheer amount of code they contain, and the fact that the popup is rendered in an iframe.
So how might we be able to go about this? MTIA :-)
Would also like to find an answer to that... I've been trying all the jQuery tricks I could find, to no avail. There are a few feature requests open at Atlassian for similar features, like making the collector window resizable, or making certain fields required. Guess we'll have to wait for a new Jira release ; )

Why are Google search results in UIWebView not triggering webViewDidFinishLoad?

This is no doubt a more generic issue regarding web pages, but it is easily demonstrated with Google content.
When entering some search criteria on Google's home page the results are not triggering the webViewDidFinishLoad method. The same problem occurs when the coloured Google logo is replaced with some artwork linked to a feature page.
I suspect the page is not being fully loaded due to some javascript or ajax code, so is there a way of detecting this?
This is because Google are using AJAX to do this, the webViewDidFinishLoad delegate method is called when effectively a new resource is loaded into the webview - the equivalent to a page load in your browser, since Google are AJAXing this stuff, it isn't causing that method to get triggered.
There isn't any way to detect when parts of a page are loaded (javascripts, style sheets or ajax responses).
One thing you could be able to do is execute a line of javascript onto the web view that tells you the height of the page, by waiting until the height of the page changes you could know when a result has occurred, you will have to devise some other - more smart check of course when a search query is modified, but my idea would work for the initial google logo screen to the first results page.
Executing that JS every few seconds should be enough.
Hope that helps

Displaying Google results in a frame

Some time in the last year, a tool that I use no longer displays Google search results in one of its frames. I suspect that Google started using JavaScript code to hide itself, if it is being displayed in a frame, which is understandable for most uses.
However, this is a tool that only I use, so I'm not misrepresenting to anyone. I use this tool to research data. One frame has a form where I enter data that I find online. The other frame has the Google results and the pages they link to. I can see both the data form that I'm working on and the changing search/results side-by-side in one window.
I tried going to an older browser version, but I think they are using JavaScript.
Now I have to right-mouse click "open in a new tab" and then click to the new tab, and then close it, a lot of extra overhead when I'm trying to process this repetitive research over and over.
Any ideas? Confirmations as to what has changed? I suppose I could retrieve the page in PHP, strip out the part that hides the page and then put the page source in the other frame. A bit of a challenge for me.

Resources