So we have Swagger UI and YAML file manually generated by a developer. The plan is to use Jenkins to validate our API endpoints (request and response schemas) using the Swagger schema. Is there a way to do that?
Please check Sagger Diff. This CLI tool shows breaking changes between 2 different swagger json files
http://swagger.io/using-swagger-to-detect-breaking-api-changes/
Related
I am working with the Jenkins API JSON.
I understand the format to retrieve API data in JSON
<Jenkins_URL>/job/<job_name>/api/json
Within the job/<job_name>/configure UI we can configure/add Build triggers, build env, and build data.
I want to be able to view the Build, Build Env, and Build Triggers data in a JSON API.
Is it even possible to get said data? What are alternative ways to get all available data that is found in the configure page of a job?
I think the most straightforward way is to access <Jenkins_URL>/job/<job_name>/config.xml.
Yes, it's not JSON, but you can be sure that this contains everything that was configured on the configuration page.
The XML file is the "native" serialized version of the Job configuration. The JSON API will always require some additional glue that may exist or not exist.
I want to use aws_apigateway and use a swagger file to define the api, how do I code this using AWS CDK either in python or TypeScript?
There is a workaround here, but so far (22/6/2022) is still in the CDK roadmap (issue ref)
The workaround involves some manual steps and initial swagger extraction from CDK init, then it can be fed in somehow.
We are investigating whether we can incorporate Postman Test Runner and Newman into an API testing flow with our Jenkins CI server.
My question is this: once I import a swagger/Open API file into a Postman collection, how can I keep changes from multiple team members in sync?
For example, if a team member adds a new api endpoint to the swagger file, do we have to re-import the swagger file into a postman collection overwriting it? We'd like to keep using the swagger file as the single source of truth so would like to keep that in sync with the postman collection. Ideally we would update the swagger file, commit it to git and get its changes synced to postman.
What about tests created in postman? Is there a way to keep that checked into git? Would we have to export the collection after each test change and check that into git, and re-import changes to postman collections after each git pull?
It looks like since some of the online postman features are built for sharing - the idea is that you would make a change to the collection directly in the postman client and that gets shared out to other postman clients? If so, is there a hook that can be added to sync those changes to git automatically?
To answer your questions in order:
Once I import a swagger/open api file into a postman collection, how
can I keep changes from multiple team members in sync?
To keep your collections in sync everyone will need to sign in and use a team workspace. As of Postman 6.2 a single team workspace is now free.
https://www.getpostman.com/docs/v6/postman/workspaces/intro_to_workspaces
For example, if a team member adds a new api endpoint to the swagger file, do we have to re-import the swagger file into a postman collection overwriting it?
Depends on how you are generating the file. If it is being generated using a run-time tool (e.g., NSwag, Swashbuckle) then you'll most likely end up needing to overwrite the file. If you have a swagger.json your team is directly maintaining, you can probably modify the scripts Postman provides to keep your definitions in sync with Postman: http://blog.getpostman.com/2018/03/02/sync-your-specs/
What about tests created in postman? Is there a way to keep that checked into git?
Yes. You can export Postman collections which include your tests and check those into Git.
If so, is there a hook that can be added to sync those changes to git automatically?
Answered on SO here.
I am generating a swagger definition for all the my APIs by annotating the source code.
I was wondering if there is any way for make possible merge all the APIs in one single json file?
Note: I am using Swagger 2.0 definitions.
If you deploy those apps in a WebSphere Liberty server with the apiDiscovery-1.0 feature defined in your server.xml, then you can simply go into (GET) /ibm/api/docs and retrieve your aggregated JSON file. You can also retrieve it as YAML, by adding the Accept header "application/yaml".
You can download it for free at wasdev.net then just run the installUtility command to grab the feature (wlp/bin installUtility install apiDiscovery-1.0).
More information in this blog: https://developer.ibm.com/wasdev/blog/2016/04/13/deploying-swagger-enabled-endpoints-websphere-liberty-bluemix-api-connect/
I'm new in Jira Plugin development.
I would like to wrote hello world plugin as described here. For that purpose I used Atlassian SDK command atlas-create-jira-plugin which generates atlassian-plugin.xml configuration file without XML Schema. This way I'm unable to validate that file.
Is there anyway to provide schema manually for above xml descriptor file?
Thanks in advance.