Modify basePath per resource in Swagger-Ui - swagger-ui

I want to set the basePath per resource dynamically / alter it via a form field to send a request to this resource via the "try it out" button. Is there any way to manipulate the basePath of the resource?

Related

SAPUI5/OpenUI5 Routing without "#" possible?

I have an application with two routes ("" and "page") with a simple target attached to each (not the same). When I now navigate from the root route "" to "page", the URL in the URL bar of the browser changes to <baseurl>#/page. Also when simply entering <baseurl>#/page in the URL bar of the browser, the proper view is displayed, that was configured via route and target.
Is it possible to configure UI5 - presumably the router - to omit the # in the URL, such that navigation changes the URL to <baseurl>/page and simply entering <baseurl>/page brings me to the corresponding page?
My use case is the following: I want to have an application with OAuth login (implicit grant flow) with a dedicated route/view/controller to handle the callback. The authorization server asks for the callback URL to be configured and forbids the usage of the symbol # in the callback URL, which makes sense as the implicit flow will pass the data back either within the fragement of the URL, which would be appended after the # of my URL violating the URL anatomy.

Dynamically construct url in swagger for each operation

I Check the swagger and we can have URL dynamically for various site based on Server specified. But i have doubt whether is it possible to construct URL dynamically for each operation similar like this
http://{serverurl}/{tagName}/{operation}
I know that server url can be configured at the top of swagger.json but how can we configure/add tag name to the URL dynamically.
Example:
consider i have following scenario
I have following tags,
customer
user
admin
Each tags have various operations associated with them, I need to add the tag name along with operation name dynamically in swagger URL as following
If the operation is getRecentActivity it need to be like
http://www.example.com/{tagname}/{operation}
which is similar like
http://www.example.com/customer/getRecentActivity
Note:- My configuration is in such a way, i know i can directly specify it in path itself by i required it to generate dynamically based on tag name

How to change template page in Umbraco

I have created tamplate page, I have checked it as an allowed template in my document type and I'm still getting error:
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Views/New.cshtml
You cannot access a template directly at its URL. Templates are used by documents (content) to render that specific document in a particular way.
So you would need to create a document from the document type and then access it at the URL that this document is given. Then it will render the page - using the template you have selected.

How to change Symfony 1.x message for secure module

I'm looking for a way how to change default message saying that login is required to see a page created in secure module. Currently it look like this: https://gyazo.com/1477f388deb20e4da3e13c5a957e86ce
Do you know how to change it or create a redirect to a different route ?
Currently I'm using symfony 1.19
You can use
login_module and login_action: Action called when a nonauthenticated user tries to access a page defined as secure in security.yml. The default value is default/login.
secure_module and secure_action: Action called when a user doesn't have the credentials required for an action. The default value is default/secure.
You can override the default pages in two ways:
You can create your own default module in the application's modules/ directory, override all the actions defined in the settings.yml file (index, error404, login, secure, disabled) and all the related templates (indexSuccess.php, error404Success.php, loginSuccess.php, secureSuccess.php, disabledSuccess.php).
You can change the default module and action settings of the settings.yml file to use pages of your application.

Use ASP.NET MVC routing to modify an incoming url

Is there any way of adding a route mapping in Global.asax so that routes that contain a certain string (say "Content") are mapped to a different url (say "Content/gz") if a certain http header is present?
You could parse the header in the Content controller and do a redirect to Content/gz if it's gzipped.
Ended up fixing it by keeping a global Content url that gets updated on each request depending on the presence of the accept-gzip header is present.

Resources