htmlDocs2.sample_curl.mustache Maven / Gradle / Ivy
curl -X {{vendorExtensions.x-codegen-http-method-upper-case}}{{#authMethods}} \
{{#isApiKey}}{{#isKeyInHeader}}-H "{{keyParamName}}: [[apiKey]]"{{/isKeyInHeader}}{{/isApiKey}}{{#isBasicBasic}} -H "Authorization: Basic [[basicHash]]"{{/isBasicBasic}}{{#isBasicBearer}} -H "Authorization: Bearer [[accessToken]]"{{/isBasicBearer}}{{/authMethods}}{{#hasProduces}} \
-H "Accept: {{#produces}}{{{mediaType}}}{{^-last}},{{/-last}}{{/produces}}"{{/hasProduces}}{{#hasConsumes}} \
-H "Content-Type: {{#consumes}}{{{mediaType}}}{{^-last}},{{/-last}}{{/consumes}}"{{/hasConsumes}} \
"{{basePath}}{{path}}{{#hasQueryParams}}?{{#queryParams}}{{^-first}}&{{/-first}}{{baseName}}={{{example}}}{{/queryParams}}{{/hasQueryParams}}"{{#requestBodyExamples}} \
-d '{{example}}'{{/requestBodyExamples}}