How to suppress code parameter in Swashbuckle - swashbuckle

I have an Azure function app where Swashbuckle is configured and working with minimal configuration.
Swashbuckle is generating the web pages with parameters as desired, but the parameter code is added to every definition page.
How can I suppress the code parameter?

Configure Swashbuckle
There is an option for this: opts.AddCodeParameter = false;

Related

GCP Deployment Manager: Templates automcomplete/validation?

It's hard to navigate through all the docs given the number of services and properties involved in creating templates for the Deployment Manager. I wonder if there is a solution for that. I imagine that code editors like VS-Code are supposed to have autocomplete, maybe GCP provides something to help write templates faster.
I doubt that there is something like autocomplete for Deployment Manager Templates.
Deployment Manager accepts both Jinja and Python syntax in the same configuration as mentioned in
Template Syntax
Deployment Manager accepts both Jinja and Python templates. You can import templates in both languages in the same configuration.
As OP stkvtflw mentioned, there is already documentation which covers all schemas in GCP Documentation - Supported resource types.
Additional samples can be found in Github repository, which can be found here
Regarding the possibility to use autocomplete in Deployment Manager, there is a still opened Github Feature Request to Add support for auto completion of configuration files.
In addition to that, you could file a Feature Request in Google Issue Tracker.

KeyError: 'queryStringParameters' while testing PATCH on POSTMAN

I have a api set up with api gateway for PATCH method which is integrated with an lambda function.
I am trying to test my api with POSTMAN.
As you can see i am facing the above error.
I have used the same method to pull the query parameter in other methods like GET,PUT,DELETE worked like a charm.
I am using Python to script my lambda.
I figure this error is more related to API end than of the code.
Could any one help me out of this?
Apparently i had missed to click on the radio button to have a proxy integrate while integrating with my lambda function.
PATCH can work with query parameters.

How to return Swagger UI HTML as string using Swashbuckle

In ASP.NET Core or Classic ASP.NET we can use Swashbuckle to Generate beautiful API documentation, including a UI to explore and test operations, directly from your routes, controllers and models.
I have different user case. I already have swagger .json file (version 2.0). I want to load that file into Swashbuckle, and can Swashbuckle return Swagger UI HTML as string?
Once i get string, i am going to use it somewhere else in down the line process
Swashbuckle just uses SwaggerUI which is open source. You can just use SwaggerUI directly.
SwaggerUI
You can also use something like this to visualize your Swagger.
Swagger Editor

How specify proxy in Katalon programically?

I am have list of proxies and I need repeat one test through every proxy. How to specify proxy in Katalon programically? I havent found any groovy methods for this is Katalon documentation.
Maybe I can specify proxy in Katalon using command string options? Then I can write programm that execute katalon for every proxy, but i dont find this command string options in docs
Katalon Studio version 5.3.1 has supported passing proxy settings to console mode command. It is not yet available to set proxy settings from test script.

Full URLs in emails in CakePHP unittest

I would like to get full URLs inside emails that get triggered by my tests in CakePHP 3.2. I tried with the full-options for $this->Html->image('image.jpg', ['fullBase' => true]) and $this->Url->build('/', true) but they don't seem to work in tests.
How can I force full URLs in emails while testing?
There is no host when running an app in the CLI environment as it's not a web request. You'll have to configure the base URL on your own.
Quote from the docs:
App.fullBaseUrl
The fully qualified domain name (including protocol)
to your application’s root. This is used when generating absolute
URLs. By default this value is generated using the $_SERVER
environment. However, you should define it manually to optimize
performance or if you are concerned about people manipulating the Host
header. In a CLI context (from shells) the fullBaseUrl cannot be read
from $_SERVER, as there is no webserver involved. You do need to
specify it yourself if you do need to generate URLs from a shell (e.g.
when sending emails).
So you can either configure it via App.fullBaseUrl
Configure::write('App.fullBaseUrl', 'http://localhost');
or a little more specific so that it only applies to the router, via Router::fullBaseUrl()
Router::fullBaseUrl('http://localhost');
You can either configure it in your application configuration (config/app.php), so that even on regular web requests your app isn't building it dynamically anmore, and consequently have it available in the test environment too, or, if you just want to apply to the test suite, put it either in your tests bootstrap (tests/bootstrap.php) to have it apply globally, or set it in your individual test case files.
That's what the CakePHP core test suite is doing it too btw. Whenever you're unsure, having a look at the core tests might give you a hint.
See also
Cookbook > Configuration > General Configuration
API > \Cake\Routing\Router::fullBaseUrl()
https://github.com/cakephp/cakephp/blob/3.2.13/tests/bootstrap.php#L70
https://github.com/cakephp/.../blob/3.2.13/tests/TestCase/Routing/RouterTest.php#L74
https://github.com/cakephp/.../3.2.13/tests/TestCase/Routing/RouterTest.php#L520-L529