Postman Collection
Postman collections are essential for testing and documenting REST APIs. Martini simplifies this process by automatically generating Postman collections for your APIs, mirroring its functionality with OpenAPI specifications.
Generating Postman Collections in Martini
- Automatic Generation: Martini automatically creates a Postman collection for each REST API.
- Ease of Use: This feature ensures that your API testing and documentation are always up-to-date with your API development.
Downloading the Postman Collection
-
Accessing the Collection:
- Navigate to the API you wish to export in Martini.
- Go to the
Preview
tab where the Postman collection is available.
-
Downloading the Collection:
- Click the download option to obtain the Postman collection in v2.1 format.
Using the Postman Collection
- Testing APIs: Import the downloaded collection into Postman for testing your API endpoints.
- Collaboration: Share the collection with team members for consistent testing and development.
- Publishing: Consider publishing the Postman collection together with your API Documentation to facilitate discovery and consumption by the consumers of your API.
Importing Postman Collections into Postman
-
Open Postman:
- Launch the Postman application.
-
Import Process:
- Choose
Import
and select the downloaded Postman collection file. - The collection will be imported into Postman, ready for use.
- Choose
Best Practices
- Regular Updates: Keep the Postman collections updated in sync with API changes.
- Comprehensive Testing: Use the collection to test various aspects of your API, including edge cases and error handling.
- Documentation and Comments: Add comments and documentation within the Postman collection for better understanding and collaboration.