I'm using the Windows Postman v7.13.0 app and it's throws a cryptic message when trying to Generate a Collection from a OpenAPI spec.
Is there any way to get more detail on what the issue is? Any validator or debug option in PostMan?
Couldn’t generate collection
Invalid schema supplied
NOTE: The same openapi: 3.0.2 spec works in Swagger UI and with the OpenAPI Generator.
I also checked the PostMan console and no logs appear to describe the issue further.
I had this very same issue and got it fixed by validating my definition as indicated on the previous comment using editor.swagger.io
I got a similar error in Postman:
Couldn’t generate collection
Could not convert the given schema
Then I tried to upload swagger.json to https://editor.swagger.io/ as proposed above. It showed many errors.
I opened swagger.json in Notepad and in the first line replaced swagger with openapi. Then saved the file and imported in Postman as usual (File > Import..., Upload Files).
Related
I am looking to create a pull request template in GitHub where Github is able to take the YAML front matter similar to Issue_templates and parse it into the correct fields.
In Github docs under Supported file types => config.yml it claims to allow pull request template configuration.
GitHub Docs to Example below:
---
name: Name of pull request template
about: "Use this template for setting up your PR description"
title: "Add support for the new feature"
labels: bug, enhancement, customer-request
assignees: self
---
The only relevant information was to pass the keys as query parameters to display one of the multiple templates, see link below.
Docs:
About issue and pull requests
Supported query parameters
Having tested this personally, it appears that GitHub doesn't parse YAML front matter for Pull Request templates at present. You can have a single default template pull_request_template.md, and custom ones in PULL_REQUEST_TEMPLATE/ accessible with the GET query template=. In both cases however, a front matter block will be displayed as part of the body, not parsed.
The documentation isn't very clear about this, but a config.yml can only be used to configure the issue template chooser. At present, there is no pull request template chooser to configure.
You can submit a feature request for this using the contact support form, and selecting Pull requests and code review for the What part of GitHub is your feedback about? option. That is according to this answer on the community forum.
One way around this, in the meantime, might be to leave a message in your default (pull_request_template.md), pointing to for example, your CONTRIBUTING.md. Then, in that file, you could include links for each type of pull request with custom GET queries. For example, with PULL_REQUEST_TEMPLATE/custom.md the link might be (url broken up for convenience):
https://github.com/<user>/<repo>/compare/<base>...<compare>?
template=custom.md
&title=Add+support+for+the+new+feature
&labels=bug%2Cenhancement%2Ccustomer-request
&assignees=self
As per the supported query params.
After much trial and error you're not able to use a YAML front matter at this time.
The only way is to use the query parameters in the URL.
https://github.com/url/to/pr?
template=custom_template_pr.md
&title=Add+support+for+the+new+feature
&labels=bug%2Cenhancement%2Ccustomer-request
&assignees=self
pls refer my screenshor where the parameter data[file] (excel attachemnt) is available in body but while executing the same using collection runner this parameter is missing due to which my API is getting failed.
I was able to solve this issue by creating my attachment sheets under working directory of postman.
https://community.postman.com/t/parameter-missing-in-collection-runner/16462
I have developed a collection in postman having a bunch of API Endpoints. I can add team member to my Postman workspace and also can share the Documentation link publicly online.
What I was finding to have a download link to download the documentation as a folder so that I could add them into my project.
Is there anything I failed to find in postman?
You can export the collection as a json as shown in the other answer and then run a tool to convert it into an HTML document that you can host wherever you want.
I created a simple python executable to do just that -
https://github.com/karthiks3000/postman-doc-gen
Hi #Siddiqui currently this feature is not available, I do it by going to my collection documentation and getting it to print when the print prompt is shown I save the document as PDF before finalizing the print options. Once I get it in PDF I have all sorts options to do as I want. This is the closest I have been to downloading my collection documentation.
I have redacted information for privacy.
Hope this helps or leave a comment if I can be of any further assistance.
Postman generated API documentation is meant to be shared and consumed via workspace and URL to help ensure it is kept up to date and does not go stagnant. Because documentation will most likely be regularly updated with examples, new endpoints, and other elements anything downloaded will quickly be out of date. I know that a PDF generated version has been discussed as part of future releases, but keeping API documentation up to date is the priority.
A simple solution to this is to print the page to PDF from the web browser. It's not perfect but it is usable.
https://learning.postman.com/docs/getting-started/importing-and-exporting-data/
to export the doc to json
and then run the script by #karthiks3000 (https://github.com/karthiks3000/postman-doc-gen)
I have a project build with django-rest-framework, and I want to use django-rest-swagger to get API documentation, so I made a swagger.json file via swagger editor, then my question is:
How can I make django-rest-swagger read and render my own swagger.json instead of auto-generated from code?
I've checked the django-rest-swagger doc over and over again but nothing found about that.
Any comment will be appreciated.
I know this is old post, but I ran into the same issue and wanted to provide my work around.
If you are trying to create a Swagger UI from an external JSON, this was my work around. I am using django but wanted to provide the swagger api of another framework and server. Here are two options:
The simplest solution is to just manually render the swagger html template and insert the endpoint url that provides the JSON inside SwaggerUi(), this is generally located in the last block.
Alternatively, if you cannot access the json directly or have a static file, create your own rest end point that either reads the file, or makes the request to the remote server, and then itself serves up the desired JSON. Reference this endpoint in your swagger template.
I'm trying to use stapling to customize sharepoint 2010 blog template. I created a stapling feature and another feature for customizing the the site definition (onet.xml). It's work fine for web parts but if I include List Views it gives an error when I'm trying to activate the "customizing feature" (Not the stapling feature)
Error is,
"Error occurred in deployment step 'Activate Features': Cannot complete this action."
This is the xml snippet which causes this problem. (I couldn't post the xml part here)
http://social.msdn.microsoft.com/Forums/en/sharepoint2010programming/thread/6ba343f3-020b-47e5-938c-aeedcf094adc
BTW I'm trying to customize the default page here and my approach is
1) Get a copy of the existing custom page and rename and include in the feature
2) Change the master page of the above file to custom.master
3) Change the layout of the above page without removing "ContentPlaceHolders"
4) In feature element put module element copied from onet.xml
Appreciate if anyone can provide some insite on this.
Thanks
-Madhawa
Try provisioning the file without the View to make sure that your Url and Path attributes are correct. Once an empty page is displaying, add the View XML back. For the List attribute, try using the relative URL path (ex. Lists/Blog) instead of the template ID.