My command line is:
openapi-generator generate -g csharp-netcore --api-package net.windward.rest.dotnet.client -packageName=net.windward.rest.dotnet.client -packageVersion=20.1 -useDateTimeOffset=true -o clients/csharp -i oas.yaml
And it does not like the -useDateTimeOffset. I've tried --useDateTimeOffset and I've tried spacing the true instead of the =. THey all fail.
Please try the following instead using --additional-properties:
openapi-generator generate -g csharp-netcore --api-package net.windward.rest.dotnet.client --additional-properties useDateTimeOffset=true,packageName=net.windward.rest.dotnet.client,packageVersion=20.1 -o clients/csharp -i oas.yaml
Related
is there any lvm.conf editor?
I'm trying to set global_filter, use_lvmtad and some other options, currently using sed:
sed -i /etc/lvm/lvm.conf \
-e "s/use_lvmetad = 1/use_lvmetad = 0/" \
-e "/^ *[^#] *global_filter/d" \
-e "/^devices {/a\ global_filter = [ \"r|/dev/drbd.*|\", \"r|/dev/dm-.*|\", \"r|/dev/zd.*|\" ]"
but I don't like this too much, is there any better way?
I found only lvmconfig tool, but it can only display certain configuration sections, and can't edit them.
If you using Ubuntu variant then you can use the LVM GUI to configure and manage the LVM. Refer this link
It seems that augtool is exactly what I was looking for.
These two packages should be enough to proper processing lvm.conf file:
apt install augeas-tools augeas-lenses
Example usage:
augtool print /files/etc/lvm/lvm.conf
And you should get the whole parse tree on stdout.
If the parser fails you won’t get any output, print the error message using:
augtool print /files/etc/lvm/lvm.conf/error
The augtool equivalent for the sed command from the original question:
augtool -s <<EOT
set /files/etc/lvm/lvm.conf/global/dict/use_lvmetad/int "0"
rm /files/etc/lvm/lvm.conf/devices/dict/global_filter
set /files/etc/lvm/lvm.conf/devices/dict/global_filter/list/0/str "r|^/dev/drbd.*|"
set /files/etc/lvm/lvm.conf/devices/dict/global_filter/list/1/str "r|/dev/dm-.*|"
set /files/etc/lvm/lvm.conf/devices/dict/global_filter/list/2/str "r|/dev/zd.*|"
EOT
Sample Markdown used as a Reproducible Example (GitHub hyperlink)
I pasted the markdown from the hyperlink above into the Atom text editor and saved it as a documentation.md file. I can run the following two seperate Pandoc commands and each of them works to reduce the margins on my pdf -and- increase the font size to 12 on the output pdf.
pandoc -s -V documentation.md geometry:margin=1in -o documentation.pdf
pandoc -s -V documentation.md fontsize=12 -o documentation.pdf
When I combine the two commands into the following I get the error shown below. Is there a problem in my Pandoc syntax?
pandoc -s -V documentation.md geometry:margin=1in fontsize=12 -o documentation.pdf
pandoc geometry:margin=1in openBinaryFile: does not exist (No such file or
directory)
Try this:
pandoc documentation.md -V geometry:margin=1in -V fontsize:12pt -s -o documentation.pdf
Pandoc's FAQs state:
How do I change the margins in PDF output?
The option
-V geometry:margin=1in
will set the margins to one inch on each side.
Note that geometry:margin=1in is the value of the -V flag. However, you have the filename documentation.md between the flag and its value. Therefore, you are causing the value of the flag to be documentation.md and geometry:margin=1in is assumed to be a filename. After all, any string of text no preceded by a flag should be a filename (which explains the "No such file or directory" error).
By way of explanation, the documentation for the -V flag gives this format:
-V KEY[:VAL]
Note that the brackets in [:VAL] indicate that that part is optional. So -V KEY is completely valid with no value, which means that -V documentation.md resulted in documentation.md being the KEY of the -V flag (with a default VAL of true as per the docs).
Admittedly, -V geometry:margin=1in is an especially weird case and its easy to see how one might be confused by it. In this case however, -V is the flag, geometry is the "KEY" and margin=1in is the "VAL". I realize that margin=1in looks like a KEY=VAL, but in this instance it is all a "VAL" on its own. Presumably, Pandoc does some further processing on it later to break the "VAL" up into its parts.
Of course, fontsize is another variable, so you need a second -V flag to define that variable: -V fontsize:12pt.
Finally, the -s flag does not accept a value, so I moved it so that that is clear.
You have to write the -V twice as well, directly in front of the variable options you want to set:
pandoc -s documentation.md -V geometry:margin=1in -V fontsize=12 -o documentation.pdf
see http://pandoc.org/getting-started.html and http://pandoc.org/MANUAL.html
problem
i want to play with a perl package called Mail::SPF and there is a Build.PL issue. now i would like to modify the source before running the buildPhase.
for c/c++ based projects this is working well but for perl it fails:
nix-shell -I nixpkgs=nixpkgs_spamassassin/ -A perlPackages.YAML
error: attribute ‘perlPackages’ in selection path ‘perlPackages.YAML’ not found
so what am i doing wrong?
nix-env
nix-env -I nixpkgs=nixpkgs_spamassassin/ -f nixpkgs_spamassassin/ -qaP | grep MailSPF
perlPackages.MailSPF perl-Mail-SPF-v2.9.0
#danbst
nix-shell '<nixpkgs>' -A perlPackages.YAML
is what i was searching for! thanks
I try to get Read all HTTP URLs from PCAp file using this command line command:
tshark -R -e http.request.uri -r C:file.pcap
And got the message
tshark: -R without -2 is deprecated. For single-pass filtering use -Y.
What's wrong with my filter ?
Using the filter as single pass, like suggested, does it for me:
tshark -Y http.request.uri -r capturefile
In xcode it is a good idea to generate documentation during build your library.. I am using headerdoc2HTML command .. to make it run with build phase I've added it to build phase script (shell script) like this:
headerdoc2html -o "outputPath" "myHeader.h"
But it always gives me an error:
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure
Even the documentation is generated but it gives me an error .. if I remove this command every thing goes fine!
I checked with -d parameter I did not get where is the error
Any help with that? is there a way to check if the command did not return 0 then don't show error (ignore all warnings and errors)?
EDIT:
I just made sure that the command is ok and no problem with it by doing this check:
if headerdoc2html -q -j -o "outputPath" "myHeader.h"
then
echo "Documents generated successfully!"
fi
While the problem is from the command it self and don't effect the over all build phase so it is good idea to not show the warnings and errors from headerdoc2html command.
The easiest way to do that is to hide any emitted errors from it like by redirect errors to null like this:
headerdoc2html -o "outputPath" "myHeader.h" >/dev/null 2>/dev/null