How to set home page as swagger ui page in a quarkus rest easy reactive lamda application - openapi

I have included the gradle dependency io.quarkus:quarkus-smallrye-openapi and trying to make the swagger ui page as the default home page for my quarkus rest reasy rective lamda application.

Related

RESTful interface to get Kibana Visualization or Dashboard URL's

Using the elastic REST API and the JSON structure of a particular visualization i have loaded(imported) my charts(visualization)in ".kibana" index .The same is shown in list of visualizations stored in kibana UI .But instead of coming to the UI is there a way to get the URL or the shareable iframe link of this newly created visualization through some rest api .
In short is there a complete REST based flow to create a visualization and retrieve its shareable URL so it can be embedded at required place .

How to create url in AEM once i created page in author view?

I am reading thru AEM WCM and had a question that once after creating page in lower environments and publish where to check that look and feel? Is there any url to check? or will check in AEM only?
can anyone give example format url?
TKs
Have a look at the Adobe Authroing documentation, understand the concept and architecture of the AEM. As AEM is on the REST based concept implementation your page content path will be the page url (if you don't have any sling internal redirects or Dispatcher level url hiding implementations).
Just to explain you taking an geometrixx website OOTB example.
Working at author end in local instance at port 4502:
Example if you have created a test page under /content/geometrixx/en/toolbar/
the test page url will be http://localhost:4502/cf#/content/geometrixx/en/toolbar/testpage.html
preview mode can be tested appending wcmmode=disabled at the end of your url as shown below
http://localhost:4502/cf#/content/geometrixx/en/toolbar/testpage.html?wcmmode=disabled
from side kick preview option
If you have published the page (assuming your publish instance is
running at 4503 on local)
your page path will be http://localhost:4503/content/geometrixx/en/toolbar/testpage.html
If you are using touch UI then you can see the preview mode by:
Edit link: http://localhost:4502/editor.html/content/geometrixx/en/toolbar/testpage.html
Preview Link:
http://localhost:4502/content/geometrixx/en/toolbar/testpage.html?wcmmode=disabled
You should have a Replication Agent and configuration setup there to publish the pages. There is a default agent comes with AEM where you can publish the changes from author to publish environment.

How to create an authentication free aikau webscript in Share

I have the need to create a page in the Alfresco Share context that should be accessible without authentication. When using the page framework it seems pretty straight forward since you can add <authentication>none</authentication> to the page definition.
When using aikau the page definitions is gone and I'm left with the get.desc.xml-webscript file which does to my knowledge does not support the authentication element. Anyone having an idea?
It looks like you are accessing your webscript through the auth-page url:
http://<ip>:<port>/<context>/page/ap/ws/<webscript>
Please note that ap in the URL stands for the authenticated page defined under the directory:
/<project-name>/src/main/webapp/WEB-INF/surf-config/pages/auth-page.xml
This section :
<config evaluator="string-compare" condition="UriTemplate">
<uri-templates>
<uri-template id="remote-node-page">/{pageid}/p/{pagename}/{store_type}/{store_id}/{id}</uri-template>
<uri-template id="remote-site-page">/site/{site}/{pageid}/p/{pagename}</uri-template>
<uri-template id="remote-page">/{pageid}/p/{pagename}</uri-template>
<uri-template id="sitepage">/site/{site}/{pageid}/ws/{webscript}</uri-template>
<uri-template id="userpage">/user/{userid}/{pageid}/ws/{webscript}</uri-template>
<uri-template id="page">/{pageid}/ws/{webscript}</uri-template> <!-- this template matches your URI which means the resolution of which page/webscript would be accessed will rely fully on it -->
</uri-templates>
</config>
of your
/<project-name>/src/main/webapp/WEB-INF/surf.xml
Defines page/webscript resolution policy based on URI-templates. For further infos on how to set/exploit page uri templates please visit this tutorial
The auth-page has authentication set USER as shown here which would result in asking for authentication before even trying to resolve the webscript
So if you want to access some aikau page in un-authenticated mode (as a guest user) you should be using the noauth-page like this:
http://<ip>:<port>/<context>/page/na/ws/<webscript>
FYI: You do not have to set your webscript authentication at all as it defaults to none when the authentication tag is not present
It's worth being aware that you can create your own template pages for Aikau. You aren't limited to the pages that are defined in either Share or clients created via the Aikau Maven Archetype (see https://github.com/Alfresco/Aikau/blob/master/tutorial/chapters/Tutorial1.md).
In Share for example you have 4 templates available out-of-the-box:
dp (Dynamic Page - what you should use in most cases)
hdp (Hybrid Dynamic Page - where the header and footer and rendered above and below the page)
rp (Remote Page - accesses a page stored on the Alfresco Repository)
hrp (Hybrid Remote Page) - accesses a remote page stored on the Alfresco Repository and renders it between the standard header and footer.
In clients created by the Aikau Maven Archetype you have:
- na (Not Authenticated) - renders a page but doesn't require a user to be authenticated
- ap (Aikau Page) - renders a page for authenticated users.
Aikau pages make use of URI templates to reduce the amount of Surf objects that are required to build a page - however you always have the option of building your own pages.
See the examples in the archetype project for reference, the no-authentication page is defined here
Both this page and the standard authenticated page both re-use the standard template type which ultimately maps to the standard page FreeMarker template
However, if you want to build your own pages and templates you can - you're not limited to using what is provided by default.

How to call web service method from Web content display in Liferay 6.2?

I am creating a page using Liferay 6.2 where i need to display html contents sent as response from web service method. After seeing the customization and features available in web content display, i am planning to use them. As i am new to VM and FTL, i am not sure how to call web service method from web content display content. Please help me.
You can create a custom velocity tool as explained in this post.

How to make YouTube API Calls from GWT App

I need to integrate YouTube API into my GWT web application. I need to make YouTube API calls such as the following:
UPLOAD: https://developers.google.com/youtube/2.0/developers_guide_protocol_browser_based_uploading
CHECK STATUS: https://developers.google.com/youtube/2.0/developers_guide_protocol_checking_video_status
SET DEVELOPER TAGS: https://developers.google.com/youtube/2.0/developers_guide_protocol_uploading_videos#Assigning_Developer_Tags
In order to circumvent browser's same origin restrictions, the calls have to be CORS calls.
How can I make these YouTube API calls from my GWT web application? A small code sample would be greatly appreciated.
Note that I have tried using YouTube Direct Lite, but it seems it doesn't allow setting developer tags, which is crucial for me.
YouTube has provided a sample showing how YouTube API CORS calls should be made:
Source code for the sample
Demo of the sample
You can integrate the JavaScript from the sample into your GWT app using GWT's JavaScript Native Interface (JSNI):
More information on JSNI
Note that the sample JavaScript uses XMLHttpRequest which is not supported by some browser versions:
CORS/XMLHttpRequest support matrix
I haven't used the YouTube API personally, but from what I can deduce from the API, you essentially need to accomplish three things
Make HTTP POST request calls via RequestBuilder in GWT as outlined here
Create and parse through XML
Make use of FormPanel with a FileUpload Widget to handle the actual file upload
What I linked, which provides some good code examples, should certainly help you make the API calls in GWT as required by YouTube. To make the HTTP calls CORS, see this SO post.