Quarkus Manually Set Open API Url - swagger-ui

So I know I can change the open api path with quarkus.smallrye-openapi.path=/openapi
However I am using an api gateway and at the beginning of my services I identify them with something like https://gateurl/notification/swagger-ui/
How do I change the url for open api so I don't have to manually put /notification/openapi in swagger each time I open the url

You can use quarkus.swagger-ui.urls to set one or more urls. See https://quarkus.io/guides/openapi-swaggerui#quarkus-swaggerui_quarkus.swagger-ui.urls-urls
Example:
quarkus.swagger-ui.urls.default=https://gateurl/notification/swagger-ui/
This will change the url as you want it.
You can also add both (one that goes through the gateway and one direct for example):
quarkus.swagger-ui.urls.default=https://gateurl/notification/swagger-ui/
quarkus.swagger-ui.urls.direct=/q/openapi
quarkus.swagger-ui.urls-primary-name=default
This will give you a dropdown with the gateway one selected by default.
See https://github.com/phillip-kruger/openapi-example for a example.

Related

How to create custom AR button

Does someone have any examples how to generate AR URL?
Reading Web SDK documentation, seems that there is no functionality to do that.
Found https://github.com/Roomle/roomle-button but not sure that`s still way to go since it has not been updated for 2 years.
If you are using the Roomle SDK you can use saveCurrentConfiguration to get the configuration id (hash) of the current configuration. Not sure what you used at the moment to obtain a configuration id but you need to call this in order to save it on the Roomle server and open it in another place.
Also make sure to set the configuratorId URL param when linking to the AR site.

Can I Use Google Tag Manager in Electron?

I am trying to integrate Google Tag Manager into an Electron app,
but it doesn't seem to be working. it seems like gtm codes I planted in the app are NOT sending the analytics data anywhere.
I found this issue on Electron github repo. Seems like some people are having the same issue.
I wonder if it's impossible at all to integrate GTM on Electron, or is there any way around to do this?
[Update]
While reading Alexander Leithner's answer, a further question popped up.
on Google Tag Manager - Dev Guide - Security, it says:
While most of the tag templates in Google Tag Manager are also
protocol relative, it's important to make sure that, when setting up
custom tags to fire on secure pages, those tags are also either
protocol relative or secure.
Does file:// protocol matters because GTM is protocol relative? Wouldn't it be possible to bypass this with GA's forceSSL=true option which can be set on GTM Interface?
[Final Update]
I found the perfect answer in this blog post:
Run Google Tag Manager And Google Analytics In Local Files.
Thank you Eike Pierstorff, for giving me the hint of setting storage to none, it led me to this post.
GTM by default used to use the same protocol as the webpage - that's what "protocol relative" means. I.e. there is a bit of code that loads the GTM library, and if this uses the file protocol (as per the embedded wegpage) it will try to load the library as a file, which does not work. However GTM has switched from protocol relative to https by default, so I don't think GTM is your problem here.
You mention Analytics data, and if this refers to Google Analytics then your problem is not with GTM, it is that GA does not work on local files. Google Analytics uses a cookie to store the clientId (which is needed to aggregate individual hits into sessions/users), and since you cannot set cookies on a local file this does not work.
A possible workaround would be to go to your GA tag in GTM, to the "set fields" settings, set "storage" to "none" (which means that no cookie is set) and pass in a clientId manually.
As this comment by Samuel Attard (MarshallOfSound), who is an Electron developer, states that Google Tag Manager does not work when the including webpage is loaded using a file:// URL.
If you'd instead load your application via http:// (or more preferably via https://), you would be able to use Google Tag Manager.

external hyperlink in guidewire policy center

I need to do an hyperlink to an external page in Guidewire Policy Center.
I am using a function in a gsx enhancement file that returns a String with the url according some parameters.
The problem is that I don't know how to use the url to redirect to another page.
As Carlos mentioned you need to create / use an ExitPoint PCF. The documentation is linked in his answer so I won't do it again, however in case it becomes invalid for some reason here's the long and short of it.
You need to create a new PCF file and make of type exitpoint
In there you make an exitPointParameter, fill out the necessary fields, and you're set.
Then you can put your link wherever you want and just put in the action nameOfExitPointPCF.push("http://www.google.com")
You can put other parameters in there, and it'll build it for you, just refer to the documentation.
For really simple external links, there's one called ExternalUrl.pcf that I assume is in the out of the box configuration.
You must create a ExitPoint PCF file. You can read about that in module documentation. Open the page with Firefox...
PolicyCenter/doc/wwhelp/wwhimpl/js/html/wwhelp.htm#href=Configuration Guide/pagefunc.34.4.html

Showing Task Panes

We have a scenario where we'd like to display a custom URL in an Excel JS Task Pane via an add-in. Specifically, we want to look at a configurable path setting that we'll allow the user to configure and then browse to the appropriate server's page.
From what I've seen, Office locks down the Task Panes pretty decently, I'm not even able to navigate to another page within a task pane and have it re-use the task pane even if I use an anchor tag with a target="_top" or target="_self" attribute.
I'm looking for a way to use JavaScript to perform a ShowTaskPane action or have a variable URL defined in the manifest so depending on some value of a property the user has configured I can route to a dynamically generated URL in the task pane that will then give me user / organizational specific data to insert into the document.
Any ideas?
If you'd like to navigate to a URL in the task pane, define an <AppDomain> element for the URL in the manifest. That should work. https://dev.office.com/docs/add-ins/overview/add-in-manifests#specify-domains-you-want-to-open-in-the-add-in-window
If you cannot define the domain in the <AppDomain> of the app manifest, you can IFrame in the content you want. As long as it supports IFrame-ing
Upadte: After reading the comments on the question I see that you are trying to provide authentication. If the authentication comes from a single set of domains just add them to your manifest and all will be sweet. If the domain changes per auth request you are pretty much out of luck until wildcarded domains are added.

Impossible to cross site ajax api calls in a chrome extension?

I am trying to create a chrome extension that calls my rails app's api. currently the api returns json and it works fine, however when I try to build it into a chrome extension, it says :
Refused to load script from 'http://mysite.com/demo?q=hello?callback=jQuery16409466155741829425_1342489669670&_=1342489677171' because of Content-Security-Policy.
I looked up the document http://code.google.com/chrome/extensions/contentSecurityPolicy.html and it sounds like I can't do this unless I implement my site into a https version. (under "Relaxing the default policy" section) I am not sure if I understood correctly and it feels ridiculous to make such a big change just because of this. Am I misunderstood? Or is there a workaround to this? Thank you.
In a Chrome extension, cross-site XMLHttpRequests are allowed, provided that you define the source in the manifest file - see http://code.google.com/chrome/extensions/xhr.html.
A JSONP implementation loads an external script using the <script> tag, and inserts it in the document. Unless the source is whitelisted through the "content_security_policy" entry, JSONP cannot be used when manifest version 2 is active (do not use manifest v1 to overcome this, because it's deprecated, and a suitable alternative already exist).
When you're unable to receive a JSON response instead of JSONP, use an ordinary request to fetch the data, cut off the callback, then parse it. Eg:
// response is the response from the server
// Received through `XMLHttpRequest`, jQuery.ajax, or whatever you used
// cuts of jQuery....( and the trailing )
response = response.replace(/^[^(]*\(/, '').replace(/\);?$/, '');
By default browsers do not allow this because of the same origin policy.
However you can get around this by making a jsonp request.
As you using jquery this super easy with getJSON method

Resources