Skip to content

Instantly share code, notes, and snippets.

@p33t
p33t / api.mustache
Created June 5, 2021 00:13
Working mustache template for OpenAPI Generator - Kotlin-client
package {{apiPackage}}
import {{packageName}}.infrastructure.CollectionFormats.*
import retrofit2.http.*
{{#doNotUseRxAndCoroutines}}
import retrofit2.Call
{{/doNotUseRxAndCoroutines}}
{{^doNotUseRxAndCoroutines}}
{{#useCoroutines}}
import retrofit2.Response
@p33t
p33t / open-api-generator-conf.json
Created June 5, 2021 00:05
OpenAPI Generator configuration for generating a Kotlin API Client
{
"library": "jvm-retrofit2",
"groupId": "com.example.bug",
"artifactId": "bug-repro",
"artifactVersion": "1.0-SNAPSHOT",
"packageName": "com.example.bug",
"collectionType": "list",
"useCoroutines": true,
"serializationLibrary": "gson",
"serializableModel": true
@p33t
p33t / petstore-minimal2.json
Created June 5, 2021 00:02
A Swagger/OpenAPI specification with multiple file download endpoints
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "Swagger API Team"
},