Consuming an API schema
When you consume an API schema in Martini, a Gloop service is generated for every web service defined in the schema. You could then use these generated services to build your application. This process also produces associated Gloop models and a Gloop API (optional), for cases wherein you want to publish the consumed API in Martini.
To generate Gloop services from an API schema:
Launch the Gloop API wizard.
- Go to the Navigator view.
- Right click on your target package's
codefolder or any of the code directories under it where you'd like your services to reside.
- Select New, then select Gloop API.
Launch the wizard using keyboard shortcuts only
You can open the Gloop API wizard by pressing ( in Martini Online), typing
"api"in the appearing dialog's search box, and selecting Gloop API from the appearing options.
- Specify your source API schema.
- Browse for the API specification document in the file system or enter its URL in the text box.
- Specify your API schema's type by selecting any of the options in Source, if Coder hasn't selected the correct one for you.
- Specify if you want to log your services' requests to Tracker.
- Click Finish.
The Swagger specification is a format used to describe and document RESTful APIs. Swagger is a popular choice amongst developers and companies primarily because of the following benefits, mentioned in the article "What is Swagger and Why it Matters":
- It's comprehensible for developers and non-developers.
- It's human readable and machine readable.
- It's easily adjustable.
Companies like Netflix, IBM, and Yelp have already incorporated it into their own infrastructure and platform.
The OpenAPI specification (formerly known as the Swagger specification) is a format used to describe and document RESTful APIs.
Postman collection version
Martini only supports v2.1 of the Postman collection format. If you encounter errors or have a collection file that's not v2.1, you can:
- Import the collection into Postman.
- Export the collection again, choosing Collection v2.1 as the format.
WSDL (Web Services Description Language Version) provides a model and an XML configuration used for describing web services.
WADL (Web Application Description Language) is scheme that provides a machine-readable definition of HTTP-based web applications.