-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed url conversion when exporting to Postman #2885
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sanjai0py
reviewed
Aug 26, 2024
@@ -203,15 +232,17 @@ export const exportCollection = (collection) => { | |||
header: generateHeaders(itemRequest.headers), | |||
url: { | |||
raw: itemRequest.url, | |||
auth: generateAuthFromUrl(itemRequest.url), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure Postman supports this schema?
Postman Schema
{ "$schema": "http://json-schema.org/draft-07/schema#", "description": "If object, contains the complete broken-down URL for this request. If string, contains the literal request URL.", "$id": "#/definitions/url", "title": "Url", "oneOf": [ { "type": "object", "properties": { "raw": { "type": "string", "description": "The string representation of the request URL, including the protocol, host, path, hash, query parameter(s) and path variable(s)." }, "protocol": { "type": "string", "description": "The protocol associated with the request, E.g: 'http'" }, "host": { "title": "Host", "description": "The host for the URL, E.g: api.yourdomain.com. Can be stored as a string or as an array of strings.", "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" }, "description": "The host, split into subdomain strings." } ] }, "path": { "oneOf": [ { "type": "string" }, { "type": "array", "description": "The complete path of the current url, broken down into segments. A segment could be a string, or a path variable.", "items": { "oneOf": [ { "type": "string" }, { "type": "object", "properties": { "type": { "type": "string" }, "value": { "type": "string" } } } ] } } ] }, "port": { "type": "string", "description": "The port number present in this URL. An empty value implies 80/443 depending on whether the protocol field contains http/https." }, "query": { "type": "array", "description": "An array of QueryParams, which is basically the query string part of the URL, parsed into separate variables", "items": { "type": "object", "title": "QueryParam", "properties": { "key": { "type": [ "string", "null" ] }, "value": { "type": [ "string", "null" ] }, "disabled": { "type": "boolean", "default": false, "description": "If set to true, the current query parameter will not be sent with the request." }, "description": { "$ref": "#/definitions/description" } } } }, "hash": { "description": "Contains the URL fragment (if any). Usually this is not transmitted over the network, but it could be useful to store this in some cases.", "type": "string" }, "variable": { "type": "array", "description": "Postman supports path variables with the syntax `/path/:variableName/to/somewhere`. These variables are stored in this field.", "items": { "$ref": "#/definitions/variable" } } } }, { "type": "string" } ] }
https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html
bumping this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The Postman export function is broken at the moment.
Fixes #2496.
This PR fixes the following issues :
I added a lot of unit tests to cover that part :)
With Bruno :
After import in Postman, before this PR :
After import in Postman, after this PR :