Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (40 sloc) 1.87 KB
---
layout: none
---
swagger: "2.0"{% assign categorylist = '' %}{% for integration in site.data.integrations %}{% assign category = integration.category | downcase %}{% if categorylist contains category %}{% else %}{% assign categorylist = categorylist | append:',' | append: category %}{% endif %}{% endfor %}{% assign categoryArray = categorylist | split: "," %}
info:
title: {{ site.title }}
description: {{ site.description }}
termsOfService: {{ site.url }}/terms-of-service/
contact:
name: {{ site.author.name }}
url: {{ site.author.url }}
email: {{ site.author.email }}
version: {{ site.version }}
host: {{ site.url | replace: 'http://','' | replace: '/','' }}
basePath: /apis/{{ site.api_resource }}
schemes:
- http
produces:
- application/json
paths:{% for path in categoryArray %}{% if path != '' %}
/{{ path }}/:
get:
summary: {{ path | capitalize }}
description: This is a list of {{ path }} data.
operationId: get{{ path | capitalize }}
responses:
'200':
description: A succesful {{ path }} response.
schema:
type: array
items:
$ref: "#/definitions/{{ site.api_resource }}"
tags:
- {{ path | capitalize }}{% endif %}{% endfor %}
definitions:
{{ site.api_resource }}:
properties:{% for i in site.data.integrations[1] %}{% assign value = i[1] %}{% assign type = "string" %}{% if value contains 1 or value contains 2 or value contains 3 or value contains 4 or value contains 5 or value contains 6 or value contains 7 or value contains 8 or value contains 9 %}{% if value contains " " %}{% else %}{% if value contains "/" or value contains "-" %}{% assign type = "date" %}{% else %}{% assign type = "number" %}{% endif %}{% endif %}{% endif %}
{{ i[0] }}:
description: 'The {{ i[0] }} for {{ site.api_resource }}'
type: {{ type }}{% endfor %}