openApiGenerate don`t generate Models - build.gradle

I use gradle plugin
id "org.openapi.generator" version "5.1.1"
and task in gradle.plugin
openApiGenerate {
generatorName = "kotlin"
inputSpec = "$rootDir/src/main/resources/META-INF/resources/API.v1.yaml".toString()
outputDir = "$rootDir/generated".toString()
apiPackage = "org.openapi.example.api"
invokerPackage = "org.openapi.example.invoker"
modelPackage = "org.openapi.example.model"
configOptions = [
dateLibrary: "java8"
]
}
when I call gradlew openApiGenerate
I got
Execution failed for task ':openApiGenerate'.
> There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
| Error count: 244, Warning count: 0
Errors:
-attribute paths.'/v1/pet/{name}/home/'(post).responses.406.content is unexpected
-attribute paths.'/v1/pet/{name}/home'(post).responses.400.content is unexpected
..........
But if I call in CLI version my yaml generate Models and API
Why it call that Exceptions?
Unfortunatelly, I can not add here even a part of my yaml, because site told me "ït looks you add a lot of code"
If I add
skipValidateSpec = true
I get only API without Models. Why?

Related

Data block not supported with packer version 1.6.1 in hcl2 templates

I created a packer json template on my local system with packer 1.7.7 installed.
Then I upgraded to hcl2 template. However, when I run the packer pipeline over the jenkins node having packer version 1.6.1. It throws this error:
Blocks of type "data" are not expected here.
Error: Unsupported block type
After researching, I realized that packer version 1.6.1 doesn't support data blocks in its templates, but it supports hcl2 templates.
Can anyone explain how I can replace the data block (ref template below) with something supported in packer version 1?
data "amazon-ami" "autogenerated_1"{
access_key = "${var.aws_access_key}"
filters = {
root-device-type = "ebs"
virtualization-type = "hvm"
name = "**** Linux *"
}
most_recent = true
region = "${var.aws_region}"
owners = ["${var.owner_id}"]
secret_key = "${var.aws_secret_key}"
}
when I am trying to consume this ami id in the source block It gives me error.
ami_name = "${var.ami_name}"
associate_public_ip_address = false
force_deregister = true
iam_instance_profile = "abc"
instance_type = "****"
region = "${var.aws_region}"
source_ami = data.amazon-ami.autogenerated_1.id
ssh_interface = "private_ip"
ssh_username = "user"
subnet_id = "subnet-********"
vpc_id = "vpc-***********"
}
The packer pipeline over the jenkins node having packer version 1.6.1.
Its not supported in such an old version. From docs:
Note: Data Sources is a feature included in Packer 1.7 and later

Forge error if using SendStringtoExecute (Command ^C^C)

Actually, the error doesn't raise if I just run (Command ^C^C) from a lisp script.
The case is, my app is a .NET app, and I call some SendStringToExecute to use some lisp code.
To be sure to end the lisp routine, I put at the end:
doc.SendStringToExecute("(Command ^C^C)", True, False, True)
The result of Forge Design Automation is: failedinstruction
Though I can easily find another way to get around this, it cost me more than a day to figure out that it was the (Command ^C^C) cause the failedinstruction, while everything else was working fine.
Hope this bug will be fixed as well as anything similar won't raise up again somewhere else.
I isolate the case like this:
Make a .NET bundle, or just reuse any of your existing one in debug mode
Add the following lisp define function (or it can be a custom command, whatever):
<LispFunction("l+SendStringToExecute")>
Public Shared Function lsp_SendStringToExcute(args As ResultBuffer) As Object
Dim script$ = Nothing
For Each arg As TypedValue In args.AsArray
script = arg.Value
Exit For
Next
script = script.Trim()
If script <> "" Then
Document doc =
AcadApplication.DocumentManager.MdiActiveDocument
doc.SendStringToExecute(script + vbCr, True, False, True)
End If
Return New TypedValue(LispDataType.T_atom)
End Function
Upload the bundle to Forge, create a dump activity and just run the custom lisp solely:
(l+SendStringToExecute "(Command ^C^C)")
The result log is here like this:
...
[02/01/2021 17:23:26] Command: (l+SendStringToExecute "(Command ^C^C)")
[02/01/2021 17:23:26] T
[02/01/2021 17:23:26] Command: (Command ^C^C)
[02/01/2021 17:23:26] *Cancel*
[02/01/2021 17:23:26] Command: nil
[02/01/2021 17:23:27] End AutoCAD Core Engine standard output dump.
[02/01/2021 17:23:27] Error: AutoCAD Core Console failed to finish the script - an unexpected input is encountered.
[02/01/2021 17:23:27] End script phase.
[02/01/2021 17:23:27] Error: An unexpected error happened during phase CoreEngineExecution of job.
[02/01/2021 17:23:27] Job finished with result FailedExecution
[02/01/2021 17:23:27] Job Status:
{
"status": "failedInstructions", ...
Thanks for reporting, I'm not sure if we allow command expression in accoreconsole.
The suggestion is to use following way.
[CommandMethod("CANCELOUTSTANDING")]
public void TESTCANCEL()
{
var doc = Application.DocumentManager.MdiActiveDocument;
string cmd = string.Format("{0}", new string((char)03, 2));
doc.SendStringToExecute(cmd, true, false, true);
}

qupzilla compile error in yocto krogoth version

When I compile qupzilla 2.0 supports qt5.6 base its giving below error.
Project MESSAGE: Using following defines: | Project MESSAGE:
QUPZILLA_SHAREDLIBRARY QUPZILLA_VERSION=\"2.0.2\"
QT_NO_URL_CAST_FROM_STRING QT_USE_QSTRINGBUILDER
USE_LIBPATH=\"/usr/lib\" USE_DATADIR=\"/usr/share/qupzilla\"
GIT_REVISION=\"635d392e66\" QZ_WS_X11 |
Project ERROR: Unknown
module(s) in QT: x11extras |
ERROR: Error calling /home//build/tmp/sysroots/x86_64-linux/usr/bin/qt5/qmake
-makefile -o Makefile -r /home/build/tmp/work/cortexa9hf-neon-phytec-linux-gnueabi/qupzilla/5.6.3+gitAUTOINC+6e445dcc05-r0/git/QupZilla.pro
below is my recipe
DESCRIPTION = "falkon browser https://github.com/Cockatrice/Cockatrice/issues/205"
LICENSE = "GPL-3.0"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=1d4ea452ed7ae778545f2dda5963c9fd"
require recipes-qt/qt5/qt5-git.inc
SRC_URI = "git://github.com/QupZilla/qupzilla.git;branch=v2.0"
SRCREV = "${AUTOREV}"
S = "${WORKDIR}/git"
DEPENDS = " qtbase qtwebengine qtx11extras qtdeclarative"
inherit qmake5
INSANE_SKIP_${PN} += "installed-vs-shipped"
Is anything is missing?
Please ensure that you have x11 in DISTRO_FEATURES and you may also want to add
require recipes-qt/qt5/qt5.inc

How can we provide multiple values for a Single argument either in services.conf or comands.conf

Here I am trying to use a plugin to check whether the service running or not, if there is any warning or any critical action required, at the same time the performance parameter.
We have used below plugin to check if a server is alive or not and read it's performance data JSON
https://github.com/drewkerrigan/nagios-http-json
I am trying to read a JSON file as below which is hosted on http://localhost:8080/sample.json
The plugin works perfectly on Command line, it shows me all the Metrics available.
$:/usr/lib/nagios/plugins$ ./check_http_json.py -H localhost:8080 -p sample.json -m metrics.etp_count metrics.atc_count
OK: Status OK.|'metrics.etp_count'=101 'metrics.atc_count'=0
But when I try the same in Icinga2 configuration, it doesn't show me this performance metrics, although it doesn't give any error but at the same time it don't show any value.
find the JSON, Command.conf and Service.conf as follows.
{
"metrics": {
"etp_count": "0",
"atc_count": "101",
"mean_time": -1.0,
}
}
Below are my commands.conf and services.conf
commands.conf
/* Json Read Command */
object CheckCommand "json_check"{
import "plugin-check-command"
command = [PluginDir + "/check_http_json.py"]
arguments = {
"-H" = "$server_port$"
"-p" = "$json_path$"
"-w" = "$warning_value$"
"-c" = "$critical_value$"
"-m" = "$Metrics1$,$Metrics2$"
}
}
services.conf
apply Service "json"{
import "generic-service"
check_command = "json_check"
vars.server_port="localhost:8080"
vars.json_path="sample.json"
vars.warning_value="metrics.etp_count,1:100"
vars.critical_value="metrics.etp_count,101:1000"
vars.Metrics1="metrics.etp_count"
vars.Metrics2="metrics.atc_count"
assign where host.name == NodeName
}
Does any one have any idea how can we pass multiple values in Command.conf and Service.conf??
I have resolved the issue.
I had to change the Plugin file "check_http_json.py" for below code
def checkMetrics(self):
"""Return a Nagios specific performance metrics string given keys and parameter definitions"""
metrics = ''
warning = ''
critical = ''
if self.rules.metric_list != None:
for metric in self.rules.metric_list:
Replaced With
def checkMetrics(self):
"""Return a Nagios specific performance metrics string given keys and parameter definitions"""
metrics = ''
warning = ''
critical = ''
if self.rules.metric_list != None:
for metric in self.rules.metric_list[0].split():
Actually the issue was the list was not handled properly, so it was not able to iterate through the items in the list, it was considering it as a single string due to services.config file.
it had to be further get split to get the items in the Metrics string.

How do I tell my dancer app to serialize objects in its cache?

I'm using a CHI interface to memcached (or File in devel) in my Dancer app, but I'm getting an error in the serializer when I cache an object. I have the following in my dancer config:
engines:
JSON:
allow_blessed: 1
convert_blessed: 1
What else do I need?
Error message:
Error while loading bin/app.pl: encountered object 'C3M::CMF=HASH(0x3ef8aa8)', but neither allow_blessed nor convert_blessed settings are enabled at /usr/lib/perl5/site_perl/5.10/CHI/Serializer/JSON.pm line 19.
CHI::Serializer::JSON doesn't use the same serializer as Dancer::Serializer::JSON. Dancer::Serializer::JSON uses setting('engines') in config.yml, but there's no way to send configuration options to CHI::Serializer::JSON.
workaround:
use CHI::Serializer::JSON;
my $JSON = JSON->new->utf8->canonical;
$JSON->allow_blessed(1);
$JSON->convert_blessed(1);
*CHI::Serializer::JSON::serialize = sub { $JSON->encode( $_[1] ) };
*CHI::Serializer::JSON::deserialize = sub { $JSON->decode( $_[1] ) };