Skip to content

Commit

Permalink
Merge pull request #751 from postmanlabs/release/v1.11.0
Browse files Browse the repository at this point in the history
Release version v1.11.0
  • Loading branch information
VShingala committed Jul 10, 2024
2 parents 2cc40f7 + a366b62 commit 5adb932
Show file tree
Hide file tree
Showing 53 changed files with 623 additions and 477 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## [Unreleased]

## [v1.11.0] - 2024-07-10

### Chore

- Updated postman-collection to v4.4.0.

## [v1.10.1] - 2024-05-06

### Fixed
Expand Down Expand Up @@ -153,9 +159,11 @@ v1.0.0 (May 29, 2020)
- Add ES6 syntax support for NodeJS Request, NodeJS Native and NodeJS Unirest
- Fix snippet generation for powershell and jquery, where form data params had no type field

[Unreleased]: https://github.com/postmanlabs/postman-code-generators/compare/v1.10.0...HEAD
[Unreleased]: https://github.com/postmanlabs/postman-code-generators/compare/v1.11.0...HEAD

[v1.11.0]: https://github.com/postmanlabs/postman-code-generators/compare/v1.10.1...v1.11.0

[v1.10.1]: https://github.com/postmanlabs/postman-code-generators/compare/v1.9.0...v1.10.0
[v1.10.1]: https://github.com/postmanlabs/postman-code-generators/compare/v1.10.0...v1.9.0

[v1.9.0]: https://github.com/postmanlabs/postman-code-generators/compare/v1.8.0...v1.9.0

Expand Down
32 changes: 16 additions & 16 deletions codegens/csharp-httpclient/test/unit/convert.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var expect = require('chai').expect,
sdk = require('postman-collection'),
{ Request } = require('postman-collection/lib/collection/request'),
convert = require('../../lib/index').convert,
mainCollection = require('./fixtures/testcollection/collection.json'),
testCollection = require('./fixtures/testcollection/collectionForEdge.json'),
Expand All @@ -13,7 +13,7 @@ describe('csharp httpclient function', function () {

describe('csharp-httpclient convert function', function () {
it('should return expected snippet', function () {
var request = new sdk.Request(mainCollection.item[10].request),
var request = new Request(mainCollection.item[10].request),
options = {
indentCount: 1,
indentType: 'Tab'
Expand All @@ -30,7 +30,7 @@ describe('csharp httpclient function', function () {
});

describe('convert function', function () {
var request = new sdk.Request(testCollection.item[0].request),
var request = new Request(testCollection.item[0].request),
snippetArray,
options = {
includeBoilerplate: true,
Expand Down Expand Up @@ -89,7 +89,7 @@ describe('csharp httpclient function', function () {
});

it('should create custom HttpMethod when method is non-standard', function () {
var request = new sdk.Request({
var request = new Request({
'method': 'NOTNORMAL',
'header': [],
'url': {
Expand All @@ -116,7 +116,7 @@ describe('csharp httpclient function', function () {
});

it('should add fake body when content type header added to empty body', function () {
var request = new sdk.Request({
var request = new Request({
'method': 'DELETE',
'body': {},
'header': [
Expand All @@ -137,7 +137,7 @@ describe('csharp httpclient function', function () {
});

// it('should only include one System.IO using with multiple files', function () {
// var request = new sdk.Request({
// var request = new Request({
// 'method': 'POST',
// 'header': [],
// 'body': {
Expand Down Expand Up @@ -171,7 +171,7 @@ describe('csharp httpclient function', function () {
// });

it('should include multiple form content when file has multiple sources', function () {
var request = new sdk.Request({
var request = new Request({
'method': 'POST',
'header': [],
'body': {
Expand Down Expand Up @@ -201,7 +201,7 @@ describe('csharp httpclient function', function () {
});

it('should include graphql body in the snippet', function () {
var request = new sdk.Request({
var request = new Request({
'method': 'POST',
'header': [],
'body': {
Expand Down Expand Up @@ -236,7 +236,7 @@ describe('csharp httpclient function', function () {
});

it('should add blank graphql variables when invalid', function () {
var request = new sdk.Request({
var request = new Request({
'method': 'POST',
'header': [],
'body': {
Expand Down Expand Up @@ -271,7 +271,7 @@ describe('csharp httpclient function', function () {
});

it('should not add multiport form content when disabled', function () {
var request = new sdk.Request(mainCollection.item[15].request);
var request = new Request(mainCollection.item[15].request);
convert(request, {}, function (error, snippet) {
if (error) {
expect.fail(null, null, error);
Expand All @@ -288,7 +288,7 @@ describe('csharp httpclient function', function () {
});

it('should run add content as string on raw request', function () {
var request = new sdk.Request(mainCollection.item[12].request);
var request = new Request(mainCollection.item[12].request);
convert(request, {}, function (error, snippet) {
if (error) {
expect.fail(null, null, error);
Expand All @@ -303,7 +303,7 @@ describe('csharp httpclient function', function () {
});

it('should add a file on file request', function () {
var request = new sdk.Request({
var request = new Request({
'method': 'POST',
'url': 'https://google.com',
'header': [],
Expand All @@ -324,7 +324,7 @@ describe('csharp httpclient function', function () {
});

it('should add all enabled headers to request', function () {
var request = new sdk.Request({
var request = new Request({
'method': 'POST',
'url': 'https://postman-echo.com/post',
'header': [
Expand Down Expand Up @@ -360,7 +360,7 @@ describe('csharp httpclient function', function () {
});

it('should skip disabled form url encoded values', function () {
var request = new sdk.Request({
var request = new Request({
'method': 'POST',
'header': [],
'url': 'https://postman-echo.com/post',
Expand Down Expand Up @@ -390,7 +390,7 @@ describe('csharp httpclient function', function () {
});

it('should skip collection initialization when no urlencoded values are enabled', function () {
var request = new sdk.Request({
var request = new Request({
'method': 'POST',
'header': [],
'url': 'https://postman-echo.com/post',
Expand All @@ -415,7 +415,7 @@ describe('csharp httpclient function', function () {
});

it('should skip creating multipart form data content when all values are disabled', function () {
var request = new sdk.Request({
var request = new Request({
'method': 'POST',
'header': [],
'url': 'https://postman-echo.com/post',
Expand Down
14 changes: 7 additions & 7 deletions codegens/csharp-restsharp/test/unit/convert.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var expect = require('chai').expect,
sdk = require('postman-collection'),
{ Request } = require('postman-collection/lib/collection/request'),
convert = require('../../lib/index').convert,
mainCollection = require('./fixtures/testcollection/collection.json'),
testCollection = require('./fixtures/testcollection/collectionForEdge.json'),
Expand All @@ -13,7 +13,7 @@ describe('csharp restsharp function', function () {

describe('csharp-restsharp convert function', function () {
it('should return expected snippet - Async', function () {
var request = new sdk.Request(mainCollection.item[4].request),
var request = new Request(mainCollection.item[4].request),
options = {
indentCount: 1,
indentType: 'Tab',
Expand All @@ -31,7 +31,7 @@ describe('csharp restsharp function', function () {
});

it('should return expected snippet json params', function () {
var request = new sdk.Request(mainCollection.item[5].request),
var request = new Request(mainCollection.item[5].request),
options = {
indentCount: 1,
indentType: 'Tab',
Expand All @@ -50,7 +50,7 @@ describe('csharp restsharp function', function () {
});

describe('convert function', function () {
var request = new sdk.Request(testCollection.item[0].request),
var request = new Request(testCollection.item[0].request),
snippetArray,
options = {
includeBoilerplate: true,
Expand Down Expand Up @@ -108,7 +108,7 @@ describe('csharp restsharp function', function () {
});

it('should trim header keys and not trim header values', function () {
var request = new sdk.Request({
var request = new Request({
'method': 'GET',
'header': [
{
Expand Down Expand Up @@ -136,7 +136,7 @@ describe('csharp restsharp function', function () {
});

it('should generate snippets for no files in form data', function () {
var request = new sdk.Request({
var request = new Request({
'method': 'POST',
'header': [],
'body': {
Expand Down Expand Up @@ -188,7 +188,7 @@ describe('csharp restsharp function', function () {
const sampleUA = 'Safari/605.1.15',
expectValue = `UserAgent = "${sampleUA}",`;

var request = new sdk.Request({
var request = new Request({
'method': 'GET',
'header': [
{
Expand Down
Loading

0 comments on commit 5adb932

Please sign in to comment.