forked from loafle/openapi-generator-original
[POSTMAN] Include header description (#17292)
* Include header description * Generate samples
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
{
|
||||
"key": "{{baseName}}",
|
||||
"value": "{{schema.defaultValue}}",
|
||||
"description": "{{{description}}}",
|
||||
"disabled": {{#schema.defaultValue}}false{{/schema.defaultValue}}{{^schema.defaultValue}}true{{/schema.defaultValue}}
|
||||
}{{^-last}},{{/-last}}
|
||||
{{/headerParams}}
|
||||
|
||||
@@ -502,9 +502,9 @@ public class PostmanCollectionCodegenTest {
|
||||
TestUtils.assertFileContains(path, "{ \"key\": \"Content-Type\", \"value\": \"application/json\"");
|
||||
TestUtils.assertFileContains(path, "{ \"key\": \"Accept\", \"value\": \"application/json\"");
|
||||
// header without default value (disabled: true)
|
||||
TestUtils.assertFileContains(path, "{ \"key\": \"Custom-Header\", \"value\": \"\", \"disabled\": true");
|
||||
TestUtils.assertFileContains(path, "{ \"key\": \"Custom-Header\", \"value\": \"\", \"description\": \"Custom HTTP header\", \"disabled\": true");
|
||||
// header with default value (disabled: false)
|
||||
TestUtils.assertFileContains(path, "{ \"key\": \"Another-Custom-Header\", \"value\": \"abc\", \"disabled\": false");
|
||||
TestUtils.assertFileContains(path, "{ \"key\": \"Another-Custom-Header\", \"value\": \"abc\", \"description\": \"Custom HTTP header with default\", \"disabled\": false");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -24,21 +24,25 @@
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json",
|
||||
"description": "",
|
||||
"disabled": false
|
||||
},
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json",
|
||||
"description": "",
|
||||
"disabled": false
|
||||
},
|
||||
{
|
||||
"key": "strCode",
|
||||
"value": "code_one",
|
||||
"description": "Code as header",
|
||||
"disabled": false
|
||||
},
|
||||
{
|
||||
"key": "strCode2",
|
||||
"value": "",
|
||||
"description": "Code as header2",
|
||||
"disabled": true
|
||||
}
|
||||
],
|
||||
@@ -92,6 +96,7 @@
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json",
|
||||
"description": "",
|
||||
"disabled": false
|
||||
}
|
||||
],
|
||||
@@ -140,16 +145,19 @@
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json",
|
||||
"description": "",
|
||||
"disabled": false
|
||||
},
|
||||
{
|
||||
"key": "strCode",
|
||||
"value": "code_one",
|
||||
"description": "Code as header",
|
||||
"disabled": false
|
||||
},
|
||||
{
|
||||
"key": "strCode2",
|
||||
"value": "",
|
||||
"description": "Code as header2",
|
||||
"disabled": true
|
||||
}
|
||||
],
|
||||
@@ -203,11 +211,13 @@
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json",
|
||||
"description": "",
|
||||
"disabled": false
|
||||
},
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json",
|
||||
"description": "",
|
||||
"disabled": false
|
||||
}
|
||||
],
|
||||
@@ -250,16 +260,19 @@
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json",
|
||||
"description": "",
|
||||
"disabled": false
|
||||
},
|
||||
{
|
||||
"key": "Custom-Header",
|
||||
"value": "",
|
||||
"description": "Custom HTTP header",
|
||||
"disabled": true
|
||||
},
|
||||
{
|
||||
"key": "Another-Custom-Header",
|
||||
"value": "abc",
|
||||
"description": "Custom HTTP header with default",
|
||||
"disabled": false
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user