{"swagger":"2.0","info":{"title":"apibuilder generator","description":"Documentation for an apibuilder code generator API","contact":{"name":"Michael Bryzek","url":"http://twitter.com/mbryzek","email":"mbryzek@alum.mit.edu"},"license":{"name":"MIT","url":"http://opensource.org/licenses/MIT"},"version":"0.12.1"},"host":"www.apibuilder.io","basePath":"/","schemes":["http"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/generators":{"get":{"description":"Get all available generators","parameters":[{"name":"key","in":"query","description":"Filter generators with this key","required":false,"type":"string"},{"name":"limit","in":"query","description":"The number of records to return","required":true,"default":"100","minimum":0,"type":"integer","format":"int32"},{"name":"offset","in":"query","description":"Used to paginate. First page of results is 0.","required":true,"default":"0","minimum":0,"type":"integer","format":"int32"}],"responses":{"200":{"description":"200 response","schema":{"type":"array","items":{"$ref":"#/definitions/generator"}}}}}},"/generators/{key}":{"get":{"description":"Get generator with this key","parameters":[{"name":"key","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/generator"}},"404":{"description":"404 response"}}}},"/_internal_/healthcheck":{"get":{"parameters":[],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/healthcheck"}}}}},"/invocations/{key}":{"post":{"description":"Invoke a generator","parameters":[{"name":"key","in":"path","required":true,"type":"string"},{"name":"invocation_form","in":"body","schema":{"$ref":"#/definitions/invocation_form"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/invocation"}},"409":{"description":"409 response","schema":{"type":"array","items":{"$ref":"#/definitions/error"}}}}}}},"definitions":{"attribute":{"type":"object","description":"An attribute represents a key/value pair that is optionally used to provide additional instructions / data to the code generator. An example could be an attribute to specify the root import path for a go client..","title":"attribute","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}},"error":{"type":"object","title":"error","required":["code","message"],"properties":{"code":{"description":"Machine readable code for this specific error message","type":"string"},"message":{"description":"Description of the error","type":"string"}}},"file":{"type":"object","description":"Represents a source file","title":"file","required":["name","contents"],"properties":{"name":{"description":"The recommended name for the file.","example":"ApiCollectiveApiBuilderApiClient.scala","type":"string"},"dir":{"description":"The recommended directory path for the file where appropriate.","example":"io/apicollective/apibuilder","type":"string"},"contents":{"description":"The actual source code.","type":"string"}}},"generator":{"type":"object","description":"The generator metadata.","title":"generator","required":["key","name","attributes"],"properties":{"key":{"type":"string"},"name":{"type":"string"},"language":{"description":"A comma separate list of the programming language(s) that this generator produces","example":"scala","type":"string"},"description":{"type":"string"},"attributes":{"description":"The list of attributes that this code generator can use. You can find the full list of available attributes and their descriptions at http://apibuilder.io/doc/attributes","default":"[]","type":"array","items":{"type":"string"}}}},"healthcheck":{"type":"object","title":"healthcheck","required":["status"],"properties":{"status":{"example":"healthy","type":"string"}}},"invocation":{"type":"object","description":"The result of invoking a generator.","title":"invocation","required":["source","files"],"properties":{"source":{"description":"The actual source code.","type":"string"},"files":{"type":"array","items":{"$ref":"#/definitions/file"}}}},"invocation_form":{"type":"object","description":"The invocation form is the payload send to the code generators when requesting generation of client code.","title":"invocation_form","required":["service","attributes"],"properties":{"service":{"$ref":"#/definitions/io.apibuilder.spec.v0.models.service"},"attributes":{"type":"array","items":{"$ref":"#/definitions/attribute"}},"user_agent":{"type":"string"}}}}}