├── test ├── utils.js ├── fixtures │ ├── document.yml │ ├── document.json │ ├── cheese.png │ ├── ref.json │ ├── tag.yml │ ├── NullExample.yml │ ├── User.yml │ ├── issue-98.yml │ ├── basic-path.yaml │ ├── Example.yml │ └── issue-69.json ├── minimal.js ├── test-preprocessor.js └── test-reference-contexts.js ├── .sonarcloud.properties ├── .DS_Store ├── eevee.png ├── screenshot.png ├── app ├── vendor │ └── foundation │ │ ├── scss │ │ ├── components │ │ │ ├── _flex-video.scss │ │ │ ├── _menu-icon.scss │ │ │ ├── _float.scss │ │ │ ├── _sticky.scss │ │ │ ├── _progress-bar.scss │ │ │ ├── _badge.scss │ │ │ ├── _label.scss │ │ │ ├── _thumbnail.scss │ │ │ ├── _dropdown.scss │ │ │ ├── _title-bar.scss │ │ │ └── _responsive-embed.scss │ │ ├── util │ │ │ ├── _util.scss │ │ │ ├── _direction.scss │ │ │ ├── _selector.scss │ │ │ ├── _typography.scss │ │ │ └── _math.scss │ │ ├── prototype │ │ │ ├── _typescale.scss │ │ │ ├── _box.scss │ │ │ ├── _arrow.scss │ │ │ ├── _border-box.scss │ │ │ ├── _border-none.scss │ │ │ ├── _rotate.scss │ │ │ ├── _shadow.scss │ │ │ ├── _display.scss │ │ │ ├── _text-decoration.scss │ │ │ ├── _text-transformation.scss │ │ │ ├── _rounded.scss │ │ │ ├── _bordered.scss │ │ │ ├── _sizing.scss │ │ │ ├── _prototype.scss │ │ │ ├── _overflow.scss │ │ │ ├── _text-utilities.scss │ │ │ └── _font-styling.scss │ │ ├── typography │ │ │ ├── _alignment.scss │ │ │ ├── _typography.scss │ │ │ ├── _helpers.scss │ │ │ └── _print.scss │ │ ├── grid │ │ │ ├── _size.scss │ │ │ ├── _grid.scss │ │ │ ├── _layout.scss │ │ │ └── _position.scss │ │ ├── forms │ │ │ ├── _help-text.scss │ │ │ ├── _forms.scss │ │ │ ├── _checkbox.scss │ │ │ ├── _fieldset.scss │ │ │ ├── _label.scss │ │ │ ├── _progress.scss │ │ │ ├── _select.scss │ │ │ └── _error.scss │ │ └── xy-grid │ │ │ ├── _position.scss │ │ │ ├── _layout.scss │ │ │ ├── _collapse.scss │ │ │ ├── _xy-grid.scss │ │ │ ├── _gutters.scss │ │ │ ├── _frame.scss │ │ │ └── _grid.scss │ │ ├── _vendor │ │ ├── normalize-scss │ │ │ └── sass │ │ │ │ ├── _normalize.scss │ │ │ │ └── normalize │ │ │ │ ├── _import-now.scss │ │ │ │ ├── _variables.scss │ │ │ │ └── _vertical-rhythm.scss │ │ └── sassy-lists │ │ │ └── stylesheets │ │ │ ├── helpers │ │ │ ├── _true.scss │ │ │ └── _missing-dependencies.scss │ │ │ └── functions │ │ │ ├── _to-list.scss │ │ │ ├── _remove.scss │ │ │ ├── _purge.scss │ │ │ └── _replace.scss │ │ ├── js │ │ ├── entries │ │ │ ├── plugins │ │ │ │ ├── foundation.util.box.js │ │ │ │ ├── foundation.abide.js │ │ │ │ ├── foundation.tabs.js │ │ │ │ ├── foundation.orbit.js │ │ │ │ ├── foundation.reveal.js │ │ │ │ ├── foundation.util.nest.js │ │ │ │ ├── foundation.slider.js │ │ │ │ ├── foundation.sticky.js │ │ │ │ ├── foundation.tooltip.js │ │ │ │ ├── foundation.util.timer.js │ │ │ │ ├── foundation.magellan.js │ │ │ │ ├── foundation.toggler.js │ │ │ │ ├── foundation.util.touch.js │ │ │ │ ├── foundation.accordion.js │ │ │ │ ├── foundation.drilldown.js │ │ │ │ ├── foundation.dropdown.js │ │ │ │ ├── foundation.equalizer.js │ │ │ │ ├── foundation.offcanvas.js │ │ │ │ ├── foundation.util.keyboard.js │ │ │ │ ├── foundation.interchange.js │ │ │ │ ├── foundation.util.mediaQuery.js │ │ │ │ ├── foundation.dropdownMenu.js │ │ │ │ ├── foundation.smoothScroll.js │ │ │ │ ├── foundation.util.motion.js │ │ │ │ ├── foundation.accordionMenu.js │ │ │ │ ├── foundation.util.imageLoader.js │ │ │ │ ├── foundation.util.triggers.js │ │ │ │ ├── foundation.responsiveMenu.js │ │ │ │ ├── foundation.responsiveToggle.js │ │ │ │ ├── foundation.responsiveAccordionTabs.js │ │ │ │ └── foundation.core.js │ │ │ └── foundation-plugins.js │ │ ├── foundation.util.imageLoader.js │ │ ├── foundation.util.timer.js │ │ ├── foundation.util.core.js │ │ ├── foundation.plugin.js │ │ └── foundation.util.nest.js │ │ └── LICENSE ├── views │ ├── partials │ │ ├── swagger │ │ │ ├── print-example.hbs │ │ │ ├── list-of-labels.hbs │ │ │ ├── deprecated │ │ │ │ ├── responseDefinitions.hbs │ │ │ │ ├── parameterDefinitions.hbs │ │ │ │ ├── tags.hbs │ │ │ │ ├── summary.hbs │ │ │ │ ├── parameterRow.hbs │ │ │ │ ├── parameters.hbs │ │ │ │ ├── responses.hbs │ │ │ │ └── response.hbs │ │ │ ├── description.hbs │ │ │ ├── tags.hbs │ │ │ ├── definitions.hbs │ │ │ ├── paths.hbs │ │ │ ├── path.hbs │ │ │ ├── x-spectacle-topics.hbs │ │ │ ├── responseHeaderRow.hbs │ │ │ ├── security.hbs │ │ │ ├── definition.hbs │ │ │ ├── request-body.hbs │ │ │ ├── introduction.hbs │ │ │ ├── parameters.hbs │ │ │ └── securityDefinitions.hbs │ │ ├── json-schema │ │ │ ├── definitions.hbs │ │ │ ├── type-object.hbs │ │ │ ├── array-items.hbs │ │ │ ├── additionalProperties.hbs │ │ │ ├── anyOf.hbs │ │ │ ├── reference.hbs │ │ │ ├── allOf.hbs │ │ │ ├── body.hbs │ │ │ ├── properties.hbs │ │ │ └── datatype.hbs │ │ └── layout │ │ │ ├── head.hbs │ │ │ ├── topbar.hbs │ │ │ ├── page.hbs │ │ │ ├── content.hbs │ │ │ └── nav.hbs │ ├── embedded.hbs │ └── main.hbs ├── helpers │ ├── ifin.js │ ├── ifcontains.js │ ├── schemaSubschemaName.js │ ├── toUpperCase.js │ ├── htmlId.js │ ├── equal.js │ ├── printExample.js │ ├── schemaReferenceContext.js │ ├── schemaResolveReference.js │ ├── schemaReferenceHref.js │ ├── ifneq.js │ ├── ifeq.js │ ├── swaggerCollectionFormat.js │ ├── md.js │ ├── getTryItNow.js │ ├── swaggerEndpoint.js │ ├── schemaDatatype.js │ └── eachSorted.js ├── stylesheets │ ├── spectacle.scss │ ├── _index.scss │ ├── _utils.scss │ ├── _monokai.scss │ ├── foundation-includes.scss │ └── _drawer.scss ├── dociql │ ├── compose-definitions.js │ ├── convert-type.js │ ├── index.js │ ├── graphql-hl.js │ └── fetch-schema.js ├── lib │ ├── errors.js │ ├── urls.js │ ├── reference-contexts.js │ └── json-reference.js └── javascripts │ └── main.js ├── docs └── images │ └── eevee.png ├── .gitignore ├── .npmignore ├── TODO.md ├── Dockerfile ├── Makefile ├── .github └── workflows │ └── renovate_linting.yml ├── renovate.json ├── .vscode └── launch.json ├── .travis.yml ├── package.json ├── bin └── dociql.js └── config.yml /test/utils.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.sonarcloud.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/fixtures/document.yml: -------------------------------------------------------------------------------- 1 | foo: 1 2 | -------------------------------------------------------------------------------- /test/fixtures/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": 1 3 | } 4 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wayfair/dociql/HEAD/.DS_Store -------------------------------------------------------------------------------- /eevee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wayfair/dociql/HEAD/eevee.png -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wayfair/dociql/HEAD/screenshot.png -------------------------------------------------------------------------------- /app/vendor/foundation/scss/components/_flex-video.scss: -------------------------------------------------------------------------------- 1 | @import 'responsive-embed'; 2 | -------------------------------------------------------------------------------- /docs/images/eevee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wayfair/dociql/HEAD/docs/images/eevee.png -------------------------------------------------------------------------------- /test/fixtures/cheese.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wayfair/dociql/HEAD/test/fixtures/cheese.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ~* 2 | *~ 3 | *bak 4 | *cache 5 | *.log 6 | node_modules 7 | public 8 | .nyc_output 9 | coverage -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /docs 2 | /test 3 | /.vscode 4 | /public 5 | /config.yml 6 | /eevee.png 7 | /TODO.md 8 | 9 | *.log -------------------------------------------------------------------------------- /app/views/partials/swagger/print-example.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{printExample .}} 3 | 4 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | Improve range and enum output 2 | Render remote references 3 | - https://github.com/sourcey/spectacle/pull/41 4 | -------------------------------------------------------------------------------- /test/fixtures/ref.json: -------------------------------------------------------------------------------- 1 | { 2 | "$ref": "document.json#foo", 3 | "document": { 4 | "$ref": "document.json" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /app/views/embedded.hbs: -------------------------------------------------------------------------------- 1 | {{! Renders the HTML page content without the tag }} 2 |
3 | {{>layout/page}} 4 |
5 | -------------------------------------------------------------------------------- /app/vendor/foundation/_vendor/normalize-scss/sass/_normalize.scss: -------------------------------------------------------------------------------- 1 | @import 'normalize/variables'; 2 | @import 'normalize/vertical-rhythm'; 3 | @import 'normalize/normalize-mixin'; 4 | -------------------------------------------------------------------------------- /app/helpers/ifin.js: -------------------------------------------------------------------------------- 1 | module.exports = function(elem, list, options) { 2 | if(list.indexOf(elem) > -1) { 3 | return options.fn(this) 4 | } 5 | return options.inverse(this) 6 | }; 7 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.util.box.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | import { Box } from '../../foundation.util.box'; 3 | 4 | Foundation.Box = Box; 5 | -------------------------------------------------------------------------------- /app/helpers/ifcontains.js: -------------------------------------------------------------------------------- 1 | module.exports = function(array, object, options) { 2 | if (array && array.indexOf(object) >= 0) { 3 | return options.fn(this) 4 | } 5 | return options.inverse(this) 6 | }; 7 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.abide.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Abide } from '../../foundation.abide'; 4 | Foundation.plugin(Abide, 'Abide'); 5 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.tabs.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Tabs } from '../../foundation.tabs'; 4 | Foundation.plugin(Tabs, 'Tabs'); 5 | 6 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.orbit.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Orbit } from '../../foundation.orbit'; 4 | Foundation.plugin(Orbit, 'Orbit'); 5 | 6 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.reveal.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Reveal } from '../../foundation.reveal'; 4 | Foundation.plugin(Reveal, 'Reveal'); 5 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.util.nest.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Nest } from '../../foundation.util.nest'; 4 | 5 | Foundation.Nest = Nest; 6 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.slider.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Slider } from '../../foundation.slider'; 4 | Foundation.plugin(Slider, 'Slider'); 5 | 6 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.sticky.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Sticky } from '../../foundation.sticky'; 4 | Foundation.plugin(Sticky, 'Sticky'); 5 | 6 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.tooltip.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Tooltip } from '../../foundation.tooltip'; 4 | Foundation.plugin(Tooltip, 'Tooltip'); 5 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.util.timer.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Timer } from '../../foundation.util.timer'; 4 | 5 | Foundation.Timer = Timer; 6 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.magellan.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Magellan } from '../../foundation.magellan'; 4 | Foundation.plugin(Magellan, 'Magellan'); 5 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.toggler.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Toggler } from '../../foundation.toggler'; 4 | Foundation.plugin(Toggler, 'Toggler'); 5 | 6 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.util.touch.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery'; 2 | 3 | import { Touch } from '../../foundation.util.touch'; 4 | 5 | Touch.init($); 6 | 7 | window.Foundation.Touch = Touch; 8 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.accordion.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Accordion } from '../../foundation.accordion'; 4 | Foundation.plugin(Accordion, 'Accordion'); 5 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.drilldown.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Drilldown } from '../../foundation.drilldown'; 4 | Foundation.plugin(Drilldown, 'Drilldown'); 5 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.dropdown.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Dropdown } from '../../foundation.dropdown'; 4 | Foundation.plugin(Dropdown, 'Dropdown'); 5 | 6 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.equalizer.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Equalizer } from '../../foundation.equalizer'; 4 | Foundation.plugin(Equalizer, 'Equalizer'); 5 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.offcanvas.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { OffCanvas } from '../../foundation.offcanvas'; 4 | Foundation.plugin(OffCanvas, 'OffCanvas'); 5 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.util.keyboard.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | import { Keyboard } from '../../foundation.util.keyboard'; 3 | 4 | Foundation.Keyboard = Keyboard; 5 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.interchange.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { Interchange } from '../../foundation.interchange'; 4 | Foundation.plugin(Interchange, 'Interchange'); 5 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.util.mediaQuery.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | import { MediaQuery } from '../../foundation.util.mediaQuery'; 3 | 4 | Foundation.MediaQuery = MediaQuery; 5 | -------------------------------------------------------------------------------- /app/helpers/schemaSubschemaName.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Extract then name of a subschema from a $ref property 3 | * @param url 4 | * @returns {*} 5 | */ 6 | module.exports = function(url) { 7 | return url.replace('#/definitions/', '') 8 | }; 9 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.dropdownMenu.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { DropdownMenu } from '../../foundation.dropdownMenu'; 4 | Foundation.plugin(DropdownMenu, 'DropdownMenu'); 5 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.smoothScroll.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { SmoothScroll } from '../../foundation.smoothScroll'; 4 | Foundation.plugin(SmoothScroll, 'SmoothScroll'); 5 | 6 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.util.motion.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | import { Motion, Move } from '../../foundation.util.motion'; 3 | 4 | Foundation.Motion = Motion; 5 | Foundation.Move = Move; 6 | -------------------------------------------------------------------------------- /test/minimal.js: -------------------------------------------------------------------------------- 1 | /** The minimal OpenAPI spec with all required fields. */ 2 | exports.minimal = minimal = { 3 | swagger: "2.0", 4 | info: { 5 | title: "Test File", 6 | version: "0.0.0", 7 | }, 8 | paths: {}, 9 | }; 10 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.accordionMenu.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { AccordionMenu } from '../../foundation.accordionMenu'; 4 | Foundation.plugin(AccordionMenu, 'AccordionMenu'); 5 | 6 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.util.imageLoader.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { onImagesLoaded } from '../../foundation.util.imageLoader'; 4 | 5 | Foundation.onImagesLoaded = onImagesLoaded; 6 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.util.triggers.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | import $ from 'jquery'; 3 | 4 | import { Triggers } from '../../foundation.util.triggers'; 5 | Triggers.init($, Foundation); 6 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.responsiveMenu.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { ResponsiveMenu } from '../../foundation.responsiveMenu'; 4 | Foundation.plugin(ResponsiveMenu, 'ResponsiveMenu'); 5 | 6 | -------------------------------------------------------------------------------- /app/views/main.hbs: -------------------------------------------------------------------------------- 1 | {{! Renders the entire HTML page}} 2 | 3 | 4 | 5 | {{>layout/head}} 6 | 7 | 8 | {{>layout/page}} 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/fixtures/tag.yml: -------------------------------------------------------------------------------- 1 | # Extracted from cheese.yml#/definitions/Tag 2 | Tag: 3 | type: object 4 | properties: 5 | id: 6 | type: integer 7 | format: int64 8 | name: 9 | type: string 10 | xml: 11 | name: Tag 12 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8-alpine 2 | MAINTAINER Kam Low 3 | 4 | USER 0 5 | WORKDIR /opt 6 | 7 | RUN apk add --no-cache \ 8 | nodejs nodejs-npm g++ \ 9 | python python-dev 10 | 11 | RUN npm install --unsafe-perm -g spectacle-docs 12 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.responsiveToggle.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { ResponsiveToggle } from '../../foundation.responsiveToggle'; 4 | Foundation.plugin(ResponsiveToggle, 'ResponsiveToggle'); 5 | 6 | -------------------------------------------------------------------------------- /app/stylesheets/spectacle.scss: -------------------------------------------------------------------------------- 1 | // 2 | //= Spectacle 3 | // 4 | 5 | // Include Foundation components and utilities (but don't build anything) 6 | @import 'foundation-settings'; 7 | @import 'foundation'; // foundation/scss/ 8 | 9 | // Include Spectacle 10 | @import 'index'; 11 | -------------------------------------------------------------------------------- /app/stylesheets/_index.scss: -------------------------------------------------------------------------------- 1 | // 2 | //= Main includes 3 | // 4 | 5 | // Scope everything inside #spectacle ... 6 | #spectacle { 7 | @import 'variables'; 8 | @import 'utils'; 9 | @import 'schema'; 10 | @import 'layout'; 11 | @import 'drawer'; 12 | @import 'monokai'; 13 | } 14 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/components/_menu-icon.scss: -------------------------------------------------------------------------------- 1 | @mixin foundation-menu-icon { 2 | .menu-icon { 3 | @include hamburger($color: $titlebar-icon-color, $color-hover: $titlebar-icon-color-hover); 4 | } 5 | 6 | .menu-icon.dark { 7 | @include hamburger; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.responsiveAccordionTabs.js: -------------------------------------------------------------------------------- 1 | import { Foundation } from './foundation.core'; 2 | 3 | import { ResponsiveAccordionTabs } from '../../foundation.responsiveAccordionTabs'; 4 | Foundation.plugin(ResponsiveAccordionTabs, 'ResponsiveAccordionTabs'); 5 | 6 | -------------------------------------------------------------------------------- /app/helpers/toUpperCase.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Converts a string to uppercase 3 | * @name toUpperCase 4 | * @param {string} value the input string 5 | * @returns {string} the uppercase string 6 | * @api public 7 | */ 8 | module.exports = function(value, options) { 9 | return value ? value.toUpperCase() : ''; 10 | }; 11 | -------------------------------------------------------------------------------- /app/views/partials/swagger/list-of-labels.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-openapi 4 | 5 | Renders an array of strings as list of labels 6 | @param {string[]} values 7 | --}} 8 | {{#each values}}{{.}} {{/each}} 9 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | NAME := sourcey/spectacle 2 | VERSION := $$(git describe --tags `git rev-list --tags --max-count=1`) 3 | 4 | build: 5 | docker build -t ${NAME}:latest -t ${NAME}:v${VERSION} . 6 | 7 | push: 8 | @echo ${NAME} 9 | @docker push ${NAME} 10 | 11 | login: 12 | @docker log -u ${DOCKER_USER} -p ${DOCKER_PASS} 13 | -------------------------------------------------------------------------------- /app/helpers/htmlId.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Replace all characters that may not be used in HTML id-attributes by '-'. 3 | * There is still the restriction that IDs may only start with letters, which 4 | * is not addressed by this helper. 5 | */ 6 | module.exports = function(value) { 7 | return value.replace(/[^A-Za-z0-9-_:.]/g, "-") 8 | }; 9 | -------------------------------------------------------------------------------- /test/fixtures/NullExample.yml: -------------------------------------------------------------------------------- 1 | type: object 2 | required: 3 | - id 4 | - nullable 5 | properties: 6 | id: 7 | type: string 8 | description: A uuid 9 | nullable: 10 | type: string 11 | description: A field that is nullable 12 | example: 13 | id: b2eb9ac5-5c45-4ec6-af0a-7911cf1759f6 14 | nullable: null 15 | -------------------------------------------------------------------------------- /app/dociql/compose-definitions.js: -------------------------------------------------------------------------------- 1 | const graphql = require('graphql') 2 | const transform = require('graphql-json-schema'); 3 | 4 | module.exports = function(graphQLSchema) { 5 | const printedSchema = graphql.printSchema(graphQLSchema) 6 | 7 | const jsonSchema = transform(printedSchema) 8 | 9 | return jsonSchema.definitions; 10 | } -------------------------------------------------------------------------------- /app/views/partials/json-schema/definitions.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-json-schema 4 | 5 | Renders all subschemas 6 | --}} 7 | {{#if definitions}} 8 | {{#eachSorted definitions}} 9 | {{>json-schema/main-panel . title=@key anchor=true}} 10 | {{/eachSorted}} 11 | {{/if}} 12 | -------------------------------------------------------------------------------- /app/views/partials/json-schema/type-object.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-json-schema 4 | 5 | Renders the properties of an `object` 6 | --}} 7 | {{>json-schema/properties}} 8 | {{#if additionalProperties}} 9 | {{>json-schema/additionalProperties additionalProperties}} 10 | {{/if}} 11 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/util/_util.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import 'math'; 6 | @import 'unit'; 7 | @import 'value'; 8 | @import 'direction'; 9 | @import 'color'; 10 | @import 'selector'; 11 | @import 'flex'; 12 | @import 'breakpoint'; 13 | @import 'mixins'; 14 | @import 'typography'; 15 | -------------------------------------------------------------------------------- /app/vendor/foundation/_vendor/normalize-scss/sass/normalize/_import-now.scss: -------------------------------------------------------------------------------- 1 | // Import Now 2 | // 3 | // If you import this module directly, it will immediately output all the CSS 4 | // needed to normalize default HTML elements across all browsers. 5 | // 6 | // ``` 7 | // @import "normalize/import-now"; 8 | // ``` 9 | 10 | @import '../normalize'; 11 | @include normalize(); 12 | -------------------------------------------------------------------------------- /app/helpers/equal.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015 Nils Knappmeier 3 | * https://github.com/bootprint/bootprint-openapi 4 | * 5 | * @license MIT 6 | **/ 7 | 8 | /** 9 | * Checks whether two values a equal as in (==) 10 | * @param value1 11 | * @param value2 12 | * @returns {boolean} 13 | */ 14 | module.exports = function(value1, value2) { 15 | return value1 == value2; 16 | }; 17 | -------------------------------------------------------------------------------- /app/helpers/printExample.js: -------------------------------------------------------------------------------- 1 | var Handlebars = require('handlebars') 2 | var common = require('../lib/common') 3 | 4 | module.exports = function(value, options) { 5 | var cloned = common.formatExample(value, options.data.root, options.hash) 6 | if (!cloned) 7 | return ''; 8 | var html = common.printSchema(cloned, options.data.root) 9 | return new Handlebars.SafeString(html) 10 | }; 11 | -------------------------------------------------------------------------------- /app/helpers/schemaReferenceContext.js: -------------------------------------------------------------------------------- 1 | var common = require('../lib/common'); 2 | 3 | /** 4 | * Resolve a (local) json schema $ref and replace context to referenced object. 5 | * @param reference 6 | * @param options 7 | */ 8 | module.exports = function(reference, options) { 9 | return options.fn(reference ? common.resolveSchemaReference(reference, options.data.root) : this); 10 | }; 11 | -------------------------------------------------------------------------------- /app/vendor/foundation/_vendor/sassy-lists/stylesheets/helpers/_true.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Returns truthiness of `$value`. 3 | /// 4 | /// @access private 5 | /// 6 | /// @param {*} $value - value to check 7 | /// 8 | /// @return {Bool} 9 | /// 10 | 11 | @function sl-is-true($value) { 12 | @return if($value == null, false, $value and $value != null and $value != '' and $value != ()); 13 | } 14 | -------------------------------------------------------------------------------- /test/fixtures/User.yml: -------------------------------------------------------------------------------- 1 | type: object 2 | required: 3 | - id 4 | - name 5 | properties: 6 | id: 7 | type: string 8 | description: The user's unique identifer. 9 | name: 10 | type: string 11 | description: The user's full name. 12 | email: 13 | type: string 14 | description: | 15 | The user's email address. 16 | Only included in documents for the current user. 17 | -------------------------------------------------------------------------------- /app/views/partials/json-schema/array-items.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-json-schema 4 | 5 | Renders a json-schema "items"-definition of array-types. 6 | --}} 7 |
8 | {{>json-schema/datatype .}} 9 |
10 | {{>json-schema/body}} 11 |
12 |
13 | -------------------------------------------------------------------------------- /app/views/partials/json-schema/additionalProperties.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-json-schema 4 | 5 | Show a subschema for additionaProperties of a `object` definition. 6 | --}} 7 |
8 | {{>json-schema/datatype}} 9 | {{>json-schema/body}} 10 |
11 | -------------------------------------------------------------------------------- /app/views/partials/swagger/deprecated/responseDefinitions.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Renders the response definitions 3 | --}} 4 | {{#if responses}} 5 |

Response definitions

6 | 7 |
8 | {{#each responses}} 9 |
{{@key}}
10 |
11 | {{> swagger/response response=.}} 12 |
13 | {{/each}} 14 |
15 | {{/if}} 16 | -------------------------------------------------------------------------------- /.github/workflows/renovate_linting.yml: -------------------------------------------------------------------------------- 1 | name: Renovate Config Linting 2 | on: [pull_request] 3 | 4 | jobs: 5 | renovate: 6 | runs-on: ubuntu-latest 7 | steps: 8 | - uses: actions/checkout@v3 9 | - name: 🧼 lint renovate config # Validates changes to renovate.json config file 10 | uses: suzuki-shunsuke/github-action-renovate-config-validator@v0.1.2 11 | with: 12 | config_file_path: 'renovate.json' -------------------------------------------------------------------------------- /app/helpers/schemaResolveReference.js: -------------------------------------------------------------------------------- 1 | var common = require('../lib/common') 2 | 3 | /** 4 | * Resolve a (local) json schema $ref and return the referenced object. 5 | * @param reference 6 | */ 7 | module.exports = function(reference, options) { 8 | var model = common.resolveSchemaReference(reference, options.data.root) 9 | if (typeof model === 'object' && typeof model.properties === 'object') 10 | model = model.properties; 11 | return model; 12 | }; 13 | -------------------------------------------------------------------------------- /app/helpers/schemaReferenceHref.js: -------------------------------------------------------------------------------- 1 | var common = require('../lib/common') 2 | 3 | /** 4 | * Build href links for local and remote references. 5 | * @param reference 6 | */ 7 | module.exports = function(reference, options) { 8 | if (reference.indexOf('#') === 0) { 9 | // local references 10 | return reference 11 | } 12 | else { 13 | // remote references 14 | var path = ' #definition-' 15 | path += require('./htmlId')(reference) 16 | return path 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /app/views/partials/swagger/description.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-openapi 4 | 5 | Renders a json-schema model within swagger (calls json-schema-partials). 6 | @param {JsonSchema} model a JSON-schema definition 7 | @param {string} title the name of the definition 8 | @api public 9 | --}} 10 | 11 | {{#if .}} 12 | {{md .}} 13 | {{else}} 14 |

(no description)

15 | {{/if}} 16 | -------------------------------------------------------------------------------- /app/views/partials/swagger/tags.hbs: -------------------------------------------------------------------------------- 1 | {{#each tags}} 2 |

{{name}}

3 | {{#if description}} 4 |
5 |
6 | {{md description}} 7 |
8 |
9 | {{/if}} 10 | {{#each operations}} 11 | {{>swagger/operation . operation=. method=method path=path}} 12 | {{/each}} 13 | {{/each}} 14 | -------------------------------------------------------------------------------- /app/views/partials/swagger/definitions.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-openapi 4 | 5 | Renders the definition-section of the HTML-page. 6 | @param {Definition[]} definitions a list of JSON-subschemas. 7 | @api public 8 | --}} 9 | 10 | {{#if definitions}} 11 |

Schema Definitions

12 | 13 | {{#each definitions}} 14 | {{>swagger/definition title=@key anchor="/definitions" }} 15 | {{/each}} 16 | {{/if}} 17 | -------------------------------------------------------------------------------- /app/views/partials/json-schema/anyOf.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-json-schema 4 | 5 | Renders a json-schema "anyOf"-definition. 6 | --}} 7 |
8 | {{! Display ref (i.e. superclasses)}} 9 |
10 | {{#each .}} 11 |
12 | {{>json-schema/datatype}} 13 |
14 |
15 | {{>json-schema/body $ref=""}} 16 |
17 | {{/each}} 18 |
19 |
20 | -------------------------------------------------------------------------------- /app/helpers/ifneq.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Block helper that compares to values. The body is executed if values are not equal. 3 | * Example: 4 | * 5 | * ```hbs 6 | * {{#ifneq value 10}} 7 | * Value is not 10 8 | * {{else}} 9 | * Value is 10 10 | * {{/ifeq}} 11 | * ``` 12 | * 13 | * @param {object} `v1` the first value 14 | * @param {object} `v2` the second value 15 | */ 16 | module.exports = function(v1, v2, options) { 17 | if (v1 !== v2) { 18 | return options.fn(this) 19 | } 20 | return options.inverse(this) 21 | }; 22 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_typescale.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-typescale 7 | //// 8 | 9 | @mixin foundation-prototype-typescale { 10 | @each $size, $headers in $header-styles { 11 | @include breakpoint($size) { 12 | @each $header, $header-defs in $headers { 13 | $font-size-temp: 1rem; 14 | .#{$header} { 15 | @extend #{$header}; 16 | } 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/components/_float.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group float 7 | //// 8 | 9 | @mixin foundation-float-classes { 10 | .float-left { 11 | float: left !important; 12 | } 13 | 14 | .float-right { 15 | float: right !important; 16 | } 17 | 18 | .float-center { 19 | display: block; 20 | margin-right: auto; 21 | margin-left: auto; 22 | } 23 | 24 | .clearfix { 25 | @include clearfix; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/views/partials/layout/head.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Renders the HTML head content 3 | --}} 4 | 5 | 6 | {{info.title}} | API Reference 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/views/partials/swagger/paths.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-openapi 4 | 5 | Renders the paths-section of the Rest-Service definition 6 | @params {Path[]} paths a list of Swagger Path-Objects 7 | @api public 8 | --}} 9 | 10 |

Paths

11 | {{#if showTagSummary}} 12 | {{#eachSorted paths}} 13 | {{>swagger/path pathItems=. path=@key}} 14 | {{/eachSorted}} 15 | {{else}} 16 | {{#each paths}} 17 | {{>swagger/path pathItems=. path=@key}} 18 | {{/each}} 19 | {{/if}} 20 | -------------------------------------------------------------------------------- /app/views/partials/swagger/path.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-openapi 4 | 5 | Renders a single path definition with all its methods (GET, POST). 6 | @param {string} path the request path 7 | @param {object} pathItems a swagger [path-item-object](http://swagger.io/specification/#pathItemObject) 8 | @api public 9 | --}} 10 | 11 | 12 | {{#each pathItems}} 13 | {{>swagger/operation . operation=. method=@key path=../path}} 14 | {{/each}} 15 | -------------------------------------------------------------------------------- /app/views/partials/swagger/x-spectacle-topics.hbs: -------------------------------------------------------------------------------- 1 | {{#if x-spectacle-topics}} 2 | {{#each x-spectacle-topics}} 3 |

{{@key}}

4 |
5 |
6 |
7 | {{md description}} 8 |
9 | {{#if example}} 10 |
11 |
12 | {{md example}} 13 |
14 |
15 | {{/if}} 16 |
17 |
18 | {{/each}} 19 | {{/if}} 20 | -------------------------------------------------------------------------------- /app/helpers/ifeq.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Block helper that compares to values. The body is executed if both value equal. 3 | * Example: 4 | * 5 | * ```hbs 6 | * {{#ifeq value 10}} 7 | * Value is 10 8 | * {{else}} 9 | * Value is not 10 10 | * {{/ifeq}} 11 | * ``` 12 | * 13 | * @param {object} `v1` the first value 14 | * @param {object} `v2` the second value 15 | */ 16 | module.exports = function(v1, v2, options) { 17 | // http://stackoverflow.com/questions/8853396/logical-operator-in-a-handlebars-js-if-conditional 18 | if (v1 === v2) { 19 | return options.fn(this) 20 | } 21 | return options.inverse(this) 22 | }; 23 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/typography/_alignment.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @mixin foundation-text-alignment { 6 | @each $size in $breakpoint-classes { 7 | @include breakpoint($size) { 8 | @each $align in (left, right, center, justify) { 9 | @if $size != $-zf-zero-breakpoint { 10 | .#{$size}-text-#{$align} { 11 | text-align: $align; 12 | } 13 | } 14 | @else { 15 | .text-#{$align} { 16 | text-align: $align; 17 | } 18 | } 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/views/partials/json-schema/reference.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-json-schema 4 | 5 | Renders a reference to a subschema 6 | --}} 7 | {{#if $ref}} 8 | 11 | {{else if items.$ref}} 12 | 15 | {{/if}} 16 | -------------------------------------------------------------------------------- /test/fixtures/issue-98.yml: -------------------------------------------------------------------------------- 1 | swagger: '2.0' 2 | info: 3 | description: https://github.com/sourcey/spectacle/issues/98 4 | title: issue 98 5 | definitions: 6 | Challenges: 7 | type: object 8 | properties: 9 | total: 10 | description: Total number of challenges 11 | type: integer 12 | completed: 13 | description: Number of challenges completed by participant 14 | type: integer 15 | paths: 16 | /challenges: 17 | get: 18 | description: 'issue 98' 19 | responses: 20 | '200': 21 | description: OK 22 | schema: 23 | $ref: '#/definitions/Challenges' 24 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/typography/_typography.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group typography 7 | //// 8 | 9 | // Base typography styles (tags only) 10 | @import 'base'; 11 | 12 | // Typography helper classes (classes only) 13 | @import 'helpers'; 14 | 15 | // Text alignment classes 16 | @import 'alignment'; 17 | 18 | // Print styles 19 | @import 'print'; 20 | 21 | @mixin foundation-typography { 22 | @include foundation-typography-base; 23 | @include foundation-typography-helpers; 24 | @include foundation-text-alignment; 25 | @include foundation-print-styles; 26 | } 27 | -------------------------------------------------------------------------------- /app/views/partials/json-schema/allOf.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-json-schema 4 | 5 | Renders a json-schema "allOf"-definition. 6 | --}} 7 |
8 | {{! Display ref (i.e. superclasses)}} 9 |
10 |
    11 | {{#each .}} 12 | {{>json-schema/reference .}} 13 | {{/each}} 14 |
15 |
16 |
17 | {{#each .}} 18 | {{#unless $ref}} 19 | {{>json-schema/body}} 20 | {{/unless}} 21 | {{/each}} 22 |
23 |
24 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_box.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-box 7 | //// 8 | 9 | /// Box Mixin: Easily create a square, rectangle or a circle 10 | /// @param {Number} $width[] Width of the box 11 | /// @param {Number} $height[$width] Height of the box, defaults to `$width` to easily make a square 12 | /// @param {Boolean} $circle[false] Makes the box a circle, by default `false`. 13 | @mixin box( 14 | $width, 15 | $height: $width, 16 | $circle: false 17 | ) { 18 | width: $width; 19 | height: $height; 20 | @if $circle { 21 | border-radius: 50% !important; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /test/fixtures/basic-path.yaml: -------------------------------------------------------------------------------- 1 | get: 2 | description: Get a basic response. 3 | responses: 4 | "200": 5 | description: The basic response. 6 | "500": 7 | description: An error occured. 8 | post: 9 | description: Send some data. 10 | produces: 11 | - application/json 12 | - text/html 13 | parameters: 14 | - name: type 15 | in: query 16 | type: string 17 | description: The type of response (JSON/HTML) requested. 18 | - name: id 19 | in: formData 20 | type: string 21 | description: The data to store. 22 | responses: 23 | "200": 24 | description: The basic response. 25 | "409": 26 | description: An ID conflict occured. 27 | -------------------------------------------------------------------------------- /app/helpers/swaggerCollectionFormat.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015 Nils Knappmeier 3 | * https://github.com/bootprint/bootprint-openapi 4 | * 5 | * @license MIT 6 | **/ 7 | 8 | module.exports = function(value, paramName) { 9 | return { 10 | 'csv': 'Array values passed separated by comma: `?' + paramName + '=aaa,bbb`', 11 | 'ssv': 'Array values passed separated by space: `?' + paramName + '=aaa bbb`', 12 | 'tsv': 'Array values passed separated by tab: `?' + paramName + '=aaa\\tbbb`', 13 | 'pipes': 'Array values passed separated by pipe: `?' + paramName + '=aaa|bbb`', 14 | 'multi': 'Array values passed as multiple parameters: `?' + paramName + '=aaa&' + paramName + '=bbb`' 15 | }[value] 16 | }; 17 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:base", 5 | ":dependencyDashboard", 6 | ":rebaseStalePrs" 7 | ], 8 | "includeForks": true, 9 | "schedule": [ 10 | "before 3am every weekday" 11 | ], 12 | "enabledManagers": [ 13 | "npm", 14 | "dockerfile", 15 | "github-actions" 16 | ], 17 | "packageRules": [ 18 | { 19 | "matchPackageNames": ["grunt"], 20 | "matchPackagePrefixes": ["grunt-"], 21 | "groupName": "Grunt" 22 | }, 23 | { 24 | "matchUpdateTypes": ["minor", "patch", "pin", "digest"], 25 | "groupName": "Minor Packages", 26 | "automerge": true 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/grid/_size.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group grid 7 | //// 8 | 9 | /// Set the width of a grid column. 10 | /// 11 | /// @param {Number|List} $width [$grid-column-count] - Width to make the column. You can pass in any value accepted by the `grid-column()` function, such as `6`, `50%`, or `1 of 2`. 12 | @mixin grid-column-size( 13 | $columns: $grid-column-count 14 | ) { 15 | width: grid-column($columns); 16 | } 17 | 18 | /// Shorthand for `grid-column-size()`. 19 | /// @alias grid-column-size 20 | @mixin grid-col-size( 21 | $columns: $grid-column-count 22 | ) { 23 | @include grid-column-size($columns); 24 | } 25 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "Launch Program", 11 | "cwd": "${workspaceRoot}", 12 | "program": "${workspaceFolder}/bin/dociql.js", 13 | "protocol": "inspector", 14 | "args": [ 15 | "-l", 16 | "eevee.png", 17 | "config.yml" 18 | ] 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /app/vendor/foundation/_vendor/sassy-lists/stylesheets/functions/_to-list.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Casts `$value` into a list. 3 | /// 4 | /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-to-list 5 | /// 6 | /// @param {*} $value - value to cast to list 7 | /// @param {String} $separator [space] - separator to use 8 | /// 9 | /// @example 10 | /// sl-to-list(a b c, comma) 11 | /// // a, b, c 12 | /// 13 | /// @return {List} 14 | /// 15 | 16 | @function sl-to-list($value, $separator: list-separator($value)) { 17 | @return join((), $value, $separator); 18 | } 19 | 20 | /// 21 | /// @requires sl-to-list 22 | /// @alias sl-to-list 23 | /// 24 | 25 | @function sl-listify($value) { 26 | @return sl-to-list($value); 27 | } 28 | -------------------------------------------------------------------------------- /app/helpers/md.js: -------------------------------------------------------------------------------- 1 | var Handlebars = require('handlebars') 2 | var common = require('../lib/common') 3 | 4 | /** 5 | * Render a markdown formatted text as HTML. 6 | * @param {string} `value` the markdown-formatted text 7 | * @param {boolean} `options.hash.stripParagraph` the marked-md-renderer wraps generated HTML in a

-tag by default. 8 | * If this options is set to true, the

-tag is stripped. 9 | * @returns {Handlebars.SafeString} a Handlebars-SafeString containing the provieded 10 | * markdown, rendered as HTML. 11 | */ 12 | module.exports = function(value, options) { 13 | value = value + '' 14 | var html = common.markdown(value, options.hash ? options.hash.stripParagraph : false) 15 | return new Handlebars.SafeString(html) 16 | }; 17 | -------------------------------------------------------------------------------- /app/helpers/getTryItNow.js: -------------------------------------------------------------------------------- 1 | var Handlebars = require('handlebars') 2 | var common = require('../lib/common') 3 | 4 | module.exports = function (value, options) { 5 | const query = value.example; 6 | const variables = null 7 | // value.schema 8 | // ? JSON.stringify(Object.keys(value.schema.properties).reduce((cur, key) => { 9 | // cur[key] = {} 10 | // return cur 11 | // }, {})) 12 | // : null 13 | 14 | const variablesQuery = variables ? `&variables=${encodeURIComponent(variables)}` : "" 15 | 16 | var url = `${options.data.root.servers[0].url}?query=${encodeURIComponent(query)}${variablesQuery}`; 17 | return new Handlebars.SafeString(`Try it now\n`); 18 | } 19 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/components/_sticky.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @mixin foundation-sticky { 6 | .sticky-container { 7 | position: relative; 8 | } 9 | 10 | .sticky { 11 | position: relative; 12 | z-index: 0; 13 | transform: translate3d(0, 0, 0); 14 | } 15 | 16 | .sticky.is-stuck { 17 | position: fixed; 18 | z-index: 5; 19 | width: 100%; 20 | 21 | &.is-at-top { 22 | top: 0; 23 | } 24 | 25 | &.is-at-bottom { 26 | bottom: 0; 27 | } 28 | } 29 | 30 | .sticky.is-anchored { 31 | position: relative; 32 | right: auto; 33 | left: auto; 34 | 35 | &.is-at-bottom { 36 | bottom: 0; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/lib/errors.js: -------------------------------------------------------------------------------- 1 | exports.LocalRefError = LocalRefError = function LocalRefError(message) { 2 | this.name = "LocalRefError"; 3 | this.message = message || "Local Reference Error"; 4 | this.stack = (new Error()).stack; 5 | } 6 | 7 | LocalRefError.prototype = Object.create(Error.prototype) 8 | LocalRefError.prototype.constructor = LocalRefError; 9 | 10 | /** 11 | * Used when the spec tree is improperly walked, and gets into an unrecoverable spot. 12 | */ 13 | exports.TreeWalkError = TreeWalkError = function TreeWalkError(message) { 14 | this.name = "TreeWalkError"; 15 | this.message = message || "Error Walking Tree"; 16 | this.stack = (new Error()).stack; 17 | } 18 | 19 | TreeWalkError.prototype = Object.create(Error.prototype) 20 | TreeWalkError.prototype.constructor = TreeWalkError; 21 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/forms/_help-text.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group forms 7 | //// 8 | 9 | /// Default color for help text. 10 | /// @type Color 11 | $helptext-color: $black !default; 12 | 13 | /// Default font size for help text. 14 | /// @type Number 15 | $helptext-font-size: rem-calc(13) !default; 16 | 17 | /// Default font style for help text. 18 | /// @type Keyword 19 | $helptext-font-style: italic !default; 20 | 21 | @mixin foundation-form-helptext { 22 | .help-text { 23 | $margin-top: ($form-spacing * 0.5) * -1; 24 | 25 | margin-top: $margin-top; 26 | font-size: $helptext-font-size; 27 | font-style: $helptext-font-style; 28 | color: $helptext-color; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/plugins/foundation.core.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery'; 2 | 3 | import { Foundation } from '../../foundation.core'; 4 | Foundation.addToJquery($); 5 | 6 | // These are now separated out, but historically were a part of this module, 7 | // and since this is here for backwards compatibility we include them in 8 | // this entry. 9 | import {rtl, GetYoDigits, transitionend} from '../../foundation.util.core'; 10 | Foundation.rtl = rtl; 11 | Foundation.GetYoDigits = GetYoDigits; 12 | Foundation.transitionend = transitionend; 13 | 14 | // Every plugin depends on plugin now, we can include that on the core for the 15 | // script inclusion path. 16 | 17 | import { Plugin } from '../../foundation.plugin'; 18 | Foundation.Plugin = Plugin; 19 | 20 | 21 | window.Foundation = Foundation; 22 | -------------------------------------------------------------------------------- /app/views/partials/layout/topbar.hbs: -------------------------------------------------------------------------------- 1 |

2 |
3 | 4 |
5 | {{! Add right menu items like so... }} 6 |
7 | 8 |
9 | {{!-- 10 |
11 | 20 |
21 | --}} 22 |
23 | -------------------------------------------------------------------------------- /app/vendor/foundation/_vendor/sassy-lists/stylesheets/functions/_remove.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Removes value(s) `$value` from `$list`. 3 | /// 4 | /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-remove 5 | /// 6 | /// @requires sl-replace 7 | /// 8 | /// @param {List} $list - list to update 9 | /// @param {*} $value - value to remove 10 | /// 11 | /// @example 12 | /// sl-remove(a b c, a) 13 | /// // b c 14 | /// 15 | /// @return {List} 16 | /// 17 | 18 | @function sl-remove($list, $value) { 19 | $_: sl-missing-dependencies('sl-replace'); 20 | 21 | @return sl-replace($list, $value, null); 22 | } 23 | 24 | /// 25 | /// @requires sl-remove 26 | /// @alias sl-remove 27 | /// 28 | 29 | @function sl-without($list, $value) { 30 | @return sl-remove($list, $value); 31 | } 32 | -------------------------------------------------------------------------------- /app/vendor/foundation/_vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Checks whether `$functions` exist in global scope. 3 | /// 4 | /// @access private 5 | /// 6 | /// @param {ArgList} $functions - list of functions to check for 7 | /// 8 | /// @return {Bool} Whether or not there are missing dependencies 9 | /// 10 | 11 | @function sl-missing-dependencies($functions...) { 12 | $missing-dependencies: (); 13 | 14 | @each $function in $functions { 15 | @if not function-exists($function) { 16 | $missing-dependencies: append($missing-dependencies, $function, comma); 17 | } 18 | } 19 | 20 | @if length($missing-dependencies) > 0 { 21 | @error 'Unmet dependencies! The following functions are required: #{$missing-dependencies}.'; 22 | } 23 | 24 | @return length($missing-dependencies) > 0; 25 | } 26 | -------------------------------------------------------------------------------- /test/fixtures/Example.yml: -------------------------------------------------------------------------------- 1 | swagger: '2.0' 2 | paths: 3 | definitions: 4 | Order: 5 | type: object 6 | properties: 7 | id: 8 | type: integer 9 | format: int64 10 | cheeseId: 11 | type: integer 12 | format: int64 13 | quantity: 14 | type: integer 15 | format: int32 16 | shipDate: 17 | type: string 18 | format: date-time 19 | status: 20 | type: string 21 | description: Order Status 22 | enum: 23 | - placed 24 | - approved 25 | - delivered 26 | complete: 27 | type: boolean 28 | default: false 29 | example: 30 | cheeseId: '1' 31 | complete: 'true' 32 | id: '1' 33 | quantity: '66' 34 | shipDate: '04-10-2017 00:09:21 UTC' 35 | status: available 36 | -------------------------------------------------------------------------------- /test/fixtures/issue-69.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger": "2.0", 3 | "paths": { 4 | "/aws/healthcheck": { 5 | "get": { 6 | "tags": [ 7 | "Healthcheck" 8 | ], 9 | "summary": "Returns service status", 10 | "description": "Checks if our APIs are online", 11 | "operationId": "getStatus", 12 | "produces": [ 13 | "application/json" 14 | ], 15 | "responses": { 16 | "200": { 17 | "description": "All services online" 18 | }, 19 | "500": { 20 | "description": "Something is wrong", 21 | "schema": { 22 | "type": "string", 23 | "enum": [ 24 | "Db not working", 25 | "Redis not working" 26 | ] 27 | } 28 | } 29 | } 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/views/partials/layout/page.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | This partial renders the main page content 3 | @api public 4 | --}} 5 |
6 | 17 | {{!layout/topbar}} 18 |
19 | 22 |
23 | {{>layout/content}} 24 |
25 |
26 | -------------------------------------------------------------------------------- /app/dociql/convert-type.js: -------------------------------------------------------------------------------- 1 | const { 2 | GraphQLScalarType, 3 | GraphQLNonNull, 4 | GraphQLList 5 | } = require("graphql") 6 | 7 | const SCALARS = { 8 | Int: 'integer', 9 | Float: 'number', 10 | String: 'string', 11 | Boolean: 'boolean', 12 | ID: 'string' 13 | }; 14 | 15 | function convertType(type) { 16 | if (type instanceof GraphQLNonNull) 17 | return Object.assign(convertType(type.ofType), { 18 | required: true 19 | }); 20 | if (type instanceof GraphQLList) { 21 | return { 22 | type: 'array', 23 | items: convertType(type.ofType) 24 | } 25 | } 26 | if (type instanceof GraphQLScalarType) 27 | return { 28 | type: SCALARS[type.name] 29 | }; 30 | 31 | return { $ref: `#/definitions/${type.name}`}; 32 | } 33 | 34 | module.exports = convertType -------------------------------------------------------------------------------- /app/vendor/foundation/scss/forms/_forms.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group forms 7 | //// 8 | 9 | /// Global spacing for form elements. 10 | /// @type Number 11 | $form-spacing: rem-calc(16) !default; 12 | 13 | @import 'text'; 14 | @import 'checkbox'; 15 | @import 'label'; 16 | @import 'help-text'; 17 | @import 'input-group'; 18 | @import 'fieldset'; 19 | @import 'select'; 20 | @import 'range'; 21 | @import 'progress'; 22 | @import 'meter'; 23 | @import 'error'; 24 | 25 | @mixin foundation-forms { 26 | @include foundation-form-text; 27 | @include foundation-form-checkbox; 28 | @include foundation-form-label; 29 | @include foundation-form-helptext; 30 | @include foundation-form-prepostfix; 31 | @include foundation-form-fieldset; 32 | @include foundation-form-select; 33 | @include foundation-form-error; 34 | } 35 | -------------------------------------------------------------------------------- /app/vendor/foundation/_vendor/sassy-lists/stylesheets/functions/_purge.scss: -------------------------------------------------------------------------------- 1 | /// Removes all false and null values from `$list`. 2 | /// 3 | /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-purge 4 | /// 5 | /// @requires sl-is-true 6 | /// @requires sl-to-list 7 | /// 8 | /// @param {List} $list - list to purge 9 | /// 10 | /// @example 11 | /// sl-purge(null a false b) 12 | /// // a b 13 | /// 14 | /// @return {List} 15 | /// 16 | 17 | @function sl-purge($list) { 18 | $_: sl-missing-dependencies('sl-is-true', 'sl-to-list'); 19 | 20 | $result: (); 21 | 22 | @each $item in $list { 23 | @if sl-is-true($item) { 24 | $result: append($result, $item, list-separator($list)); 25 | } 26 | } 27 | 28 | @return sl-to-list($result); 29 | } 30 | 31 | /// 32 | /// @requires sl-purge 33 | /// @alias sl-purge 34 | /// 35 | 36 | @function sl-clean($list) { 37 | @return sl-purge($list); 38 | } 39 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_arrow.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-arrow 7 | //// 8 | 9 | /// Map containing all the `arrow` direction 10 | /// @type Map 11 | $prototype-arrow-directions: ( 12 | down, 13 | up, 14 | right, 15 | left 16 | ) !default; 17 | 18 | /// Width of the Arrow, `0.4375rem` by default. 19 | /// @type Number 20 | $prototype-arrow-size: 0.4375rem; 21 | 22 | /// Color of the Arrow, `$black` by default. 23 | /// @type Color 24 | $prototype-arrow-color: $black; 25 | 26 | @mixin foundation-prototype-arrow { 27 | @each $prototype-arrow-direction in $prototype-arrow-directions { 28 | .arrow-#{$prototype-arrow-direction} { 29 | @include css-triangle( 30 | $prototype-arrow-size, 31 | $prototype-arrow-color, 32 | $prototype-arrow-direction 33 | ); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/views/partials/swagger/responseHeaderRow.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-openapi 4 | 5 | Display a single parameter in a table row. 6 | @param {Header} header a (Header)[https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#headerObject] object 7 | @param {string} name the name of the response header 8 | @api public 9 | --}} 10 | 11 | 12 | {{name}} 13 | {{md header.description}} 14 | 15 | {{>json-schema/datatype header}} 16 | {{#if header.items}} 17 | ,{{>json-schema/datatype header.items}} 18 | {{/if}} 19 | {{#if header.collectionFormat}} 20 |
{{md (swagger-collection-format header.collectionFormat)}}
21 | {{/if}} 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_border-box.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-border-box 7 | //// 8 | 9 | /// Responsive breakpoints for border box. 10 | /// @type Boolean 11 | $prototype-border-box-breakpoints: $global-prototype-breakpoints !default; 12 | 13 | /// Border box utility 14 | @mixin border-box { 15 | box-sizing: border-box !important; 16 | } 17 | 18 | @mixin foundation-prototype-border-box { 19 | .border-box { 20 | @include border-box; 21 | } 22 | 23 | @if ($prototype-border-box-breakpoints) { 24 | // Loop through Responsive Breakpoints 25 | @each $size in $breakpoint-classes { 26 | @include breakpoint($size) { 27 | @if $size != $-zf-zero-breakpoint { 28 | .#{$size}-border-box { 29 | @include border-box; 30 | } 31 | } 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_border-none.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-border-none 7 | //// 8 | 9 | /// Responsive breakpoints for border none. 10 | /// @type Boolean 11 | $prototype-border-none-breakpoints: $global-prototype-breakpoints !default; 12 | 13 | /// Border none utility 14 | @mixin border-none { 15 | border: none !important; 16 | } 17 | 18 | @mixin foundation-prototype-border-none { 19 | .border-none { 20 | @include border-none; 21 | } 22 | 23 | @if ($prototype-border-none-breakpoints) { 24 | // Loop through Responsive Breakpoints 25 | @each $size in $breakpoint-classes { 26 | @include breakpoint($size) { 27 | @if $size != $-zf-zero-breakpoint { 28 | .#{$size}-border-none { 29 | @include border-none; 30 | } 31 | } 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_rotate.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-rotate 7 | //// 8 | 9 | /// Rotate Mixin: Rotate an element to a certain deg 10 | /// @param {Number} $deg[] Degree of rotation 11 | @mixin rotate($deg) { 12 | transform:rotate($deg + deg); 13 | } 14 | 15 | /// RotateX Mixin: Rotate an element to a certain deg on X-Axis 16 | /// @param {Number} $deg[] Degree of rotation 17 | @mixin rotateX($deg) { 18 | transform:rotateX($deg + deg); 19 | } 20 | 21 | /// RotateY Mixin: Rotate an element to a certain deg on Y-Axis 22 | /// @param {Number} $deg[] Degree of rotation 23 | @mixin rotateY($deg) { 24 | transform:rotateY($deg + deg); 25 | } 26 | 27 | /// RotateZ Mixin: Rotate an element to a certain deg on Z-Axis 28 | /// @param {Number} $deg[] Degree of rotation 29 | @mixin rotateZ($deg) { 30 | transform:rotateZ($deg + deg); 31 | } -------------------------------------------------------------------------------- /app/vendor/foundation/scss/util/_direction.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group functions 7 | //// 8 | 9 | /// Returns the opposite direction of $dir 10 | /// 11 | /// @param {Keyword} $dir - Used direction between "top", "right", "bottom" and "left". 12 | /// @return {Keyword} Opposite direction of $dir 13 | @function direction-opposite( 14 | $dir 15 | ) { 16 | $dirs: (top, right, bottom, left); 17 | $place: index($dirs, $dir); 18 | 19 | @if $place == null { 20 | @error 'direction-opposite: Invalid $dir parameter, expected a value from "#{$dirs}", found "#{$dir}".'; 21 | @return null; 22 | } 23 | 24 | // Calcul the opposite place in a circle, with a starting index of 1 25 | $length: length($dirs); 26 | $demi: $length / 2; 27 | $opposite-place: (($place + $demi - 1) % $length) + 1; 28 | 29 | @return nth($dirs, $opposite-place); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: trusty 2 | sudo: false 3 | language: node_js 4 | node_js: 5 | - 12 6 | after_success: 7 | - "./node_modules/.bin/codecov" 8 | deploy: 9 | provider: npm 10 | email: opensource@wayfair.com 11 | api_key: 12 | secure: bZpDVDvp/dkmhdom0pCIJ98yDMJyhKhPSRgoD5pcDQvSlGaap9tjQncfh4mJSmmDL5XLgx7aqP6pqXwxEj6TYDXyRewcCFVDWBv8enqFLWnjfx7T2CBVO99w0j29jldGACNVAwW1BPKsBah11AfrjF+m33m49ox0robDmXLo5cI2cFvEUtXgUo6zbdnHEVjqbmz9nx8IOZYi5/YWE0Z6/t/Bzi3lCgnzGr5mZntGrY58VGLgKR9HpMuhbiD57gtXoQoKns6TsKypxSza3hRnE+VvWK0JtYNTJwQixgoYh/tpTVhnqa9+m+opPhQkDSjpAL5Toi6hBoxqoGBlyiKSgkNIjQrga8K1zaG7/a4ljO2nNaPugos7hOAs+DcQB+u8dKaGJb9dhizGhlXoPypcvH+CyhL0KKvZ/gWQNMvZVT6O6iYfh2KzHw/Gu4oAmBUV8CoQTtfF3mOuW3fbEETF0rTpGPgpOTaQXK30NAiJcBLD2no4JmMUjzNKYyiiwprCt2rEnWnsrNrP44PjiXfvnCBywrE6ee3EZocJ01nyAyeGCaftkFwZ2Eq+1CBI2N/e888UVodrOErWqgkNr/U3uiCJVtBVzrMQM096R9FkcsPD0L2Em6Qfl4bg3DkPhIksdPXl2/uQ+q9YGrQhGXYS9VelRv1O+TV3p2kGMK+oL1M= 13 | on: 14 | tags: true 15 | repo: wayfair/dociql 16 | branch: master 17 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/forms/_checkbox.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group forms 7 | //// 8 | 9 | @mixin foundation-form-checkbox { 10 | [type='file'], 11 | [type='checkbox'], 12 | [type='radio'] { 13 | margin: 0 0 $form-spacing; 14 | } 15 | 16 | // Styles for input/label siblings 17 | [type='checkbox'] + label, 18 | [type='radio'] + label { 19 | display: inline-block; 20 | vertical-align: baseline; 21 | 22 | margin-#{$global-left}: $form-spacing * 0.5; 23 | margin-#{$global-right}: $form-spacing; 24 | margin-bottom: 0; 25 | 26 | &[for] { 27 | cursor: pointer; 28 | } 29 | } 30 | 31 | // Styles for inputs inside labels 32 | label > [type='checkbox'], 33 | label > [type='radio'] { 34 | margin-#{$global-right}: $form-spacing * 0.5; 35 | } 36 | 37 | // Normalize file input width 38 | [type='file'] { 39 | width: 100%; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/helpers/swaggerEndpoint.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015 Nils Knappmeier 3 | * https://github.com/bootprint/bootprint-openapi 4 | * 5 | * @license MIT 6 | **/ 7 | 8 | module.exports = function(options) { 9 | var data = options.data.root; 10 | // var endpoint = 'http'; 11 | // if (data.schemes) { 12 | // data.schemes.every(function (scheme) { 13 | // if (scheme == 'https' || scheme == 'HTTPS') { 14 | // endpoint = 'https'; 15 | // return false; 16 | // } 17 | // endpoint = scheme; 18 | // return true; 19 | // }) 20 | // } 21 | // endpoint += '://'; 22 | // endpoint += data.host; 23 | // if (data.basePath) { 24 | // // endpoint += '/' 25 | // endpoint += data.basePath; 26 | // } 27 | // return endpoint; 28 | return data.servers.map(server => 29 | `${server.description 30 | ? server.description.trim() 31 | : "Endpoint:"}:\n${server.url 32 | ? server.url.trim() 33 | : "<>"}\n`).join(""); 34 | }; 35 | -------------------------------------------------------------------------------- /app/helpers/schemaDatatype.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015 Nils Knappmeier 3 | * https://github.com/bootprint/bootprint-openapi 4 | * 5 | * @license MIT 6 | **/ 7 | 8 | /** 9 | * Returns a descriptive string for a datatype 10 | * @param value 11 | * @returns {String} a string like string[] or object[][] 12 | */ 13 | module.exports = function (value) { 14 | return dataType(value) 15 | } 16 | 17 | function dataType(value) { 18 | // console.log('dataType', value) 19 | if (!value) return null 20 | if (typeof value === 'string') { 21 | throw 'invalid value' 22 | } 23 | if (value['anyOf'] || value['allOf'] || value['oneOf']) { 24 | return '' 25 | } 26 | if (!value.type) { 27 | return 'object' 28 | } 29 | if (value.type === 'array') { 30 | if (!value.items) { 31 | return 'array' 32 | } 33 | if (value.items.type) { 34 | return dataType(value.items) + '[]' 35 | } else { 36 | return 'object[]' 37 | } 38 | } 39 | return value.type 40 | } 41 | -------------------------------------------------------------------------------- /test/test-preprocessor.js: -------------------------------------------------------------------------------- 1 | var chai = require("chai"); 2 | var should = chai.should(); 3 | 4 | var preprocessor = require("../app/lib/preprocessor"); 5 | 6 | var minimal = require("./minimal").minimal; 7 | 8 | describe("preprocessor", function() { 9 | 10 | var spec = null; 11 | var processed = null; 12 | 13 | beforeEach(function() { 14 | spec = Object.assign({}, minimal); 15 | processed = preprocessor({ 16 | specFile: __dirname + "/spec.json" 17 | }, spec); 18 | }); 19 | 20 | describe("with minimal spec", function() { 21 | 22 | it("should retain initial values", function() { 23 | Object.assign({}, processed, minimal).should.deep.equal(processed); 24 | }); 25 | 26 | it("should add 'tags'", function() { 27 | processed.should.have.property("tags"); 28 | processed.tags.should.deep.equal([]); 29 | }); 30 | 31 | it("should add 'showTagSummary'", function() { 32 | processed.should.have.property("showTagSummary", false); 33 | }); 34 | 35 | }); 36 | 37 | }); 38 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/xy-grid/_position.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group xy-grid 7 | //// 8 | 9 | /// Offsets a column to the right/bottom by `$n` columns. 10 | /// 11 | /// @param {Number|List} $n - Size to offset by. You can pass in any value accepted by the `zf-cell()` mixin, such as `6`, `50%`, or `1 of 2`. 12 | /// @param {Boolean} $vertical [false] Sets the direction of the offset. If set to true will apply margin-top instead. 13 | @mixin xy-cell-offset( 14 | $n, 15 | $gutters: $grid-margin-gutters, 16 | $gutter-type: margin, 17 | $breakpoint: $-zf-zero-breakpoint, 18 | $vertical: false 19 | ) { 20 | $direction: if($vertical, 'top', $global-left); 21 | 22 | @include -zf-breakpoint-value($breakpoint, $gutters) { 23 | $gutter: rem-calc($-zf-bp-value) / 2; 24 | $size: if($gutter-type == 'margin', calc(#{xy-cell-size($n)} + #{$gutter}), #{xy-cell-size($n)}); 25 | 26 | margin-#{$direction}: #{$size}; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/views/partials/swagger/deprecated/parameterDefinitions.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Global parameter definitions (see https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#parametersDefinitionsObject) 3 | @param {object} parameters the parameter-definitions object 4 | @api public 5 | --}} 6 | {{#if parameters}} 7 |

Parameter definitions

8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {{#each parameters}} 21 | {{> swagger/parameterRow key=@key parameter=.}} 22 | {{/each}} 23 | 24 |
25 | {{/if}} 26 | -------------------------------------------------------------------------------- /app/views/partials/swagger/deprecated/tags.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Renders a summary based on the tags of this services, containing references to all operations and paths 3 | @param {Array<{name:string, summary:string, operations: object}>} tags a list of tags 4 | @api public 5 | --}} 6 | 7 |

Summary

8 | {{#eachSorted tags}} 9 |
10 |

Tag: {{name}}

11 | {{md description}} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | {{#each operations}} 22 | 23 | 24 | 25 | 26 | {{/each}} 27 | 28 |
OperationDescription
{{toUpperCase method}} {{path}}{{md summary}}
29 |
30 | {{/eachSorted}} 31 | -------------------------------------------------------------------------------- /app/views/partials/layout/content.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | This partial renders the documentation content 3 | @api public 4 | --}} 5 | 6 |
7 |

{{info.title}} 8 | API Reference 9 |

10 | {{#unless info.x-spectacle-hide}} 11 | {{>swagger/introduction}} 12 | {{/unless}} 13 | {{#unless securityDefinitions.x-spectacle-hide}} 14 | {{>swagger/securityDefinitions}} 15 | {{/unless}} 16 | {{>swagger/x-spectacle-topics}} 17 | 18 | {{#if showTagSummary}} 19 | {{>swagger/tags}} 20 | {{else}} 21 | {{>swagger/paths}} 22 | {{/if}} 23 | 24 | {{>swagger/definitions definitions=definitions}} 25 | 26 | {{! Powered by link }} 27 |
28 |
29 | {{#if externalDocs}} 30 | {{externalDocs.description}} 31 | {{else}} 32 | Documentation by DociQL 33 | {{/if}} 34 |
35 |
36 |
37 | -------------------------------------------------------------------------------- /app/views/partials/json-schema/body.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-json-schema 4 | 5 | Renders a json-schema without the surrounding panel. 6 | @param {boolean} showType whether or not to show the plain datatype for primitives 7 | --}} 8 | 9 | {{#if description}} 10 |
11 | {{md description}} 12 |
13 | {{/if}} 14 | {{!-- 15 | {{#if example}} 16 |
17 | {{printSchema example}} 18 |
19 | {{/if}} 20 | --}} 21 | {{#if type}} 22 | {{! Render differently depending on type}} 23 | {{#ifeq type 'object'}} 24 | {{>json-schema/type-object}} 25 | {{else}} 26 | {{#ifeq type 'array'}} 27 | {{#if items}} 28 | {{>json-schema/array-items items}} 29 | {{/if}} 30 | {{/ifeq}} 31 | {{/ifeq}} 32 | {{else}} 33 | {{>json-schema/type-object}} 34 | {{/if}} 35 | {{#if allOf}} 36 | {{>json-schema/allOf allOf}} 37 | {{/if}} 38 | {{#if anyOf}} 39 | {{>json-schema/anyOf anyOf}} 40 | {{/if}} 41 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/util/_selector.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group functions 7 | //// 8 | 9 | /// Generates a selector with every text input type. You can also filter the list to only output a subset of those selectors. 10 | /// 11 | /// @param {List|Keyword} $types [()] - A list of text input types to use. Leave blank to use all of them. 12 | /// @param {Keyword} $modifier [''] - A modifier to be applied to each text input type (e.g. a class or a pseudo-class). Leave blank to ignore. 13 | @function text-inputs($types: (), $modifier: '') { 14 | $return: (); 15 | 16 | $all-types: 17 | text 18 | password 19 | date 20 | datetime 21 | datetime-local 22 | month 23 | week 24 | email 25 | number 26 | search 27 | tel 28 | time 29 | url 30 | color; 31 | 32 | @if not has-value($types) { 33 | $types: $all-types; 34 | } 35 | 36 | @each $type in $types { 37 | $return: append($return, unquote('[type=\'#{$type}\']#{$modifier}'), comma); 38 | } 39 | 40 | @return $return; 41 | } 42 | -------------------------------------------------------------------------------- /app/vendor/foundation/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2017 ZURB, inc. 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/util/_typography.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group functions 7 | //// 8 | 9 | $-zf-font-stack: ( 10 | 'georgia': (Georgia, "URW Bookman L", serif), 11 | 'helvetica': (Helvetica, Arial, "Nimbus Sans L", sans-serif), 12 | 'lucida-grande': ("Lucida Grande", "Lucida Sans Unicode", "Bitstream Vera Sans", sans-serif), 13 | 'monospace': ("Courier New", Courier, "Nimbus Sans L", monospace), 14 | 'system': (-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif), 15 | 'verdana': (Verdana, Geneva, "DejaVu Sans", sans-serif), 16 | ); 17 | 18 | /// Return a font stack list from a map. Equivalent to `map-safe-get($name, $-zf-font-stack)`. 19 | /// 20 | /// @param {String} $stack - Name of the font stack. 21 | /// @param {Map} $map [$-zf-font-stack] - Map of font stacks to retrieve a list from. 22 | /// 23 | /// @returns {List} Found font stack. 24 | @function font-stack($stack, $map: $-zf-font-stack) { 25 | @return map-safe-get($map, $stack); 26 | } 27 | -------------------------------------------------------------------------------- /app/vendor/foundation/_vendor/sassy-lists/stylesheets/functions/_replace.scss: -------------------------------------------------------------------------------- 1 | /// 2 | /// Replaces `$old` by `$new` in `$list`. 3 | /// 4 | /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-replace 5 | /// 6 | /// @requires sl-is-true 7 | /// @requires sl-purge 8 | /// @requires sl-to-list 9 | /// 10 | /// @param {List} $list - list to update 11 | /// @param {*} $old - value to replace 12 | /// @param {*} $value - new value for $old 13 | /// 14 | /// @example 15 | /// sl-replace(a b c, b, z) 16 | /// // a z c 17 | /// 18 | /// @example 19 | /// sl-replace(a b c, y, z) 20 | /// // a b c 21 | /// 22 | /// @return {List} 23 | /// 24 | 25 | @function sl-replace($list, $old, $value) { 26 | $_: sl-missing-dependencies('sl-is-true', 'sl-purge', 'sl-to-list'); 27 | 28 | $running: true; 29 | 30 | @while $running { 31 | $index: index($list, $old); 32 | 33 | @if not $index { 34 | $running: false; 35 | } 36 | 37 | @else { 38 | $list: set-nth($list, $index, $value); 39 | } 40 | 41 | } 42 | 43 | $list: if(sl-is-true($value), $list, sl-purge($list)); 44 | 45 | @return sl-to-list($list); 46 | } 47 | -------------------------------------------------------------------------------- /app/views/partials/swagger/deprecated/summary.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Renders a summary of this services ignoring tags, containing references to all operations and paths 3 | @todo params 4 | @api public 5 | --}} 6 |

Summary

7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {{#eachSorted paths}} 17 | {{#eachSorted .}} 18 | 19 | {{#if @first}} 20 | 23 | {{/if}} 24 | 27 | 30 | 31 | {{/eachSorted}} 32 | {{/eachSorted}} 33 | 34 |
PathOperationDescription
21 | {{@../key}} 22 | 25 | {{toUpperCase @key}} 26 | 28 | {{md summary}} 29 |
35 | -------------------------------------------------------------------------------- /app/views/partials/swagger/security.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-openapi 4 | 5 | Renders the security definitions of the Rest-service. 6 | @param {Security[]} security TODO 7 | @api public 8 | --}} 9 | {{#if security}} 10 |
11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | {{#each security}} 22 | {{#each this}} 23 | 24 | 25 | 29 | 30 | {{/each}} 31 | {{/each}} 32 | 33 |
{{@key}} 26 | {{#each this}}{{#unless @first}}, {{/unless}} 27 | {{this}}{{/each}} 28 |
34 |
35 |
36 |
37 | {{/if}} 38 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_shadow.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-shadow 7 | //// 8 | 9 | /// Responsive breakpoints for shadow utility. 10 | /// @type Boolean 11 | $prototype-shadow-breakpoints: $global-prototype-breakpoints !default; 12 | 13 | /// Default value for `prototype-box-shadow` 14 | /// @type Number 15 | $prototype-box-shadow: 0 2px 5px 0 rgba(0,0,0,.16), 16 | 0 2px 10px 0 rgba(0,0,0,.12) !default; 17 | 18 | /// Shadow Utility: Adds a light box shadow to an element by default. 19 | /// @param {Number} $shadow [$prototype-box-shadow] Box Shadow of a component 20 | @mixin shadow( 21 | $shadow: $prototype-box-shadow 22 | ) { 23 | box-shadow: $shadow; 24 | } 25 | 26 | @mixin foundation-prototype-shadow { 27 | .shadow { 28 | @include shadow; 29 | } 30 | 31 | @if ($prototype-shadow-breakpoints) { 32 | // Loop through Responsive Breakpoints 33 | @each $size in $breakpoint-classes { 34 | @include breakpoint($size) { 35 | @if $size != $-zf-zero-breakpoint { 36 | .#{$size}-shadow { 37 | @include shadow; 38 | } 39 | } 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/stylesheets/_utils.scss: -------------------------------------------------------------------------------- 1 | // 2 | //= Mixins and helpers 3 | // 4 | 5 | // Named sections 6 | @mixin named-section($title) { 7 | &:before { 8 | content: $title; 9 | display: block; 10 | // @extend h6; 11 | margin-bottom: 0.5em; 12 | color: $accent-color; 13 | text-transform: uppercase; 14 | font-size: 0.9rem; 15 | } 16 | } 17 | 18 | @mixin small-label($color: $alert-color) { 19 | @include label(); 20 | // @extend .label.#{$style}; 21 | background: $color; 22 | color: color-pick-contrast($color); 23 | font-size: 0.75rem; 24 | border-radius: 4px; 25 | padding: 3px 6px; 26 | } 27 | 28 | @mixin named-label($name, $color: $alert-color) { 29 | &:before { 30 | @include small-label($color); 31 | content: $name; 32 | } 33 | } 34 | 35 | // Draw a panel in a given color 36 | @mixin swagger-panel-operation($color) { 37 | background-color: $color; 38 | } 39 | 40 | @mixin table-header($label,$width: auto) { 41 | width: auto; 42 | &:before { 43 | content: $label; 44 | } 45 | } 46 | 47 | @mixin inset-panel() { 48 | background-color: transparent; 49 | border: none; 50 | border-top: 1px solid #000; 51 | border-bottom: 1px solid #404040; 52 | border-radius: 5px; 53 | box-shadow: 0 0 200px rgba(0, 0, 0, 0.33) inset; 54 | } 55 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/forms/_fieldset.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group forms 7 | //// 8 | 9 | /// Default border around custom fieldsets. 10 | /// @type Border 11 | $fieldset-border: 1px solid $medium-gray !default; 12 | 13 | /// Default padding inside custom fieldsets. 14 | /// @type Number 15 | $fieldset-padding: rem-calc(20) !default; 16 | 17 | /// Default margin around custom fieldsets. 18 | /// @type Number 19 | $fieldset-margin: rem-calc(18 0) !default; 20 | 21 | /// Default padding between the legend text and fieldset border. 22 | /// @type Number 23 | $legend-padding: rem-calc(0 3) !default; 24 | 25 | @mixin fieldset { 26 | margin: $fieldset-margin; 27 | padding: $fieldset-padding; 28 | border: $fieldset-border; 29 | 30 | legend { 31 | // Covers up the fieldset's border to create artificial padding 32 | margin: 0; 33 | margin-#{$global-left}: rem-calc(-3); 34 | padding: $legend-padding; 35 | } 36 | } 37 | 38 | @mixin foundation-form-fieldset { 39 | fieldset { 40 | margin: 0; 41 | padding: 0; 42 | border: 0; 43 | } 44 | 45 | legend { 46 | max-width: 100%; 47 | margin-bottom: $form-spacing * 0.5; 48 | } 49 | 50 | .fieldset { 51 | @include fieldset; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/forms/_label.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group forms 7 | //// 8 | 9 | /// Color for form labels. 10 | /// @type Color 11 | $form-label-color: $black !default; 12 | 13 | /// Font size for form labels. 14 | /// @type Number 15 | $form-label-font-size: rem-calc(14) !default; 16 | 17 | /// Font weight for form labels. 18 | /// @type Keyword 19 | $form-label-font-weight: $global-weight-normal !default; 20 | 21 | /// Line height for form labels. The higher the number, the more space between the label and its input field. 22 | /// @type Number 23 | $form-label-line-height: 1.8 !default; 24 | 25 | @mixin form-label { 26 | display: block; 27 | margin: 0; 28 | 29 | font-size: $form-label-font-size; 30 | font-weight: $form-label-font-weight; 31 | line-height: $form-label-line-height; 32 | color: $form-label-color; 33 | } 34 | 35 | @mixin form-label-middle { 36 | $input-border-width: get-border-value($input-border, width); 37 | 38 | margin: 0 0 $form-spacing; 39 | padding: ($form-spacing / 2 + rem-calc($input-border-width)) 0; 40 | } 41 | 42 | @mixin foundation-form-label { 43 | label { 44 | @include form-label; 45 | 46 | &.middle { 47 | @include form-label-middle; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/views/partials/swagger/deprecated/parameterRow.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Display a single parameter in a table row. 3 | @param {Parameter} parameter a parameter object 4 | @param {string=} key a reference key (if present, this is display in an additional 5 | column in front of the other columns 6 | @param {string=} $ref the reference path of the parameter, in case it is a reference to a default parameter 7 | @api public 8 | --}} 9 | 10 | {{#if key}} 11 | {{key}} 12 | {{/if}} 13 | 14 | {{parameter.name}} 15 | {{md parameter.description}} 16 | {{parameter.in}} 17 | 18 | {{~>json-schema/datatype parameter ~}} 19 | {{~#if parameter.collectionFormat ~}} 20 | , 21 | {{md (swagger-collection-format parameter.collectionFormat parameter.name) stripParagraph=true}} 22 | 23 | {{~/if}} 24 | 25 | 26 | {{#if parameter.required}} 27 | 28 | {{/if}} 29 | {{#if $ref}} 30 | {{$ref}} 31 | {{/if}} 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_display.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-display 7 | //// 8 | 9 | /// Responsive breakpoints for display classes 10 | /// @type Boolean 11 | $prototype-display-breakpoints: $global-prototype-breakpoints !default; 12 | 13 | /// Map containing all the `display` classes 14 | /// @type Map 15 | $prototype-display: ( 16 | inline, 17 | inline-block, 18 | block, 19 | table, 20 | table-cell 21 | ) !default; 22 | 23 | /// Display classes, by default coming through a map `$prototype-display` 24 | /// @param {String} $display [] Display classes 25 | @mixin display($display) { 26 | display: $display !important; 27 | } 28 | 29 | @mixin foundation-prototype-display { 30 | @each $display in $prototype-display { 31 | .display-#{$display} { 32 | @include display($display); 33 | } 34 | } 35 | 36 | @if ($prototype-display-breakpoints) { 37 | // Loop through Responsive Breakpoints 38 | @each $size in $breakpoint-classes { 39 | @include breakpoint($size) { 40 | @each $display in $prototype-display { 41 | @if $size != $-zf-zero-breakpoint { 42 | .#{$size}-display-#{$display} { 43 | @include display($display); 44 | } 45 | } 46 | } 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/views/partials/swagger/deprecated/parameters.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Renders the parameter table within a operation definition. 3 | @param {Array|Object} parameters a list of Swagger-Parameter objects 4 | If this is an object, an it is expected to be the global parameter list 5 | https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#parametersDefinitionsObject 6 | and the key of each entry is display in a column in front of the other columns. 7 | @api public 8 | --}} 9 | 10 | {{#if parameters}} 11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | {{#each parameters}} 25 | {{#if $ref}} 26 | {{> swagger/parameterRow parameter=(json-schema-resolve-ref $ref) $ref=$ref}} 27 | {{else}} 28 | {{> swagger/parameterRow parameter=.}} 29 | {{/if}} 30 | {{/each}} 31 | 32 |
33 |
34 |
35 | {{/if}} 36 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/foundation.util.imageLoader.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import $ from 'jquery'; 4 | 5 | /** 6 | * Runs a callback function when images are fully loaded. 7 | * @param {Object} images - Image(s) to check if loaded. 8 | * @param {Func} callback - Function to execute when image is fully loaded. 9 | */ 10 | function onImagesLoaded(images, callback){ 11 | var self = this, 12 | unloaded = images.length; 13 | 14 | if (unloaded === 0) { 15 | callback(); 16 | } 17 | 18 | images.each(function(){ 19 | // Check if image is loaded 20 | if (this.complete && this.naturalWidth !== undefined) { 21 | singleImageLoaded(); 22 | } 23 | else { 24 | // If the above check failed, simulate loading on detached element. 25 | var image = new Image(); 26 | // Still count image as loaded if it finalizes with an error. 27 | var events = "load.zf.images error.zf.images"; 28 | $(image).one(events, function me(event){ 29 | // Unbind the event listeners. We're using 'one' but only one of the two events will have fired. 30 | $(this).off(events, me); 31 | singleImageLoaded(); 32 | }); 33 | image.src = $(this).attr('src'); 34 | } 35 | }); 36 | 37 | function singleImageLoaded() { 38 | unloaded--; 39 | if (unloaded === 0) { 40 | callback(); 41 | } 42 | } 43 | } 44 | 45 | export { onImagesLoaded }; 46 | -------------------------------------------------------------------------------- /app/stylesheets/_monokai.scss: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/ 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #23241f; 12 | } 13 | 14 | .hljs, 15 | .hljs-tag, 16 | .hljs-subst { 17 | color: #f8f8f2; 18 | } 19 | 20 | .hljs-strong, 21 | .hljs-emphasis { 22 | color: #a8a8a2; 23 | } 24 | 25 | .hljs-bullet, 26 | .hljs-quote, 27 | .hljs-number, 28 | .hljs-regexp, 29 | .hljs-literal, 30 | .hljs-link { 31 | color: #ae81ff; 32 | } 33 | 34 | .hljs-code, 35 | .hljs-title, 36 | .hljs-section, 37 | .hljs-selector-class { 38 | color: #a6e22e; 39 | } 40 | 41 | .hljs-strong { 42 | font-weight: bold; 43 | } 44 | 45 | .hljs-emphasis { 46 | font-style: italic; 47 | } 48 | 49 | .hljs-keyword, 50 | .hljs-selector-tag, 51 | .hljs-name, 52 | .hljs-attr { 53 | color: #f92672; 54 | } 55 | 56 | .hljs-symbol, 57 | .hljs-attribute { 58 | color: #66d9ef; 59 | } 60 | 61 | .hljs-params, 62 | .hljs-class .hljs-title { 63 | color: #f8f8f2; 64 | } 65 | 66 | .hljs-string, 67 | .hljs-type, 68 | .hljs-built_in, 69 | .hljs-builtin-name, 70 | .hljs-selector-id, 71 | .hljs-selector-attr, 72 | .hljs-selector-pseudo, 73 | .hljs-addition, 74 | .hljs-variable, 75 | .hljs-template-variable { 76 | color: #e6db74; 77 | } 78 | 79 | .hljs-comment, 80 | .hljs-deletion, 81 | .hljs-meta { 82 | color: #75715e; 83 | } 84 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/xy-grid/_layout.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group xy-grid 7 | //// 8 | 9 | /// Sizes child elements so that `$n` number of items appear on each row. 10 | /// 11 | /// @param {Number} $n - Number of elements to display per row. 12 | /// @param {String} $selector ['.cell'] - Selector(s) to use for child elements. 13 | /// @param {Boolean} $gutter-output [true] - Whether or not to output gutters 14 | /// @param {Number|Map} $gutters [$grid-margin-gutters] - Map or single value for gutters. 15 | /// @param {Keyword} $gutter-type [margin] - Type of gutter to output. Accepts `margin` or `padding`. 16 | /// @param {List} $gutter-position [right left] - The position to apply gutters to. Accepts `top`, `bottom`, `left`, `right` in any combination. 17 | /// @param {Boolean} $vertical [false] - Set to true to output vertical (height) styles rather than widths. 18 | @mixin xy-grid-layout( 19 | $n, 20 | $selector: '.cell', 21 | $gutter-output: true, 22 | $gutters: $grid-margin-gutters, 23 | $gutter-type: margin, 24 | $gutter-position: right left, 25 | $breakpoint: $-zf-zero-breakpoint, 26 | $vertical: false 27 | ) { 28 | $size: percentage(1/$n); 29 | 30 | & > #{$selector} { 31 | @include xy-cell($size, $gutter-output, $gutter-type: $gutter-type, $gutter-position: $gutter-position, $vertical: $vertical); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_text-decoration.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-text-decoration 7 | //// 8 | 9 | /// Responsive breakpoints for text decoration classes 10 | /// @type Boolean 11 | $prototype-decoration-breakpoints: $global-prototype-breakpoints !default; 12 | 13 | /// Map containing all the `text-decoration` classes 14 | /// @type Map 15 | $prototype-text-decoration: ( 16 | overline, 17 | underline, 18 | line-through, 19 | ) !default; 20 | 21 | /// Text Decoration, by default coming through a map `$prototype-text-decoration` 22 | /// @param {String} $decoration [] Text Decoration 23 | @mixin text-decoration($decoration) { 24 | text-decoration: $decoration !important; 25 | } 26 | 27 | @mixin foundation-prototype-text-decoration { 28 | @each $decoration in $prototype-text-decoration { 29 | .text-#{$decoration} { 30 | @include text-decoration($decoration); 31 | } 32 | } 33 | 34 | @if ($prototype-decoration-breakpoints) { 35 | // Loop through Responsive Breakpoints 36 | @each $size in $breakpoint-classes { 37 | @include breakpoint($size) { 38 | @each $decoration in $prototype-text-decoration { 39 | @if $size != $-zf-zero-breakpoint { 40 | .#{$size}-text-#{$decoration} { 41 | @include text-decoration($decoration); 42 | } 43 | } 44 | } 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/stylesheets/foundation-includes.scss: -------------------------------------------------------------------------------- 1 | // 2 | //= Foundation 3 | // 4 | 5 | @import 'foundation-settings'; 6 | @import 'foundation'; 7 | 8 | // Include required components to build 9 | 10 | @include foundation-global-styles; 11 | @include foundation-grid; 12 | //@include foundation-flex-grid; 13 | @include foundation-typography; 14 | @include foundation-button; 15 | @include foundation-forms; 16 | @include foundation-visibility-classes; 17 | @include foundation-float-classes; 18 | // @include foundation-accordion; 19 | // @include foundation-accordion-menu; 20 | // @include foundation-badge; 21 | // @include foundation-breadcrumbs; 22 | // @include foundation-button-group; 23 | // @include foundation-callout; 24 | @include foundation-close-button; 25 | // @include foundation-drilldown-menu; 26 | // @include foundation-dropdown; 27 | // @include foundation-dropdown-menu; 28 | // @include foundation-flex-video; 29 | @include foundation-label; 30 | // @include foundation-media-object; 31 | // @include foundation-menu; 32 | // @include foundation-off-canvas; 33 | // @include foundation-orbit; 34 | // @include foundation-pagination; 35 | // @include foundation-progress-bar; 36 | // @include foundation-slider; 37 | // @include foundation-sticky; 38 | // @include foundation-reveal; 39 | // @include foundation-switch; 40 | @include foundation-table; 41 | // @include foundation-tabs; 42 | // @include foundation-thumbnail; 43 | // @include foundation-title-bar; 44 | // @include foundation-tooltip; 45 | // @include foundation-top-bar; 46 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/entries/foundation-plugins.js: -------------------------------------------------------------------------------- 1 | import { Abide } from '../foundation.abide'; 2 | import { Accordion } from '../foundation.accordion'; 3 | import { AccordionMenu } from '../foundation.accordionMenu'; 4 | import { Drilldown } from '../foundation.drilldown'; 5 | import { Dropdown } from '../foundation.dropdown'; 6 | import { DropdownMenu } from '../foundation.dropdownMenu'; 7 | import { Equalizer } from '../foundation.equalizer'; 8 | import { Interchange } from '../foundation.interchange'; 9 | import { Magellan } from '../foundation.magellan'; 10 | import { OffCanvas } from '../foundation.offcanvas'; 11 | import { Orbit } from '../foundation.orbit'; 12 | import { ResponsiveMenu } from '../foundation.responsiveMenu'; 13 | import { ResponsiveToggle } from '../foundation.responsiveToggle'; 14 | import { Reveal } from '../foundation.reveal'; 15 | import { Slider } from '../foundation.slider'; 16 | import { SmoothScroll } from '../foundation.smoothScroll'; 17 | import { Sticky } from '../foundation.sticky'; 18 | import { Tabs } from '../foundation.tabs'; 19 | import { Toggler } from '../foundation.toggler'; 20 | import { Tooltip } from '../foundation.tooltip'; 21 | import { ResponsiveAccordionTabs } from '../foundation.responsiveAccordionTabs'; 22 | 23 | export { 24 | Abide, Accordion, AccordionMenu, Drilldown, Dropdown, DropdownMenu, Equalizer, Interchange, Magellan, OffCanvas, Orbit, ResponsiveMenu, ResponsiveToggle, Reveal, Slider, SmoothScroll, Sticky, Tabs, Toggler, Tooltip, ResponsiveAccordionTabs 25 | } 26 | -------------------------------------------------------------------------------- /app/dociql/index.js: -------------------------------------------------------------------------------- 1 | 2 | const yaml = require('js-yaml') 3 | const url = require('url') 4 | const fs = require("fs") 5 | const fetchSchema = require("./fetch-schema") 6 | const composePaths = require("./compose-paths") 7 | 8 | module.exports = function(specPath, headers, introspectionUrl) { 9 | // read spec file content 10 | const fileContent = fs.readFileSync(specPath, "utf8") 11 | // deserialise 12 | const spec = yaml.safeLoad(fileContent) 13 | // fetch graphQL Schema, if given an introspection url use that over the value in 14 | // the spec 15 | const graphUrl = introspectionUrl ? introspectionUrl : spec.introspection 16 | const {graphQLSchema, jsonSchema} = fetchSchema(graphUrl, headers) 17 | 18 | // parse URL 19 | const parsedUrl = url.parse(graphUrl) 20 | 21 | // generate specification 22 | const swaggerSpec = { 23 | openapi: '3.0.0', 24 | info: spec.info, 25 | servers: spec.servers, 26 | host: parsedUrl.host, 27 | schemes: [ parsedUrl.protocol.slice(0, -1) ], 28 | basePath: parsedUrl.pathname, 29 | externalDocs: spec.externalDocs, 30 | tags: spec.domains.map(_ => ({ 31 | name: _.name, 32 | description: _.description, 33 | externalDocs: _.externalDocs 34 | })), 35 | paths: composePaths(spec.domains, graphQLSchema), 36 | securityDefinitions: spec.securityDefinitions, 37 | definitions: jsonSchema.definitions 38 | } 39 | 40 | return swaggerSpec 41 | } -------------------------------------------------------------------------------- /app/vendor/foundation/_vendor/normalize-scss/sass/normalize/_variables.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Variables 3 | // 4 | // You can override the default values by setting the variables in your Sass 5 | // before importing the normalize-scss library. 6 | 7 | // The font size set on the root html element. 8 | $base-font-size: 16px !default; 9 | 10 | // The base line height determines the basic unit of vertical rhythm. 11 | $base-line-height: 24px !default; 12 | 13 | // The length unit in which to output vertical rhythm values. 14 | // Supported values: px, em, rem. 15 | $base-unit: 'em' !default; 16 | 17 | // The default font family. 18 | $base-font-family: sans-serif !default; 19 | 20 | // The font sizes for h1-h6. 21 | $h1-font-size: 2 * $base-font-size !default; 22 | $h2-font-size: 1.5 * $base-font-size !default; 23 | $h3-font-size: 1.17 * $base-font-size !default; 24 | $h4-font-size: 1 * $base-font-size !default; 25 | $h5-font-size: 0.83 * $base-font-size !default; 26 | $h6-font-size: 0.67 * $base-font-size !default; 27 | 28 | // The amount lists and blockquotes are indented. 29 | $indent-amount: 40px !default; 30 | 31 | // The following variable controls whether normalize-scss will output 32 | // font-sizes, line-heights and block-level top/bottom margins that form a basic 33 | // vertical rhythm on the page, which differs from the original Normalize.css. 34 | // However, changing any of the variables above will cause 35 | // $normalize-vertical-rhythm to be automatically set to true. 36 | $normalize-vertical-rhythm: false !default; 37 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/foundation.util.timer.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import $ from 'jquery'; 4 | 5 | function Timer(elem, options, cb) { 6 | var _this = this, 7 | duration = options.duration,//options is an object for easily adding features later. 8 | nameSpace = Object.keys(elem.data())[0] || 'timer', 9 | remain = -1, 10 | start, 11 | timer; 12 | 13 | this.isPaused = false; 14 | 15 | this.restart = function() { 16 | remain = -1; 17 | clearTimeout(timer); 18 | this.start(); 19 | } 20 | 21 | this.start = function() { 22 | this.isPaused = false; 23 | // if(!elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things. 24 | clearTimeout(timer); 25 | remain = remain <= 0 ? duration : remain; 26 | elem.data('paused', false); 27 | start = Date.now(); 28 | timer = setTimeout(function(){ 29 | if(options.infinite){ 30 | _this.restart();//rerun the timer. 31 | } 32 | if (cb && typeof cb === 'function') { cb(); } 33 | }, remain); 34 | elem.trigger(`timerstart.zf.${nameSpace}`); 35 | } 36 | 37 | this.pause = function() { 38 | this.isPaused = true; 39 | //if(elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things. 40 | clearTimeout(timer); 41 | elem.data('paused', true); 42 | var end = Date.now(); 43 | remain = remain - (end - start); 44 | elem.trigger(`timerpaused.zf.${nameSpace}`); 45 | } 46 | } 47 | 48 | export {Timer}; 49 | -------------------------------------------------------------------------------- /app/views/partials/swagger/definition.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-openapi 4 | 5 | Renders a json.schema inside a panel. 6 | @public 7 | @readonly 8 | --}} 9 |
11 | {{#if title}} 12 | {{#if anchor}} 13 |

14 | {{title}}: 15 | {{type}} 16 | 17 |

18 | {{else}} 19 |

{{title}}

20 | {{/if}} 21 | {{/if}} 22 | 23 |
24 |
25 | {{#if $ref}} 26 | {{>json-schema/reference .}} 27 | {{else}} 28 | {{#if enum}} 29 | {{#if description}} 30 |
31 | {{md description}} 32 |
33 | {{/if}} 34 | {{~>json-schema/datatype}} 35 | {{else}} 36 | {{>json-schema/body}} 37 | {{/if}} 38 | {{/if}} 39 |
40 | 41 | {{! Print examples without whitespace }} 42 | {{#ifneq type 'string'}} 43 |
44 |
45 |
Example
46 | {{>swagger/print-example .}} 47 |
48 |
49 | {{/ifneq}} 50 |
51 |
52 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/grid/_grid.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group grid 7 | //// 8 | 9 | /// The maximum width of a row. 10 | /// @type Number 11 | $grid-row-width: $global-width !default; 12 | 13 | /// The default column count of a grid. Changing this value affects the logic of the grid mixins, and the number of CSS classes output. 14 | /// @type Number 15 | $grid-column-count: 12 !default; 16 | 17 | /// The amount of space between columns at different screen sizes. To use just one size, set the variable to a number instead of a map. 18 | /// @type Map | Length 19 | /// @since 6.1.0 20 | $grid-column-gutter: ( 21 | small: 20px, 22 | medium: 30px, 23 | ) !default; 24 | 25 | /// If `true`, the last column in a row will align to the opposite edge of the row. 26 | /// @type Boolean 27 | $grid-column-align-edge: true !default; 28 | 29 | /// Selector used for an alias of column (with @extend). If `false`, no alias is created. 30 | /// @type String 31 | $grid-column-alias: 'columns' !default; 32 | 33 | /// The highest number of `.x-up` classes available when using the block grid CSS. 34 | /// @type Number 35 | $block-grid-max: 8 !default; 36 | 37 | // Internal value to store the end column float direction 38 | $-zf-end-float: if($grid-column-align-edge, $global-right, $global-left); 39 | 40 | @import 'row'; 41 | @import 'column'; 42 | @import 'size'; 43 | @import 'position'; 44 | @import 'gutter'; 45 | @import 'classes'; 46 | @import 'layout'; 47 | 48 | @import 'flex-grid'; 49 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_text-transformation.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-text-transformation 7 | //// 8 | 9 | /// Responsive breakpoints for text transformation classes 10 | /// @type Boolean 11 | $prototype-transformation-breakpoints: $global-prototype-breakpoints !default; 12 | 13 | /// Map containing all the `text-transformation` classes 14 | /// @type Map 15 | $prototype-text-transformation: ( 16 | lowercase, 17 | uppercase, 18 | capitalize 19 | ) !default; 20 | 21 | /// Text Transformation, by default coming through a map `$prototype-text-transformation` 22 | /// @param {String} $transformation [] Text Transformation 23 | @mixin text-transform($transformation) { 24 | text-transform: $transformation !important; 25 | } 26 | 27 | @mixin foundation-prototype-text-transformation { 28 | @each $transformation in $prototype-text-transformation { 29 | .text-#{$transformation} { 30 | @include text-transform($transformation); 31 | } 32 | } 33 | 34 | @if ($prototype-transformation-breakpoints) { 35 | // Loop through Responsive Breakpoints 36 | @each $size in $breakpoint-classes { 37 | @include breakpoint($size) { 38 | @each $transformation in $prototype-text-transformation { 39 | @if $size != $-zf-zero-breakpoint { 40 | .#{$size}-text-#{$transformation} { 41 | @include text-transform($transformation); 42 | } 43 | } 44 | } 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/views/partials/swagger/deprecated/responses.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Renders the responses section of an operation 3 | @param {Response[]} responses a list of Swagger-Response definitions 4 | @param {string[]} produces a list of response content types produced by the operation 5 | @api public 6 | --}} 7 | 8 | {{#if responses}} 9 |
10 | {{#if produces}} 11 |

{{>swagger/list-of-labels values=produces}}

12 | {{else if @root.produces}} 13 |

Uses default content-types: 14 | {{>swagger/list-of-labels values=@root.produces}} 15 |

16 | {{/if}} 17 | 18 |
19 | {{#each responses}} 20 |
21 | {{! Use response-code and http-name as text}} 22 | {{@key}} {{httpResponseCode @key}} 23 | {{#if $ref}} 24 | {{$ref}} 25 | {{/if}} 26 |
27 |
28 | {{#if $ref}} 29 | {{>swagger/response response=(json-schema-resolve-ref $ref)}} 30 | {{else}} 31 | {{>swagger/response response=.}} 32 | {{/if}} 33 |
34 | {{/each}} 35 |
36 |
37 | {{/if}} 38 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/xy-grid/_collapse.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group xy-grid 7 | //// 8 | 9 | /// Collapses the grid a cells within it. 10 | /// 11 | /// @param {String} $selector [.cell] - The child element to remove the gutter from. 12 | /// @param {Keyword} $gutter-type [margin] - The type of gutter to remove. 13 | /// @param {List} $gutter-position [right left] - The positions to remove gutters from. Accepts `top`, `bottom`, `left`, `right` in any combination. 14 | @mixin xy-grid-collapse( 15 | $selector: '.cell', 16 | $gutter-type: margin, 17 | $gutter-position: right left 18 | ) { 19 | // First, lets negate any margins on the top level 20 | @if ($gutter-type == 'margin') { 21 | 22 | @each $value in $gutter-position { 23 | margin-#{$value}: 0; 24 | } 25 | 26 | > #{$selector} { 27 | @each $value in $gutter-position { 28 | margin-#{$value}: 0; 29 | } 30 | } 31 | 32 | // Output new widths to not include gutters 33 | @each $bp in $breakpoint-classes { 34 | @for $i from 1 through $grid-columns { 35 | // Sizing (percentage) 36 | > .#{$bp}-#{$i} { 37 | @include xy-cell-static($i, $gutter-output: false, $gutter-type: padding); 38 | } 39 | } 40 | } 41 | } 42 | @else { 43 | 44 | @each $value in $gutter-position { 45 | margin-#{$value}: 0; 46 | } 47 | 48 | > #{$selector} { 49 | @each $value in $gutter-position { 50 | padding-#{$value}: 0; 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/views/partials/swagger/request-body.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-openapi 4 | 5 | Renders the request-body section of an operation. 6 | @param {string[]} consumes a list of request content type eligible for this operation. 7 | @param {Parameter} body the param-Object of the `body`-parameter 8 | @api public 9 | --}} 10 | 11 |
12 | {{!-- 13 | {{#if consumes}} 14 |

{{>swagger/list-of-labels values=consumes}}

15 | {{else if @root.consumes}} 16 |

17 | 18 | {{>swagger/list-of-labels values=@root.consumes}} 19 |

20 | {{/if}} 21 | --}} 22 | {{#if body}} 23 | {{#with body}} 24 | {{#if schema.$ref}} 25 |
26 |
27 |
28 | {{>json-schema/reference schema}} 29 |
30 |
31 |
32 | 33 | {{md description}} 34 | 35 |
36 |
37 | {{else if schema.type}} 38 | {{#if description}} 39 | {{md description}} 40 | {{else if schema.description}} 41 | {{md schema.description}} 42 | {{/if}} 43 | {{!-- {{>json-schema/body schema}} --}} 44 | {{/if}} 45 | {{/with}} 46 | {{/if}} 47 |
48 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/components/_progress-bar.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | /// Adds styles for a progress bar container. 6 | @mixin progress-container { 7 | height: $progress-height; 8 | margin-bottom: $progress-margin-bottom; 9 | border-radius: $progress-radius; 10 | background-color: $progress-background; 11 | } 12 | 13 | /// Adds styles for the inner meter of a progress bar. 14 | @mixin progress-meter { 15 | position: relative; 16 | display: block; 17 | width: 0%; 18 | height: 100%; 19 | background-color: $progress-meter-background; 20 | 21 | @if has-value($progress-radius) { 22 | border-radius: $global-radius; 23 | } 24 | } 25 | 26 | /// Adds styles for text in the progress meter. 27 | @mixin progress-meter-text { 28 | @include absolute-center; 29 | position: absolute; 30 | margin: 0; 31 | font-size: 0.75rem; 32 | font-weight: bold; 33 | color: $white; 34 | white-space: nowrap; 35 | 36 | @if has-value($progress-radius) { 37 | border-radius: $progress-radius; 38 | } 39 | } 40 | 41 | @mixin foundation-progress-bar { 42 | // Progress bar 43 | .progress { 44 | @include progress-container; 45 | 46 | @each $name, $color in $foundation-palette { 47 | &.#{$name} { 48 | .progress-meter { 49 | background-color: $color; 50 | } 51 | } 52 | } 53 | } 54 | 55 | // Inner meter 56 | .progress-meter { 57 | @include progress-meter; 58 | } 59 | 60 | // Inner meter text 61 | .progress-meter-text { 62 | @include progress-meter-text; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_rounded.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-rounded 7 | //// 8 | 9 | /// Responsive breakpoints for rounded utility. 10 | /// @type Boolean 11 | $prototype-rounded-breakpoints: $global-prototype-breakpoints !default; 12 | 13 | /// Default value for `prototype-border-radius` 14 | /// @type Number 15 | $prototype-border-radius: rem-calc(3) !default; 16 | 17 | /// Rounded utility (all corners): Adds radius corners (all corners) to an element by default. 18 | /// @param {Number} $radius [$prototype-border-radius] Border radius (all corners) 19 | @mixin border-radius( 20 | $radius: $prototype-border-radius 21 | ) { 22 | border-radius: $radius; 23 | } 24 | 25 | /// Rounded square utility or rectangle utility (all corners): Rounds all corners to an element by default to make a pill shape. 26 | @mixin border-rounded { 27 | border-radius: 5000px !important; 28 | } 29 | 30 | @mixin foundation-prototype-rounded { 31 | .rounded { 32 | @include border-rounded; 33 | } 34 | 35 | .radius { 36 | @include border-radius; 37 | } 38 | 39 | @if ($prototype-rounded-breakpoints) { 40 | // Loop through Responsive Breakpoints 41 | @each $size in $breakpoint-classes { 42 | @include breakpoint($size) { 43 | @if $size != $-zf-zero-breakpoint { 44 | .#{$size}-rounded { 45 | @include border-rounded; 46 | } 47 | .#{$size}-radius { 48 | @include rounded-radius; 49 | } 50 | } 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/xy-grid/_xy-grid.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group xy-grid 7 | //// 8 | 9 | /// Enables the XY grid. 10 | /// @type Boolean 11 | $xy-grid: true !default; 12 | 13 | /// The maximum width of a grid container. 14 | /// @type Number 15 | $grid-container: $global-width !default; 16 | 17 | /// The number of columns used in the grid. 18 | /// @type Number 19 | $grid-columns: 12 !default; 20 | 21 | /// The amount of margin between cells at different screen sizes when using the margin grid. To use just one size, set the variable to a number instead of a map. 22 | /// @type Map | Length 23 | $grid-margin-gutters: ( 24 | small: 20px, 25 | medium: 30px 26 | ) !default; 27 | 28 | /// The amount of padding in cells at different screen sizes when using the padding grid. To use just one size, set the variable to a number instead of a map. 29 | /// @type Map | Length 30 | $grid-padding-gutters: $grid-margin-gutters !default; 31 | 32 | /// The amount of padding to use when padding the grid-container. 33 | /// @type Map | Length 34 | $grid-container-padding: $grid-padding-gutters !default; 35 | 36 | 37 | /// The maximum width to apply padding to a grid container 38 | /// @type Number 39 | $grid-container-max: $global-width !default; 40 | 41 | /// The maximum number of cells in a block grid. 42 | /// @type Number 43 | $block-grid-max: 8 !default; 44 | 45 | @import 'gutters'; 46 | @import 'grid'; 47 | @import 'cell'; 48 | @import 'frame'; 49 | @import 'position'; 50 | @import 'layout'; 51 | @import 'collapse'; 52 | @import 'classes'; 53 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/components/_badge.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group badge 7 | //// 8 | 9 | /// Default background color for badges. 10 | /// @type Color 11 | $badge-background: $primary-color !default; 12 | 13 | /// Default text color for badges. 14 | /// @type Color 15 | $badge-color: $white !default; 16 | 17 | /// Alternate text color for badges. 18 | /// @type Color 19 | $badge-color-alt: $black !default; 20 | 21 | /// Coloring classes. A map of classes to output in your CSS, like `.secondary`, `.success`, and so on. 22 | /// @type Map 23 | $badge-palette: $foundation-palette !default; 24 | 25 | /// Default padding inside badges. 26 | /// @type Number 27 | $badge-padding: 0.3em !default; 28 | 29 | /// Minimum width of a badge. 30 | /// @type Number 31 | $badge-minwidth: 2.1em !default; 32 | 33 | /// Default font size for badges. 34 | /// @type Number 35 | $badge-font-size: 0.6rem !default; 36 | 37 | /// Generates the base styles for a badge. 38 | @mixin badge { 39 | display: inline-block; 40 | min-width: $badge-minwidth; 41 | padding: $badge-padding; 42 | 43 | border-radius: 50%; 44 | 45 | font-size: $badge-font-size; 46 | text-align: center; 47 | } 48 | 49 | @mixin foundation-badge { 50 | .badge { 51 | @include badge; 52 | 53 | background: $badge-background; 54 | color: $badge-color; 55 | 56 | @each $name, $color in $badge-palette { 57 | &.#{$name} { 58 | background: $color; 59 | color: color-pick-contrast($color, ($badge-color, $badge-color-alt)); 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/foundation.util.core.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | import $ from 'jquery'; 4 | 5 | // Core Foundation Utilities, utilized in a number of places. 6 | 7 | /** 8 | * Returns a boolean for RTL support 9 | */ 10 | function rtl() { 11 | return $('html').attr('dir') === 'rtl'; 12 | } 13 | 14 | /** 15 | * returns a random base-36 uid with namespacing 16 | * @function 17 | * @param {Number} length - number of random base-36 digits desired. Increase for more random strings. 18 | * @param {String} namespace - name of plugin to be incorporated in uid, optional. 19 | * @default {String} '' - if no plugin name is provided, nothing is appended to the uid. 20 | * @returns {String} - unique id 21 | */ 22 | function GetYoDigits(length, namespace){ 23 | length = length || 6; 24 | return Math.round((Math.pow(36, length + 1) - Math.random() * Math.pow(36, length))).toString(36).slice(1) + (namespace ? `-${namespace}` : ''); 25 | } 26 | 27 | function transitionend($elem){ 28 | var transitions = { 29 | 'transition': 'transitionend', 30 | 'WebkitTransition': 'webkitTransitionEnd', 31 | 'MozTransition': 'transitionend', 32 | 'OTransition': 'otransitionend' 33 | }; 34 | var elem = document.createElement('div'), 35 | end; 36 | 37 | for (var t in transitions){ 38 | if (typeof elem.style[t] !== 'undefined'){ 39 | end = transitions[t]; 40 | } 41 | } 42 | if(end){ 43 | return end; 44 | }else{ 45 | end = setTimeout(function(){ 46 | $elem.triggerHandler('transitionend', [$elem]); 47 | }, 1); 48 | return 'transitionend'; 49 | } 50 | } 51 | 52 | export {rtl, GetYoDigits, transitionend}; 53 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/components/_label.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group label 7 | //// 8 | 9 | /// Default background color for labels. 10 | /// @type Color 11 | $label-background: $primary-color !default; 12 | 13 | /// Default text color for labels. 14 | /// @type Color 15 | $label-color: $white !default; 16 | 17 | /// Alternate text color for labels. 18 | /// @type Color 19 | $label-color-alt: $black !default; 20 | 21 | /// Coloring classes. A map of classes to output in your CSS, like `.secondary`, `.success`, and so on. 22 | /// @type Map 23 | $label-palette: $foundation-palette !default; 24 | 25 | /// Default font size for labels. 26 | /// @type Number 27 | $label-font-size: 0.8rem !default; 28 | 29 | /// Default padding inside labels. 30 | /// @type Number 31 | $label-padding: 0.33333rem 0.5rem !default; 32 | 33 | /// Default radius of labels. 34 | /// @type Number 35 | $label-radius: $global-radius !default; 36 | 37 | /// Generates base styles for a label. 38 | @mixin label { 39 | display: inline-block; 40 | padding: $label-padding; 41 | 42 | border-radius: $label-radius; 43 | 44 | font-size: $label-font-size; 45 | line-height: 1; 46 | white-space: nowrap; 47 | cursor: default; 48 | } 49 | 50 | @mixin foundation-label { 51 | .label { 52 | @include label; 53 | 54 | background: $label-background; 55 | color: $label-color; 56 | 57 | @each $name, $color in $label-palette { 58 | &.#{$name} { 59 | background: $color; 60 | color: color-pick-contrast($color, ($label-color, $label-color-alt)); 61 | } 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/xy-grid/_gutters.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group xy-grid 7 | //// 8 | 9 | /// Create gutters for a cell/container. 10 | /// 11 | /// @param {Number|Map} $gutters [$grid-margin-gutters] - Map or single value for gutters. 12 | /// @param {Keyword} $gutter-type [margin] - Type of gutter to output. Accepts either margin or padding. 13 | /// @param {List} $gutter-position [right left] - The position to apply gutters to. Accepts `top`, `bottom`, `left`, `right` in any combination. 14 | /// @param {Boolean} $negative [false] - Whether to apply the gutter as a negative value. Commonly used for nested grids. 15 | @mixin xy-gutters( 16 | $gutters: $grid-margin-gutters, 17 | $gutter-type: margin, 18 | $gutter-position: right left, 19 | $negative: false 20 | ) { 21 | $operator: if($negative, '-', ''); 22 | 23 | // If we have declared negative gutters, force type to `margin. 24 | $gutter-type: if($negative, 'margin', $gutter-type); 25 | 26 | // Output our margin gutters. 27 | @if (type-of($gutters) == 'map') { 28 | @include -zf-breakpoint-value(auto, $gutters) { 29 | $gutter: rem-calc($-zf-bp-value) / 2; 30 | 31 | // Loop through each gutter position 32 | @each $value in $gutter-position { 33 | #{$gutter-type}-#{$value}: #{$operator}$gutter; 34 | } 35 | } 36 | } 37 | @elseif (type-of($gutters) == 'number') { 38 | $gutter: rem-calc($gutters) / 2; 39 | 40 | // Loop through each gutter position 41 | @each $value in $gutter-position { 42 | #{$gutter-type}-#{$value}: #{$operator}$gutter; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/components/_thumbnail.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group thumbnail 7 | //// 8 | 9 | /// Border around thumbnail images. 10 | /// @type Border 11 | $thumbnail-border: solid 4px $white !default; 12 | 13 | /// Bottom margin for thumbnail images. 14 | /// @type Length 15 | $thumbnail-margin-bottom: $global-margin !default; 16 | 17 | /// Box shadow under thumbnail images. 18 | /// @type Shadow 19 | $thumbnail-shadow: 0 0 0 1px rgba($black, 0.2) !default; 20 | 21 | /// Box shadow under thumbnail images. 22 | /// @type Shadow 23 | $thumbnail-shadow-hover: 0 0 6px 1px rgba($primary-color, 0.5) !default; 24 | 25 | /// Transition proprties for thumbnail images. 26 | /// @type Transition 27 | $thumbnail-transition: box-shadow 200ms ease-out !default; 28 | 29 | /// Default radius for thumbnail images. 30 | /// @type Number 31 | $thumbnail-radius: $global-radius !default; 32 | 33 | /// Adds thumbnail styles to an element. 34 | @mixin thumbnail { 35 | display: inline-block; 36 | max-width: 100%; 37 | margin-bottom: $thumbnail-margin-bottom; 38 | 39 | border: $thumbnail-border; 40 | border-radius: $thumbnail-radius; 41 | box-shadow: $thumbnail-shadow; 42 | 43 | line-height: 0; 44 | } 45 | 46 | @mixin thumbnail-link { 47 | transition: $thumbnail-transition; 48 | 49 | &:hover, 50 | &:focus { 51 | box-shadow: $thumbnail-shadow-hover; 52 | } 53 | 54 | image { 55 | box-shadow: none; 56 | } 57 | } 58 | 59 | @mixin foundation-thumbnail { 60 | .thumbnail { 61 | @include thumbnail; 62 | } 63 | 64 | a.thumbnail { 65 | @include thumbnail-link; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /app/javascripts/main.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | // $(document).foundation(); 3 | 4 | var $sidebar = $('#sidebar'); 5 | if ($sidebar.length) { 6 | var $docs = $('#docs'); 7 | var $nav = $sidebar.find('nav'); 8 | 9 | // 10 | // Setup sidebar navigation 11 | var traverse = new Traverse($nav, { 12 | threshold: 10, 13 | barOffset: $sidebar.position().top 14 | }); 15 | 16 | $nav.on('update.traverse', function(event, element) { 17 | $nav.find('section').removeClass('expand'); 18 | var $section = element.parents('section:first'); 19 | if ($section.length) { 20 | $section.addClass('expand'); 21 | } 22 | }); 23 | 24 | // 25 | // Bind the drawer layout 26 | var $drawerLayout = $('.drawer-layout'), 27 | $drawer = $drawerLayout.find('.drawer'), 28 | closeDrawer = function() { 29 | $drawer.removeClass('slide-right slide-left'); 30 | $drawer.find('.drawer-overlay').remove(); 31 | $drawerLayout.removeClass('drawer-open drawer-slide-left-large drawer-slide-right-large'); 32 | return false; 33 | }; 34 | 35 | // Drawer open buttons 36 | $drawerLayout.find('[data-drawer-slide]').click(function(e) { 37 | var $this = $(this), 38 | direction = $this.data('drawer-slide'); 39 | $drawerLayout.addClass('drawer-open'); 40 | $drawer.addClass('slide-' + direction); 41 | 42 | var $overlay = $('') 43 | $drawer.append($overlay); 44 | $overlay.click(closeDrawer); 45 | 46 | return false; 47 | }); 48 | 49 | // Drawer close buttons 50 | $drawerLayout.find('[data-drawer-close]').click(closeDrawer); 51 | } 52 | }); 53 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_bordered.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-bordered 7 | //// 8 | 9 | /// Responsive breakpoints for bordered utility. 10 | /// @type Boolean 11 | $prototype-bordered-breakpoints: $global-prototype-breakpoints !default; 12 | 13 | /// Default value for `prototype-border-width` 14 | /// @type Number 15 | $prototype-border-width: rem-calc(1) !default; 16 | 17 | /// Default value for `prototype-border-type` 18 | /// @type String 19 | $prototype-border-type: solid !default; 20 | 21 | /// Default value for `prototype-border-color` defaulted to `medium-gray` 22 | /// @type Color 23 | $prototype-border-color: $medium-gray !default; 24 | 25 | /// Bordered Utility: Adds a light border to an element by default. 26 | /// @param {Number} $width [$prototype-border-width] Width of the border 27 | /// @param {String} $type [$prototype-border-type] Type of the border 28 | /// @param {Color} $color [$prototype-border-color] Color of the border 29 | @mixin bordered( 30 | $width: $prototype-border-width, 31 | $type: $prototype-border-type, 32 | $color: $prototype-border-color 33 | ) { 34 | border: $width $type $color; 35 | } 36 | 37 | @mixin foundation-prototype-bordered { 38 | .bordered { 39 | @include bordered; 40 | } 41 | 42 | @if ($prototype-bordered-breakpoints) { 43 | // Loop through Responsive Breakpoints 44 | @each $size in $breakpoint-classes { 45 | @include breakpoint($size) { 46 | @if $size != $-zf-zero-breakpoint { 47 | .#{$size}-bordered { 48 | @include bordered; 49 | } 50 | } 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/dociql/graphql-hl.js: -------------------------------------------------------------------------------- 1 | module.exports = function (e) { 2 | 3 | var VARIABLES = { 4 | className: 'code', 5 | begin: '\\$', 6 | end: '\\w+', 7 | excludeEnd: false 8 | } 9 | 10 | var TYPES = { 11 | className: "type", 12 | begin: "[^\\w][A-Z][a-z]", 13 | end: "[!\\W]", 14 | excludeEnd: false 15 | }; 16 | 17 | var FRAGMENT = { 18 | className: "type", 19 | begin: /\.\.\./, 20 | end: /Fragment\n/, 21 | excludeEnd: false 22 | }; 23 | 24 | var ARGS = { 25 | className: "tag", 26 | begin: /\(/, 27 | end: /\)/, 28 | excludeBegin: false, 29 | excludeEnd: false, 30 | contains: [ 31 | TYPES, 32 | e.NUMBER_MODE, 33 | VARIABLES 34 | ] 35 | } 36 | 37 | var LITERALS = { 38 | keyword: "query mutation subscription|10 input schema directive interface union scalar fragment|10 enum on ...", 39 | literal: 'true false null' 40 | }; 41 | 42 | var FIELD = { 43 | className: 'symbol', 44 | begin: /\w/, 45 | end: /\n/, 46 | keywords: LITERALS, 47 | excludeEnd: true, 48 | } 49 | 50 | var QUERY = { 51 | className: "tag", 52 | begin: /{/, 53 | end: /}/, 54 | contains: [FIELD, FRAGMENT], 55 | excludeBegin: false, 56 | excludeEnd: false, 57 | relevance: 0, 58 | illegal: '\\S' 59 | }; 60 | 61 | FIELD.contains = [ARGS, QUERY] 62 | 63 | return { 64 | aliases: ["gql"], 65 | keywords: LITERALS, 66 | contains: [QUERY, FIELD], 67 | illegal: /([;<']|BEGIN)/ 68 | }; 69 | } -------------------------------------------------------------------------------- /app/vendor/foundation/scss/xy-grid/_frame.scss: -------------------------------------------------------------------------------- 1 | /// Modifies a grid to give it "frame" behavior (no overflow, no wrap, stretch behavior) 2 | /// 3 | /// @param {Boolean} $vertical [false] - Is grid vertical or horizontal. Should match grid. 4 | /// @param {Boolean} $nested [false] - Is grid nested or not. If nested is true this sets the frame to 100% height, otherwise will be 100vh. 5 | @mixin xy-grid-frame( 6 | $vertical: false, 7 | $nested: false 8 | ) { 9 | 10 | @if $vertical == true { 11 | height: if($nested == true, 100%, 100vh); 12 | } @else { 13 | width: if($nested == true, 100%, 100vw); 14 | } 15 | 16 | overflow: hidden; 17 | position: relative; 18 | flex-wrap: nowrap; 19 | align-items: stretch; 20 | } 21 | 22 | /// Modifies a cell to give it "block" behavior (overflow auto, inertial scrolling) 23 | /// 24 | /// @param {Boolean} $vertical [false] - Is grid vertical or horizontal. Should match grid. 25 | @mixin xy-cell-block( 26 | $vertical: false 27 | ) { 28 | $property: if($vertical == true, 'overflow-y', 'overflow-x'); 29 | 30 | @if $vertical == true { 31 | overflow-y: auto; 32 | max-height: 100%; 33 | } @else { 34 | overflow-x: auto; 35 | max-width: 100%; 36 | } 37 | 38 | -webkit-overflow-scrolling: touch; 39 | -ms-overflow-stype: -ms-autohiding-scrollbar; 40 | } 41 | 42 | /// Container for inside a grid frame containing multiple blocks. Typically used 43 | /// as a modifier for a `.cell` to allow the cell to pass along flex sizing 44 | /// constraints / from parents to children. 45 | @mixin xy-cell-block-container() { 46 | display: flex; 47 | flex-direction: column; 48 | max-height: 100%; 49 | 50 | > .grid-x { 51 | max-height: 100%; 52 | flex-wrap: nowrap; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/xy-grid/_grid.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group xy-grid 7 | //// 8 | 9 | /// Creates a max width container, designed to house your grid content. 10 | /// 11 | /// @param {Number} $width [$grid-container] - a width to limit the container to. 12 | @mixin xy-grid-container( 13 | $width: $grid-container 14 | ) { 15 | max-width: $width; 16 | margin: 0 auto; 17 | } 18 | 19 | /// Add padding to your container, up to a particular size 20 | /// 21 | /// @param {Number} $width [$grid-container] - a width to limit the container to. 22 | @mixin xy-grid-container-padding( 23 | $padding: $grid-container-padding, 24 | $max: $grid-container-max 25 | ) { 26 | // Output our margin gutters. 27 | @if (type-of($padding) == 'map') { 28 | @include -zf-breakpoint-value(auto, $padding) { 29 | padding-left: rem-calc($-zf-bp-value / 2); 30 | padding-right: rem-calc($-zf-bp-value / 2); 31 | } 32 | } 33 | @elseif (type-of($padding) == 'number') { 34 | padding-left: rem-calc($padding) / 2; 35 | padding-right: rem-calc($padding) / 2; 36 | } 37 | @include breakpoint($max) { 38 | padding-left: 0; 39 | padding-right: 0; 40 | } 41 | } 42 | 43 | /// Creates a container for your flex cells. 44 | /// 45 | /// @param {Keyword} $direction [horizontal] - Either horizontal or vertical direction of cells within. 46 | /// @param {Boolean} $wrap [true] - If the cells within should wrap or not. 47 | @mixin xy-grid( 48 | $direction: horizontal, 49 | $wrap: true 50 | ) { 51 | $direction: if($direction == 'horizontal', row, column); 52 | $wrap: if($wrap, wrap, nowrap); 53 | 54 | display: flex; 55 | flex-flow: $direction $wrap; 56 | } 57 | -------------------------------------------------------------------------------- /app/views/partials/swagger/introduction.hbs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | {{md info.description}} 5 |
6 |
7 |
8 | {{#if servers}} 9 |
API Endpoints
10 | 11 |
{{swaggerEndpoint}}
12 | 13 | {{/if}} 14 | 15 | {{#if info.termsOfService}} 16 |
Terms of Service: 17 | {{info.termsOfService}} 18 |
19 | {{/if}} 20 | 21 | {{#if info.contact}} 22 | {{#if info.contact.email}} 23 |
Contact: 24 | {{info.contact.email}} 25 |
26 | {{/if}} 27 | {{/if}} 28 | 29 | {{#if consumes}} 30 |
Request Content-Types: 31 | {{#each consumes}}{{.}}{{#unless @last}}, {{/unless}}{{/each}} 32 |
33 | {{/if}} 34 | 35 | {{#if produces}} 36 |
Response Content-Types: 37 | {{#each produces}}{{.}}{{#unless @last}}, {{/unless}}{{/each}} 38 |
39 | {{/if}} 40 | 41 | {{!-- {{#if schemes}} 42 |
Schemes: 43 | {{#each schemes}}{{.}}{{#unless @last}}, {{/unless}}{{/each}} 44 |
45 | {{/if}} --}} 46 | 47 | {{#if info.version}} 48 |
Version: 49 | {{info.version}} 50 |
51 | {{/if}} 52 |
53 |
54 |
55 |
56 | -------------------------------------------------------------------------------- /app/views/partials/json-schema/properties.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-json-schema 4 | 5 | Renders json-schema object properties. 6 | --}} 7 | {{#if properties}} 8 |
9 |
10 | {{#each properties}} 11 |
12 | {{!Single property, default type is "object"}} 13 | {{@key}}: 14 | {{>json-schema/datatype}} 15 | {{!>json-schema/datatype discriminator=(equal @key ../discriminator)}} 16 | {{#ifcontains ../required @key}} 17 | 18 | {{/ifcontains}} 19 | {{#ifeq @key ../discriminator}} 20 | 21 | {{/ifeq}} 22 | {{#if readOnly}} 23 | 24 | {{/if}} 25 |
26 | {{#if description}} 27 |
28 | {{md description}} 29 | {{!-- Show details of nested property schema 30 |
31 | {{>json-schema/body $ref="" description=""}} 32 |
33 | --}} 34 |
35 | {{/if}} 36 | {{#if properties}} 37 |
38 | {{~>json-schema/body $ref="" description=""}} 39 |
40 | {{/if}} 41 | {{!-- {{#if items}} 42 |
43 | {{~>json-schema/body $ref="" description=""}} 44 |
45 | {{/if}} --}} 46 | {{/each}} 47 |
48 |
49 | {{/if}} 50 | -------------------------------------------------------------------------------- /app/helpers/eachSorted.js: -------------------------------------------------------------------------------- 1 | var Handlebars = require('handlebars') 2 | 3 | /** 4 | * This block-helper can be used to iterate objects sorted by key. It behaves like the built-in 5 | * `{{#each ...}}`-helper except that it can only be used for objects and the output is in a 6 | * deterministic order (i.e. sorted). 7 | * 8 | * Example template: 9 | * 10 | * ```handlebars 11 | * {{#eachSorted obj}} 12 | * {{@index}} of {{@length}}: {{@key}}={{.}} 13 | * {{/eachSorted}} 14 | * ``` 15 | * 16 | * With the data `{ b: 'another one', a: 'first' }`, ignoring newlines and indents, this will output 17 | * 18 | * ```text 19 | * 1 of 2: a=first 20 | * 2 of 2: b=another one 21 | * ``` 22 | * 23 | * The helper will set the following @-values according to the Handlebars documentation: 24 | * `@first`, `@index`, `@key`, `@last`, `@length` 25 | * @name eachSorted 26 | * @returns {string} 27 | * @api public 28 | */ 29 | module.exports = function(context, options) { 30 | var ret = ""; 31 | var data; 32 | if (typeof context !== "object") { 33 | return ret; 34 | } 35 | var keys = Object.keys(context) 36 | keys.sort(function(a,b) { 37 | // http://stackoverflow.com/questions/8996963/how-to-perform-case-insensitive-sorting-in-javascript 38 | a = String(a).toLowerCase() 39 | b = String(b).toLowerCase() 40 | if (a == b) return 0; 41 | if (a > b) return 1; 42 | return -1; 43 | }).forEach(function(key, index) { 44 | if (options.data) { 45 | data = Handlebars.createFrame(options.data || {}) 46 | data.index = index; 47 | data.key = key; 48 | data.length = keys.length; 49 | data.first = index === 0; 50 | data.last = index === keys.length - 1; 51 | } 52 | ret = ret + options.fn(context[key], {data: data}) 53 | }) 54 | return ret; 55 | }; 56 | -------------------------------------------------------------------------------- /app/views/partials/swagger/deprecated/response.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Renders details about a single response 3 | @param {Response} response a swagger response-object 4 | --}} 5 | {{! If global is set, attach an id to the table row }} 6 |
7 |
8 | {{md response.description}} 9 |
10 |
11 |
12 | 13 |
{{>swagger/model model=response.schema}}
14 | 15 | {{#each response.examples}} 16 |
17 |
Example for {{@key}}
18 | {{json .}} 19 |
20 | {{/each}} 21 | 22 | {{#if response.headers}} 23 |
24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | {{#each response.headers}} 35 | {{#if $ref}} 36 | {{> swagger/responseHeaderRow header=(json-schema-resolve-ref $ref) name=@key}} 37 | {{else}} 38 | {{> swagger/responseHeaderRow header=. name=@key}} 39 | {{/if}} 40 | {{/each}} 41 | 42 |
43 |
44 |
45 | {{/if}} 46 |
47 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/foundation.plugin.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import $ from 'jquery'; 4 | import { GetYoDigits } from './foundation.util.core'; 5 | 6 | // Abstract class for providing lifecycle hooks. Expect plugins to define AT LEAST 7 | // {function} _setup (replaces previous constructor), 8 | // {function} _destroy (replaces previous destroy) 9 | class Plugin { 10 | 11 | constructor(element, options) { 12 | this._setup(element, options); 13 | var pluginName = getPluginName(this); 14 | this.uuid = GetYoDigits(6, pluginName); 15 | 16 | if(!this.$element.attr(`data-${pluginName}`)){ this.$element.attr(`data-${pluginName}`, this.uuid); } 17 | if(!this.$element.data('zfPlugin')){ this.$element.data('zfPlugin', this); } 18 | /** 19 | * Fires when the plugin has initialized. 20 | * @event Plugin#init 21 | */ 22 | this.$element.trigger(`init.zf.${pluginName}`); 23 | } 24 | 25 | destroy() { 26 | this._destroy(); 27 | var pluginName = getPluginName(this); 28 | this.$element.removeAttr(`data-${pluginName}`).removeData('zfPlugin') 29 | /** 30 | * Fires when the plugin has been destroyed. 31 | * @event Plugin#destroyed 32 | */ 33 | .trigger(`destroyed.zf.${pluginName}`); 34 | for(var prop in this){ 35 | this[prop] = null;//clean up script to prep for garbage collection. 36 | } 37 | } 38 | } 39 | 40 | // Convert PascalCase to kebab-case 41 | // Thank you: http://stackoverflow.com/a/8955580 42 | function hyphenate(str) { 43 | return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); 44 | } 45 | 46 | function getPluginName(obj) { 47 | if(typeof(obj.constructor.name) !== 'undefined') { 48 | return hyphenate(obj.constructor.name); 49 | } else { 50 | return hyphenate(obj.className); 51 | } 52 | } 53 | 54 | export {Plugin}; 55 | -------------------------------------------------------------------------------- /app/stylesheets/_drawer.scss: -------------------------------------------------------------------------------- 1 | // 2 | //= Drawer layout 3 | // 4 | 5 | .drawer-layout { 6 | .drawer { 7 | box-shadow: 0 0 10px rgba($black, 0.5); 8 | transition: transform $default-transition-length ease; 9 | backface-visibility: hidden; 10 | 11 | &.slide-left { 12 | transform: translateX(-250px); 13 | } 14 | &.slide-right { 15 | transform: translateX(250px); 16 | } 17 | .drawer-overlay { 18 | position: absolute; 19 | top: 0; 20 | left: 0; 21 | right: 0; 22 | bottom: 0; 23 | background-color: rgba($white, 0.25); 24 | } 25 | 26 | @include breakpoint(large) { 27 | &.slide-left { 28 | transform: none; 29 | margin-left: -250px; 30 | } 31 | &.slide-right { 32 | transform: none; 33 | margin-left: 250px; 34 | } 35 | .drawer-overlay { 36 | display: none; 37 | } 38 | } 39 | } 40 | 41 | @include breakpoint(large) { 42 | &.drawer-slide-left-large { 43 | .drawer { 44 | margin-left: -250px; 45 | } 46 | .floating-menu-icon { 47 | opacity: 0; 48 | } 49 | } 50 | &.drawer-slide-right-large { 51 | .drawer { 52 | margin-left: 250px; 53 | } 54 | .floating-menu-icon { 55 | opacity: 0; 56 | } 57 | } 58 | } 59 | 60 | &.drawer-open { 61 | .floating-menu-icon { 62 | opacity: 0; 63 | } 64 | } 65 | 66 | .floating-menu-icon { 67 | position: fixed; 68 | top: 0.75rem; 69 | right: 0.75rem; 70 | background-color: rgba($black, 0.75); 71 | padding: 0.65rem; 72 | z-index: 1; 73 | border-radius: 5px; 74 | transition: opacity $default-transition-length linear; 75 | 76 | .hamburger { 77 | @include hamburger($color: $white, $color-hover: $medium-gray); 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /app/views/partials/swagger/parameters.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-openapi 4 | 5 | Renders the parameter table within a operation definition. 6 | @param {Array|Object} parameters a list of Swagger-Parameter objects 7 | If this is an object, an it is expected to be the global parameter list 8 | https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#parametersDefinitionsObject 9 | and the key of each entry is display in a column in front of the other columns. 10 | @api public 11 | --}} 12 | 13 | {{#if parameters}} 14 |
15 | {{#each parameters}} 16 | {{!-- {{#schemaReferenceContext $ref}} --}} 17 |
18 |
19 |
{{name}}: {{~>json-schema/datatype schema ~}}
20 | {{#if required}} 21 | 22 | {{/if}} 23 | {{!-- 24 | {{#if schema.$ref}} 25 | {{$ref}} 26 | {{/if}} 27 | --}} 28 |
29 |
30 | {{>swagger/description description}} 31 |
32 |
33 | {{! parameter `collectionFormat` field }} 34 | {{~#if collectionFormat ~}} 35 |
36 | {{md (swaggerCollectionFormat collectionFormat name) stripParagraph=true}} 37 |
38 | {{~/if}} 39 | {{!-- {{/schemaReferenceContext}} --}} 40 | {{/each}} 41 |
42 | {{/if}} 43 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_sizing.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-sizing 7 | //// 8 | 9 | /// Responsive breakpoints for spacing classes (margin and padding) 10 | /// @type Boolean 11 | $prototype-sizing-breakpoints: $global-prototype-breakpoints !default; 12 | 13 | /// Map containing all the `sizing` classes 14 | /// @type Map 15 | $prototype-sizing: ( 16 | width, 17 | height 18 | ) !default; 19 | 20 | /// Map containing all the sizes. 21 | /// @type Map 22 | $prototype-sizes: ( 23 | 25: 25%, 24 | 50: 50%, 25 | 75: 75%, 26 | 100: 100% 27 | ) !default; 28 | 29 | /// Max Width 100 utility. 30 | @mixin max-width-100 { 31 | max-width: 100% !important; 32 | } 33 | 34 | /// Max Height 100 utility. 35 | @mixin max-height-100 { 36 | max-height: 100% !important; 37 | } 38 | 39 | @mixin foundation-prototype-sizing { 40 | // Element Sizing 41 | @each $sizing in $prototype-sizing { 42 | @each $length, $percentage in $prototype-sizes { 43 | .#{$sizing}-#{$length} { 44 | #{$sizing}: $percentage !important; 45 | } 46 | } 47 | } 48 | 49 | // Max width & height 50 | .max-width-100 { 51 | @include max-width-100; 52 | } 53 | .max-height-100 { 54 | @include max-height-100; 55 | } 56 | 57 | @if ($prototype-sizing-breakpoints) { 58 | // Loop through Responsive Breakpoints 59 | @each $size in $breakpoint-classes { 60 | @include breakpoint($size) { 61 | @if $size != $-zf-zero-breakpoint { 62 | @each $sizing in $prototype-sizing { 63 | @each $length, $percentage in $prototype-sizes { 64 | .#{$size}-#{$sizing}-#{$length} { 65 | #{$sizing}: $percentage !important; 66 | } 67 | } 68 | } 69 | } 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/lib/urls.js: -------------------------------------------------------------------------------- 1 | var path = require("path") 2 | 3 | /** 4 | * Utilities for managing both URL and file paths. 5 | */ 6 | 7 | /** 8 | * Determines if the given string is an absolute URL. 9 | * @param {string} str the string to check. 10 | * @return {boolean} `true` if the string is a URL. 11 | */ 12 | function absoluteURL(str) { 13 | return /^.*\:\/\/[^\/]+\/?/.test(str) 14 | } 15 | 16 | /** 17 | * Returns the base-part of a URL - returns `"http://example.com/"` when given `"http://example.com/test/"`. 18 | * @param {string} url an absolute URL to split 19 | * @return {string} the base-part of the given URL 20 | */ 21 | function urlBasename(url) { 22 | return /^(.*\:\/\/[^\/]+\/?)/.exec(url)[1]; 23 | } 24 | 25 | /** 26 | * `path.join()` that works with either file paths or URLs. 27 | * @param {...string} paths Paths to join, left to right 28 | * @return {string} the joined path. 29 | */ 30 | function join(paths) { 31 | args = [].concat.apply([], arguments) 32 | return args.slice(1).reduce(function(url, val) { 33 | if(absoluteURL(url) || absoluteURL(val)) { 34 | return require("url").resolve(url, val) 35 | } 36 | return path.posix.join(url, val) 37 | }, args[0]) 38 | } 39 | 40 | /** 41 | * `path.relative` that works with either file paths or URLs. 42 | * @param {string} from the origin path 43 | * @param {string} to the destination path 44 | * @return {string} A relative path from the origin to the destination. 45 | */ 46 | function relative(from, to) { 47 | var localToRemote = !absoluteURL(from) && absoluteURL(to) 48 | var differentDomains = absoluteURL(from) && absoluteURL(to) && urlBasename(from) !== urlBasename(to) 49 | if(localToRemote || differentDomains) { 50 | return to; 51 | } 52 | return path.posix.relative(from, to) 53 | } 54 | 55 | module.exports = { 56 | absoluteURL: absoluteURL, 57 | urlBasename: urlBasename, 58 | join: join, 59 | relative: relative, 60 | } 61 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/components/_dropdown.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group dropdown 7 | //// 8 | 9 | /// Padding for dropdown panes. 10 | /// @type List 11 | $dropdown-padding: 1rem !default; 12 | 13 | /// Background for dropdown panes. 14 | /// @type Color 15 | $dropdown-background: $body-background !default; 16 | 17 | /// Border for dropdown panes. 18 | /// @type List 19 | $dropdown-border: 1px solid $medium-gray !default; 20 | 21 | /// Font size for dropdown panes. 22 | /// @type List 23 | $dropdown-font-size: 1rem !default; 24 | 25 | /// Width for dropdown panes. 26 | /// @type Number 27 | $dropdown-width: 300px !default; 28 | 29 | /// Border radius dropdown panes. 30 | /// @type Number 31 | $dropdown-radius: $global-radius !default; 32 | 33 | /// Sizes for dropdown panes. Each size is a CSS class you can apply. 34 | /// @type Map 35 | $dropdown-sizes: ( 36 | tiny: 100px, 37 | small: 200px, 38 | large: 400px, 39 | ) !default; 40 | 41 | /// Applies styles for a basic dropdown. 42 | @mixin dropdown-container { 43 | position: absolute; 44 | z-index: 10; 45 | 46 | width: $dropdown-width; 47 | padding: $dropdown-padding; 48 | 49 | visibility: hidden; 50 | display: none; 51 | border: $dropdown-border; 52 | border-radius: $dropdown-radius; 53 | background-color: $dropdown-background; 54 | 55 | font-size: $dropdown-font-size; 56 | 57 | 58 | // Allow an intermittent state to do positioning before making visible. 59 | &.is-opening { 60 | display: block; 61 | } 62 | 63 | &.is-open { 64 | visibility: visible; 65 | display: block; 66 | } 67 | } 68 | 69 | @mixin foundation-dropdown { 70 | .dropdown-pane { 71 | @include dropdown-container; 72 | } 73 | 74 | @each $name, $size in $dropdown-sizes { 75 | .dropdown-pane.#{$name} { 76 | width: $size; 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /app/dociql/fetch-schema.js: -------------------------------------------------------------------------------- 1 | const { graphqlSync, buildSchema, getIntrospectionQuery, buildClientSchema } = require('graphql') 2 | const request = require("sync-request") 3 | const fs = require('fs'); 4 | 5 | const converter = require('graphql-2-json-schema'); 6 | 7 | module.exports = function (graphUrl, authHeader) { 8 | if (graphUrl.includes("file://")) { 9 | return fetchSchemaFromFile(graphUrl); 10 | } else { 11 | return fetchSchemaFromUrl(graphUrl, authHeader); 12 | } 13 | 14 | 15 | } 16 | 17 | function fetchSchemaFromFile(graphUrl) { 18 | const filePath = graphUrl.replace("file://", ""); 19 | const fileContent = fs.readFileSync(filePath, "utf-8"); 20 | let graphQLSchema; 21 | 22 | try { 23 | graphQLSchema = buildSchema(fileContent); 24 | } catch (e) { 25 | console.error(`Encountered an error parsing the schema file. Is ${filePath} in GraphQL SDL format?`); 26 | throw e; 27 | } 28 | 29 | const introspection = graphqlSync(graphQLSchema, getIntrospectionQuery()).data; 30 | 31 | const jsonSchema = converter.fromIntrospectionQuery(introspection); 32 | 33 | return { 34 | jsonSchema, 35 | graphQLSchema 36 | } 37 | } 38 | 39 | function fetchSchemaFromUrl(graphUrl, authHeader) { 40 | const requestBody = { 41 | operationName: "IntrospectionQuery", 42 | query: getIntrospectionQuery() 43 | }; 44 | 45 | const headers = authHeader ? Object.fromEntries([authHeader.split(":")]) : {}; 46 | 47 | const responseBody = request("POST", graphUrl, { 48 | headers, 49 | json: requestBody 50 | }).getBody('utf8'); 51 | 52 | const introspectionResponse = JSON.parse(responseBody); 53 | 54 | const graphQLSchema = buildClientSchema(introspectionResponse.data); 55 | const jsonSchema = converter.fromIntrospectionQuery(introspectionResponse.data); 56 | 57 | return { 58 | jsonSchema, 59 | graphQLSchema 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/lib/reference-contexts.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Methods that can recognize the current "context" of a `$ref` reference. 3 | * This allows sections to be included differently; for instance a reference for `/responses/500/schema` could be 4 | * inserted into the global definitions, instead of being included multiple times in the document. 5 | */ 6 | 7 | /** 8 | * Recognizes 'schema' elements in 'responses' to be definitions. 9 | * @param {String} ref the JSON reference 10 | * @return {Boolean} `true` if the current path is to a response schema. 11 | */ 12 | function responseSchemaDefinition(ref) { 13 | var parts = ref.split("/") 14 | return parts.length > 4 && parts.indexOf("schema") === parts.length - 2 && 15 | parts.indexOf("responses") === parts.length - 4; 16 | } 17 | 18 | /** 19 | * Recognize items in property arrays. 20 | * @param {String} ref the JSON reference. 21 | * @return {Boolean} `true` if the current path is to an array inside a property. 22 | */ 23 | function propertyArrayDefinition(ref) { 24 | var parts = ref.split("/") 25 | return parts.length > 2 && parts.lastIndexOf("items") === parts.length - 2; 26 | } 27 | 28 | /** 29 | * Recognizes different types of definitions that could be moved to the global 'definitions'. 30 | * @param {String} ref the JSON reference 31 | * @return {Boolean} `true` if the current path is an OpenAPI `definition`. 32 | */ 33 | function definition(ref) { 34 | return responseSchemaDefinition(ref) || propertyArrayDefinition(ref) 35 | } 36 | 37 | /** 38 | * Recognize URL paths. 39 | * @param {String} ref the JSON reference. 40 | * @return {Boolean} `true` if the current path is an OpenAPI `path`. 41 | */ 42 | function path(ref) { 43 | var parts = ref.split("/") 44 | return parts.length === 3 && parts.lastIndexOf("paths") === parts.length - 3 && parts[1].length > 0; 45 | } 46 | 47 | module.exports = { 48 | responseSchemaDefinition: responseSchemaDefinition, 49 | propertyArrayDefinition: propertyArrayDefinition, 50 | definition: definition, 51 | path: path, 52 | }; 53 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/components/_title-bar.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group title-bar 7 | //// 8 | 9 | /// Background color of a title bar. 10 | /// @type Color 11 | $titlebar-background: $black !default; 12 | 13 | /// Color of text inside a title bar. 14 | /// @type Color 15 | $titlebar-color: $white !default; 16 | 17 | /// Padding inside a title bar. 18 | /// @type Length 19 | $titlebar-padding: 0.5rem !default; 20 | 21 | /// Font weight of text inside a title bar. 22 | /// @type Weight 23 | $titlebar-text-font-weight: bold !default; 24 | 25 | /// Color of menu icons inside a title bar. 26 | /// @type Color 27 | $titlebar-icon-color: $white !default; 28 | 29 | /// Color of menu icons inside a title bar on hover. 30 | /// @type Color 31 | $titlebar-icon-color-hover: $medium-gray !default; 32 | 33 | /// Spacing between the menu icon and text inside a title bar. 34 | /// @type Length 35 | $titlebar-icon-spacing: 0.25rem !default; 36 | 37 | @mixin foundation-title-bar { 38 | .title-bar { 39 | padding: $titlebar-padding; 40 | background: $titlebar-background; 41 | color: $titlebar-color; 42 | 43 | @if $global-flexbox { 44 | display: flex; 45 | justify-content: flex-start; 46 | align-items: center; 47 | } 48 | @else { 49 | @include clearfix; 50 | } 51 | 52 | .menu-icon { 53 | margin-#{$global-left}: $titlebar-icon-spacing; 54 | margin-#{$global-right}: $titlebar-icon-spacing; 55 | } 56 | } 57 | 58 | @if $global-flexbox { 59 | .title-bar-left, 60 | .title-bar-right { 61 | flex: 1 1 0px; // sass-lint:disable-line zero-unit 62 | } 63 | 64 | .title-bar-right { 65 | text-align: right; 66 | } 67 | } 68 | @else { 69 | .title-bar-left { 70 | float: left; 71 | } 72 | 73 | .title-bar-right { 74 | float: right; 75 | text-align: right; 76 | } 77 | } 78 | 79 | .title-bar-title { 80 | display: inline-block; 81 | vertical-align: middle; 82 | font-weight: $titlebar-text-font-weight; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/components/_responsive-embed.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group responsive-embed 7 | //// 8 | 9 | /// Margin below a responsive embed container. 10 | /// @type Number 11 | $responsive-embed-margin-bottom: rem-calc(16) !default; 12 | 13 | /// Aspect ratios used to determine padding-bottom of responsive embed containers. 14 | /// @type Map 15 | $responsive-embed-ratios: ( 16 | default: 4 by 3, 17 | widescreen: 16 by 9, 18 | ) !default; 19 | 20 | // WARNING: Will be removed in version 6.4 21 | $responsive-embed-ratio: default; 22 | 23 | /// Creates a responsive embed container. 24 | /// @param {String|List} $ratio [default] - Ratio of the container. Can be a key from the `$responsive-embed-ratios` map or a list formatted as `x by y`. 25 | @mixin responsive-embed($ratio: default) { 26 | @if type-of($ratio) == 'string' { 27 | $ratio: map-get($responsive-embed-ratios, $ratio); 28 | } 29 | position: relative; 30 | height: 0; 31 | margin-bottom: $responsive-embed-margin-bottom; 32 | padding-bottom: ratio-to-percentage($ratio); 33 | overflow: hidden; 34 | 35 | iframe, 36 | object, 37 | embed, 38 | video { 39 | position: absolute; 40 | top: 0; 41 | #{$global-left}: 0; 42 | width: 100%; 43 | height: 100%; 44 | } 45 | } 46 | 47 | @mixin foundation-responsive-embed { 48 | .responsive-embed, 49 | .flex-video { 50 | @include responsive-embed($ratio: default); 51 | 52 | $ratios: map-remove($responsive-embed-ratios,default); 53 | 54 | @each $name, $ratio in $ratios { 55 | &.#{$name} { 56 | padding-bottom: ratio-to-percentage($ratio); 57 | } 58 | } 59 | } 60 | } 61 | 62 | @mixin foundation-flex-video { 63 | @warn 'This mixin is being replaced by foundation-responsive-embed(). foundation-flex-video() will be removed in Foundation 6.4.'; 64 | @include foundation-responsive-embed; 65 | } 66 | 67 | @mixin flex-video($ratio: $responsive-embed-ratio) { 68 | @warn 'This mixin is being replaced by responsive-embed(). flex-video() will be removed in Foundation 6.4.'; 69 | @include responsive-embed($ratio); 70 | } 71 | -------------------------------------------------------------------------------- /app/vendor/foundation/_vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Vertical Rhythm 3 | // 4 | // This is the minimal amount of code needed to create vertical rhythm in our 5 | // CSS. If you are looking for a robust solution, look at the excellent Typey 6 | // library. @see https://github.com/jptaranto/typey 7 | 8 | @function normalize-rhythm($value, $relative-to: $base-font-size, $unit: $base-unit) { 9 | @if unit($value) != px { 10 | @error "The normalize vertical-rhythm module only supports px inputs. The typey library is better."; 11 | } 12 | @if $unit == rem { 13 | @return ($value / $base-font-size) * 1rem; 14 | } 15 | @else if $unit == em { 16 | @return ($value / $relative-to) * 1em; 17 | } 18 | @else { // $unit == px 19 | @return $value; 20 | } 21 | } 22 | 23 | @mixin normalize-font-size($value, $relative-to: $base-font-size) { 24 | @if unit($value) != 'px' { 25 | @error "normalize-font-size() only supports px inputs. The typey library is better."; 26 | } 27 | font-size: normalize-rhythm($value, $relative-to); 28 | } 29 | 30 | @mixin normalize-rhythm($property, $values, $relative-to: $base-font-size) { 31 | $value-list: $values; 32 | $sep: space; 33 | @if type-of($values) == 'list' { 34 | $sep: list-separator($values); 35 | } 36 | @else { 37 | $value-list: append((), $values); 38 | } 39 | 40 | $normalized-values: (); 41 | @each $value in $value-list { 42 | @if unitless($value) and $value != 0 { 43 | $value: $value * normalize-rhythm($base-line-height, $relative-to); 44 | } 45 | $normalized-values: append($normalized-values, $value, $sep); 46 | } 47 | #{$property}: $normalized-values; 48 | } 49 | 50 | @mixin normalize-margin($values, $relative-to: $base-font-size) { 51 | @include normalize-rhythm(margin, $values, $relative-to); 52 | } 53 | 54 | @mixin normalize-line-height($font-size, $min-line-padding: 2px) { 55 | $lines: ceil($font-size / $base-line-height); 56 | // If lines are cramped include some extra leading. 57 | @if ($lines * $base-line-height - $font-size) < ($min-line-padding * 2) { 58 | $lines: $lines + 1; 59 | } 60 | @include normalize-rhythm(line-height, $lines, $font-size); 61 | } 62 | -------------------------------------------------------------------------------- /app/views/partials/layout/nav.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Renders the sidebar navigation 3 | @param {object} $context$ the whole swagger definition 4 | @api public 5 | --}} 6 | 77 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_prototype.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype 7 | //// 8 | 9 | // Relational Mixins 10 | @import 'relation'; 11 | 12 | // Box Mixin 13 | @import 'box'; 14 | 15 | // Rotate Mixin 16 | @import 'rotate'; 17 | 18 | // Typescale 19 | @import 'typescale'; 20 | 21 | // Text utilities 22 | @import 'text-utilities'; 23 | 24 | // Text transformation classes 25 | @import 'text-transformation'; 26 | 27 | // Text Decoration classes 28 | @import 'text-decoration'; 29 | 30 | // Font Styling 31 | @import 'font-styling'; 32 | 33 | // List Style type 34 | @import 'list-style-type'; 35 | 36 | // Rounded Utility 37 | @import 'rounded'; 38 | 39 | // Bordered Utility 40 | @import 'bordered'; 41 | 42 | // Shadow Utility 43 | @import 'shadow'; 44 | 45 | // Arrow Utility 46 | @import 'arrow'; 47 | 48 | // Separator Utility 49 | @import 'separator'; 50 | 51 | // Overflow helper classes 52 | @import 'overflow'; 53 | 54 | // Display classes 55 | @import 'display'; 56 | 57 | // Position Helpers 58 | @import 'position'; 59 | 60 | // Border box 61 | @import 'border-box'; 62 | 63 | // Border none Utilty 64 | @import 'border-none'; 65 | 66 | // Sizing Utilities 67 | @import 'sizing'; 68 | 69 | // Spacing Utilities 70 | @import 'spacing'; 71 | 72 | @mixin foundation-prototype-classes { 73 | @include foundation-prototype-typescale; 74 | @include foundation-prototype-text-utilities; 75 | @include foundation-prototype-text-transformation; 76 | @include foundation-prototype-text-decoration; 77 | @include foundation-prototype-font-styling; 78 | @include foundation-prototype-list-style-type; 79 | @include foundation-prototype-rounded; 80 | @include foundation-prototype-bordered; 81 | @include foundation-prototype-shadow; 82 | @include foundation-prototype-arrow; 83 | @include foundation-prototype-separator; 84 | @include foundation-prototype-overflow; 85 | @include foundation-prototype-display; 86 | @include foundation-prototype-position; 87 | @include foundation-prototype-border-box; 88 | @include foundation-prototype-border-none; 89 | @include foundation-prototype-sizing; 90 | @include foundation-prototype-spacing; 91 | } 92 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/typography/_helpers.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group typography-helpers 7 | //// 8 | 9 | /// Default font size for lead paragraphs. 10 | /// @type Number 11 | $lead-font-size: $global-font-size * 1.25 !default; 12 | 13 | /// Default line height for lead paragraphs. 14 | /// @type String 15 | $lead-lineheight: 1.6 !default; 16 | 17 | /// Default line height for subheaders. 18 | /// @type Number 19 | $subheader-lineheight: 1.4 !default; 20 | 21 | /// Default font color for subheaders. 22 | /// @type Color 23 | $subheader-color: $dark-gray !default; 24 | 25 | /// Default font weight for subheaders. 26 | /// @type String 27 | $subheader-font-weight: $global-weight-normal !default; 28 | 29 | /// Default top margin for subhheaders. 30 | /// @type Number 31 | $subheader-margin-top: 0.2rem !default; 32 | 33 | /// Default bottom margin for subheaders. 34 | /// @type Number 35 | $subheader-margin-bottom: 0.5rem !default; 36 | 37 | /// Default font size for statistic numbers. 38 | /// @type Number 39 | $stat-font-size: 2.5rem !default; 40 | 41 | @mixin foundation-typography-helpers { 42 | // Use to create a subheading under a main header 43 | // Make sure you pair the two elements in a
element, like this: 44 | //
45 | //

Heading

46 | //

Subheading

47 | //
48 | .subheader { 49 | margin-top: $subheader-margin-top; 50 | margin-bottom: $subheader-margin-bottom; 51 | 52 | font-weight: $subheader-font-weight; 53 | line-height: $subheader-lineheight; 54 | color: $subheader-color; 55 | } 56 | 57 | // Use to style an introductory lead, deck, blurb, etc. 58 | .lead { 59 | font-size: $lead-font-size; 60 | line-height: $lead-lineheight; 61 | } 62 | 63 | // Use to style a large number to display a statistic 64 | .stat { 65 | font-size: $stat-font-size; 66 | line-height: 1; 67 | 68 | p + & { 69 | margin-top: -1rem; 70 | } 71 | } 72 | 73 | ul, ol { 74 | // Use to remove numbers from ordered list & bullets from unordered list 75 | &.no-bullet { 76 | margin-#{$global-left}: 0; 77 | list-style: none; 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /app/vendor/foundation/js/foundation.util.nest.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import $ from 'jquery'; 4 | 5 | const Nest = { 6 | Feather(menu, type = 'zf') { 7 | menu.attr('role', 'menubar'); 8 | 9 | var items = menu.find('li').attr({'role': 'menuitem'}), 10 | subMenuClass = `is-${type}-submenu`, 11 | subItemClass = `${subMenuClass}-item`, 12 | hasSubClass = `is-${type}-submenu-parent`, 13 | applyAria = (type !== 'accordion'); // Accordions handle their own ARIA attriutes. 14 | 15 | items.each(function() { 16 | var $item = $(this), 17 | $sub = $item.children('ul'); 18 | 19 | if ($sub.length) { 20 | $item.addClass(hasSubClass); 21 | $sub.addClass(`submenu ${subMenuClass}`).attr({'data-submenu': ''}); 22 | if(applyAria) { 23 | $item.attr({ 24 | 'aria-haspopup': true, 25 | 'aria-label': $item.children('a:first').text() 26 | }); 27 | // Note: Drilldowns behave differently in how they hide, and so need 28 | // additional attributes. We should look if this possibly over-generalized 29 | // utility (Nest) is appropriate when we rework menus in 6.4 30 | if(type === 'drilldown') { 31 | $item.attr({'aria-expanded': false}); 32 | } 33 | } 34 | $sub 35 | .addClass(`submenu ${subMenuClass}`) 36 | .attr({ 37 | 'data-submenu': '', 38 | 'role': 'menu' 39 | }); 40 | if(type === 'drilldown') { 41 | $sub.attr({'aria-hidden': true}); 42 | } 43 | } 44 | 45 | if ($item.parent('[data-submenu]').length) { 46 | $item.addClass(`is-submenu-item ${subItemClass}`); 47 | } 48 | }); 49 | 50 | return; 51 | }, 52 | 53 | Burn(menu, type) { 54 | var //items = menu.find('li'), 55 | subMenuClass = `is-${type}-submenu`, 56 | subItemClass = `${subMenuClass}-item`, 57 | hasSubClass = `is-${type}-submenu-parent`; 58 | 59 | menu 60 | .find('>li, .menu, .menu > li') 61 | .removeClass(`${subMenuClass} ${subItemClass} ${hasSubClass} is-submenu-item submenu is-active`) 62 | .removeAttr('data-submenu').css('display', ''); 63 | 64 | } 65 | } 66 | 67 | export {Nest}; 68 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/util/_math.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group functions 7 | //// 8 | 9 | /// Finds the greatest common divisor of two integers. 10 | /// 11 | /// @param {Number} $a - First number to compare. 12 | /// @param {Number} $b - Second number to compare. 13 | /// 14 | /// @returns {Number} The greatest common divisor. 15 | @function gcd($a, $b) { 16 | // From: http://rosettacode.org/wiki/Greatest_common_divisor#JavaScript 17 | @if ($b != 0) { 18 | @return gcd($b, $a % $b); 19 | } 20 | @else { 21 | @return abs($a); 22 | } 23 | } 24 | 25 | /// Handles decimal exponents by trying to convert them into a fraction and then use a nth-root-algorithm for parts of the calculation 26 | /// 27 | /// @param {Number} $base - The base number. 28 | /// @param {Number} $exponent - The exponent. 29 | /// 30 | /// @returns {Number} The product of the exponentiation. 31 | @function pow($base, $exponent, $prec: 16) { 32 | @if (floor($exponent) != $exponent) { 33 | $prec2 : pow(10, $prec); 34 | $exponent: round($exponent * $prec2); 35 | $denominator: gcd($exponent, $prec2); 36 | @return nth-root(pow($base, $exponent / $denominator), $prec2 / $denominator, $prec); 37 | } 38 | 39 | $value: $base; 40 | @if $exponent > 1 { 41 | @for $i from 2 through $exponent { 42 | $value: $value * $base; 43 | } 44 | } 45 | @else if $exponent < 1 { 46 | @for $i from 0 through -$exponent { 47 | $value: $value / $base; 48 | } 49 | } 50 | 51 | @return $value; 52 | } 53 | 54 | @function nth-root($num, $n: 2, $prec: 12) { 55 | // From: http://rosettacode.org/wiki/Nth_root#JavaScript 56 | $x: 1; 57 | 58 | @for $i from 0 through $prec { 59 | $x: 1 / $n * (($n - 1) * $x + ($num / pow($x, $n - 1))); 60 | } 61 | 62 | @return $x; 63 | } 64 | 65 | /// Calculates the height as a percentage of the width for a given ratio. 66 | /// @param {List} $ratio - Ratio to use to calculate the height, formatted as `x by y`. 67 | /// @return {Number} A percentage value for the height relative to the width of a responsive container. 68 | @function ratio-to-percentage($ratio) { 69 | $w: nth($ratio, 1); 70 | $h: nth($ratio, 3); 71 | @return $h / $w * 100%; 72 | } 73 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_overflow.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-overflow 7 | //// 8 | 9 | /// Responsive breakpoints for overflow helper classes 10 | /// @type Boolean 11 | $prototype-overflow-breakpoints: $global-prototype-breakpoints !default; 12 | 13 | /// Map containing all the `overflow` classes 14 | /// @type Map 15 | $prototype-overflow: ( 16 | visible, 17 | hidden, 18 | scroll 19 | ) !default; 20 | 21 | /// Overflow classes, by default coming through a map `$prototype-overflow` 22 | /// @param {String} $overflow [] Overflow classes 23 | @mixin overflow($overflow) { 24 | overflow: $overflow !important; 25 | } 26 | 27 | /// Overflow classes on horizontal axis, by default coming through a map `$prototype-overflow` 28 | /// @param {String} $overflow [] Overflow classes (horizontal axis) 29 | @mixin overflow-x($overflow) { 30 | overflow-x: $overflow !important; 31 | } 32 | 33 | /// Overflow classes on vertical axis, by default coming through a map `$prototype-overflow` 34 | /// @param {String} $overflow [] Overflow classes (vertical axis) 35 | @mixin overflow-y($overflow) { 36 | overflow-y: $overflow !important; 37 | } 38 | 39 | @mixin foundation-prototype-overflow { 40 | @each $overflow in $prototype-overflow { 41 | .overflow-#{$overflow} { 42 | @include overflow($overflow); 43 | } 44 | .overflow-x-#{$overflow} { 45 | @include overflow-x($overflow); 46 | } 47 | .overflow-y-#{$overflow} { 48 | @include overflow-y($overflow); 49 | } 50 | } 51 | 52 | @if ($prototype-overflow-breakpoints) { 53 | // Loop through Responsive Breakpoints 54 | @each $size in $breakpoint-classes { 55 | @include breakpoint($size) { 56 | @each $overflow in $prototype-overflow { 57 | @if $size != $-zf-zero-breakpoint { 58 | .#{$size}-overflow-#{$overflow} { 59 | @include overflow($overflow); 60 | } 61 | .#{$size}-overflow-x-#{$overflow} { 62 | @include overflow-x($overflow); 63 | } 64 | .#{$size}-overflow-y-#{$overflow} { 65 | @include overflow-y($overflow); 66 | } 67 | } 68 | } 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_text-utilities.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-text-utilities 7 | //// 8 | 9 | /// Responsive breakpoints for text utilities 10 | /// @type Boolean 11 | $prototype-utilities-breakpoints: $global-prototype-breakpoints !default; 12 | 13 | /// Default Value for `text-overflow` variable 14 | /// @type String 15 | $prototype-text-overflow: ellipsis !default; 16 | 17 | /// Image Replacement utility. `text-hide` 18 | @mixin text-hide { 19 | font: 0/0 a !important; 20 | color: transparent !important; 21 | text-shadow: none !important; 22 | background-color: transparent !important; 23 | border: 0 !important; 24 | } 25 | 26 | /// Truncating the text, elipsis by default. 27 | /// @param {String} $overflow [$prototype-text-overflow] Text Truncate 28 | @mixin text-truncate( 29 | $overflow: $prototype-text-overflow 30 | ) { 31 | max-width: 100% !important; 32 | overflow: hidden !important; 33 | text-overflow: $overflow; 34 | white-space: nowrap !important; 35 | } 36 | 37 | /// No wrapping of the text. `text-nowrap` 38 | @mixin text-nowrap { 39 | white-space: nowrap !important; 40 | } 41 | 42 | /// Wrapping of the text. `text-wrap` 43 | @mixin text-wrap { 44 | word-wrap: break-word !important; 45 | } 46 | 47 | @mixin foundation-prototype-text-utilities { 48 | .text-hide { 49 | @include text-hide; 50 | } 51 | 52 | .text-truncate { 53 | @include text-truncate; 54 | } 55 | 56 | .text-nowrap { 57 | @include text-nowrap; 58 | } 59 | 60 | .text-wrap { 61 | @include text-wrap; 62 | } 63 | 64 | @if ($prototype-utilities-breakpoints) { 65 | // Loop through Responsive Breakpoints 66 | @each $size in $breakpoint-classes { 67 | @include breakpoint($size) { 68 | @if $size != $-zf-zero-breakpoint { 69 | .#{$size}-text-hide { 70 | @include text-hide; 71 | } 72 | 73 | .#{$size}-text-truncate { 74 | @include text-truncate; 75 | } 76 | 77 | .#{$size}-text-nowrap { 78 | @include text-nowrap; 79 | } 80 | 81 | .#{$size}-text-wrap { 82 | @include text-wrap; 83 | } 84 | } 85 | } 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /app/lib/json-reference.js: -------------------------------------------------------------------------------- 1 | var path = require("path") 2 | 3 | /** 4 | * Applies a single JSON reference lookup to an object. Does not resolve references in the returned document. 5 | * @param {string} ref the JSON reference to search for - e.g. `"#/foo/bar"` 6 | * @param {object} obj the object to find the referenced field in - e.g. `{"foo": {"bar": 5}}` 7 | * @throws {ReferenceError} if the reference can't be followed. 8 | * @return {*} The referenced element in the given object. 9 | */ 10 | function jsonSearch(ref, obj) { 11 | var current = obj; 12 | refs = ref.replace(/^#?\/?/, "").split("/").forEach(function(section) { 13 | if(section.trim().length < 1) { 14 | return; 15 | } 16 | if(current[section]) { 17 | current = current[section]; 18 | } 19 | else { 20 | throw new ReferenceError("Couldn't evaluate JSON reference '"+ref+"': Couldn't find key "+section) 21 | } 22 | }) 23 | return current; 24 | } 25 | 26 | /** 27 | * Resolve all local JSON references in a single document. Resolves absolute references (`#/test/`) and relative paths 28 | * (`../test`), but does not change any references to remote files. 29 | * Mutates the given object with resolved references. 30 | * @param {Object} doc the root JSON document that references are being resolved in. 31 | * @param {Object} obj a section of the JSON document that is being evaluated. 32 | * @param {String} ref the path to the current object inside the JSON document, as a JSON reference. 33 | */ 34 | function resolveLocal(doc, obj, ref) { 35 | if(typeof obj !== "object") { 36 | throw new TypeError("resolveLocal() must be given an object. Given "+typeof obj+" ("+obj+")") 37 | } 38 | for(var k in obj) { 39 | var val = obj[k]; 40 | if(typeof val !== "object" || val === null) { continue; } 41 | if(val.$ref) { 42 | var $ref = val.$ref; 43 | if($ref.indexOf("./") === 0 || $ref.indexOf("../") === 0) { 44 | $ref = path.posix.join(ref, k, $ref) 45 | } 46 | if($ref.indexOf("#/") === 0) { 47 | Object.assign(val, jsonSearch($ref, doc)) 48 | delete val.$ref; 49 | } 50 | } 51 | else { 52 | resolveLocal(doc, val, path.posix.join(ref, k)) 53 | } 54 | } 55 | } 56 | 57 | module.exports = { 58 | jsonSearch: jsonSearch, 59 | resolveLocal: resolveLocal, 60 | }; 61 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/grid/_layout.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group grid 7 | //// 8 | 9 | /// Sizes child elements so that `$n` number of items appear on each row. 10 | /// 11 | /// @param {Number} $n - Number of elements to display per row. 12 | /// @param {String} $selector ['.column'] - Selector(s) to use for child elements. 13 | /// @param {Number|List} $gutter 14 | /// The gutter to apply to child elements. Accepts multiple values: 15 | /// - $grid-column-gutter will use the values in the $grid-column-gutter map, including breakpoint sizes. 16 | /// - A fixed numeric value will apply this gutter to all breakpoints. 17 | @mixin grid-layout( 18 | $n, 19 | $selector: '.column', 20 | $gutter: null 21 | ) { 22 | & > #{$selector} { 23 | float: $global-left; 24 | width: percentage(1/$n); 25 | 26 | // If a $gutter value is passed 27 | @if($gutter) { 28 | // Gutters 29 | @if type-of($gutter) == 'map' { 30 | @each $breakpoint, $value in $gutter { 31 | $padding: rem-calc($value) / 2; 32 | 33 | @include breakpoint($breakpoint) { 34 | padding-right: $padding; 35 | padding-left: $padding; 36 | } 37 | } 38 | } 39 | @else if type-of($gutter) == 'number' and strip-unit($gutter) > 0 { 40 | $padding: rem-calc($gutter) / 2; 41 | padding-right: $padding; 42 | padding-left: $padding; 43 | } 44 | } 45 | 46 | &:nth-of-type(1n) { 47 | clear: none; 48 | } 49 | 50 | &:nth-of-type(#{$n}n+1) { 51 | clear: both; 52 | } 53 | 54 | &:last-child { 55 | float: $global-left; 56 | } 57 | } 58 | } 59 | 60 | /// Adds extra CSS to block grid children so the last items in the row center automatically. Apply this to the columns, not the row. 61 | /// 62 | /// @param {Number} $n - Number of items that appear in each row. 63 | @mixin grid-layout-center-last($n) { 64 | @for $i from 1 to $n { 65 | @if $i == 1 { 66 | &:nth-child(#{$n}n+1):last-child { 67 | margin-left: (100 - 100/$n * $i) / 2 * 1%; 68 | } 69 | } 70 | @else { 71 | &:nth-child(#{$n}n+1):nth-last-child(#{$i}) { 72 | margin-left: (100 - 100/$n * $i) / 2 * 1%; 73 | } 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/forms/_progress.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group progress-bar 7 | //// 8 | 9 | /// Height of a progress bar. 10 | /// @type Number 11 | $progress-height: 1rem !default; 12 | 13 | /// Background color of a progress bar. 14 | /// @type Color 15 | $progress-background: $medium-gray !default; 16 | 17 | /// Bottom margin of a progress bar. 18 | /// @type Number 19 | $progress-margin-bottom: $global-margin !default; 20 | 21 | /// Default color of a progress bar's meter. 22 | /// @type Color 23 | $progress-meter-background: $primary-color !default; 24 | 25 | /// Default radius of a progress bar. 26 | /// @type Number 27 | $progress-radius: $global-radius !default; 28 | 29 | @mixin foundation-progress-element { 30 | progress { 31 | display: block; 32 | width: 100%; 33 | height: $progress-height; 34 | margin-bottom: $progress-margin-bottom; 35 | 36 | appearance: none; 37 | 38 | @if hasvalue($progress-radius) { 39 | border-radius: $progress-radius; 40 | } 41 | 42 | // For Firefox 43 | border: 0; 44 | background: $progress-background; 45 | 46 | &::-webkit-progress-bar { 47 | background: $progress-background; 48 | 49 | @if hasvalue($progress-radius) { 50 | border-radius: $progress-radius; 51 | } 52 | } 53 | 54 | &::-webkit-progress-value { 55 | background: $progress-meter-background; 56 | 57 | @if hasvalue($progress-radius) { 58 | border-radius: $progress-radius; 59 | } 60 | } 61 | 62 | &::-moz-progress-bar { 63 | background: $progress-meter-background; 64 | 65 | @if hasvalue($progress-radius) { 66 | border-radius: $progress-radius; 67 | } 68 | } 69 | 70 | @each $name, $color in $foundation-palette { 71 | &.#{$name} { 72 | // Internet Explorer sets the fill with color 73 | color: $color; 74 | 75 | &::-webkit-progress-value { 76 | background: $color; 77 | } 78 | 79 | &::-moz-progress-bar { 80 | background: $color; 81 | } 82 | } 83 | } 84 | 85 | // For IE and Edge 86 | &::-ms-fill { 87 | @if hasvalue($progress-radius) { 88 | border-radius: $progress-radius; 89 | } 90 | 91 | border: 0; 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /app/views/partials/swagger/securityDefinitions.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-openapi 4 | 5 | Renders the security-section of the HTML-page 6 | TODO: Parameters 7 | @api public 8 | --}} 9 | 10 | {{#if securityDefinitions}} 11 | 12 |

Authentication

13 | 14 | {{#each securityDefinitions}} 15 |
16 |
17 |
18 |

19 | {{@key}} 20 | 21 |

22 | {{#if description}} 23 |
24 | {{md description}} 25 |
26 | {{/if}} 27 |
28 | {{#each this}} 29 | {{#ifin @key "['description','x-spectacle-example']"}} 30 | {{else}} 31 |
32 |
33 |
{{@key}}
34 |
35 |
36 | {{#ifin @key "['scopes']"}} 37 | {{#each this}} 38 | {{@key}} 39 |

{{this}}

40 | {{/each}} 41 | {{else}} 42 | {{this}} 43 | {{/ifin}} 44 |
45 |
46 | {{/ifin}} 47 | {{/each}} 48 |
49 |
50 | {{#if x-spectacle-example}} 51 |
52 |
53 | {{md x-spectacle-example}} 54 |
55 |
56 | {{/if}} 57 |
58 |
59 | {{/each}} 60 | {{/if}} 61 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/forms/_select.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group forms 7 | //// 8 | 9 | /// Background color for select menus. 10 | /// @type Color 11 | $select-background: $white !default; 12 | 13 | /// Color of the dropdown triangle inside select menus. Set to `transparent` to remove it entirely. 14 | /// @type Color 15 | $select-triangle-color: $dark-gray !default; 16 | 17 | /// Default radius for select menus. 18 | /// @type Color 19 | $select-radius: $global-radius !default; 20 | 21 | @mixin form-select { 22 | $height: ($input-font-size * unitless-calc($input-line-height)) + (get-side($input-padding, 'top') + get-side($input-padding, 'bottom')) - rem-calc(1); 23 | 24 | height: $height; 25 | margin: 0 0 $form-spacing; 26 | padding: $input-padding; 27 | 28 | appearance: none; 29 | border: $input-border; 30 | border-radius: $select-radius; 31 | background-color: $select-background; 32 | 33 | font-family: $input-font-family; 34 | font-size: $input-font-size; 35 | font-weight: $input-font-weight; 36 | line-height: $input-line-height; 37 | color: $input-color; 38 | 39 | @if $select-triangle-color != transparent { 40 | @include background-triangle($select-triangle-color); 41 | background-origin: content-box; 42 | background-position: $global-right (-$form-spacing) center; 43 | background-repeat: no-repeat; 44 | background-size: 9px 6px; 45 | 46 | padding-#{$global-right}: ($form-spacing * 1.5); 47 | } 48 | 49 | @if has-value($input-transition) { 50 | transition: $input-transition; 51 | } 52 | 53 | // Focus state 54 | &:focus { 55 | outline: none; 56 | border: $input-border-focus; 57 | background-color: $input-background-focus; 58 | box-shadow: $input-shadow-focus; 59 | 60 | @if has-value($input-transition) { 61 | transition: $input-transition; 62 | } 63 | } 64 | 65 | // Disabled state 66 | &:disabled { 67 | background-color: $input-background-disabled; 68 | cursor: $input-cursor-disabled; 69 | } 70 | 71 | // Hide the dropdown arrow shown in newer IE versions 72 | &::-ms-expand { 73 | display: none; 74 | } 75 | 76 | &[multiple] { 77 | height: auto; 78 | background-image: none; 79 | } 80 | } 81 | 82 | @mixin foundation-form-select { 83 | select { 84 | @include form-select; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dociql", 3 | "version": "1.1.7", 4 | "description": "Generate beautiful static API documentation from GraphQL Schema", 5 | "preferGlobal": true, 6 | "bin": { 7 | "dociql": "bin/dociql.js" 8 | }, 9 | "scripts": { 10 | "build": "node bin/dociql -l eevee.png config.yml", 11 | "publish": "node bin/dociql -l eevee.png -t docs config.yml", 12 | "test": "nyc --lines 85 --reporter=lcovonly --reporter=text-summary mocha && node bin/dociql -l eevee.png config.yml", 13 | "develop": "dociql -d", 14 | "start": "dociql -s" 15 | }, 16 | "repository": { 17 | "type": "git", 18 | "url": "git+https://github.com/wayfair/dociql.git" 19 | }, 20 | "engines": { 21 | "node": ">=8" 22 | }, 23 | "keywords": [ 24 | "graphql", 25 | "docs", 26 | "documentation", 27 | "builder", 28 | "generator" 29 | ], 30 | "author": "Dennis Miasoutov ", 31 | "license": "Apache-2.0", 32 | "bugs": { 33 | "url": "https://github.com/sourcey/dociql/issues" 34 | }, 35 | "homepage": "https://github.com/wayfair/dociql", 36 | "dependencies": { 37 | "bluebird": "3.7.2", 38 | "cheerio": "1.0.0-rc.12", 39 | "clarify": "2.1.0", 40 | "coffeescript": "2.7.0", 41 | "commander": "6.2.1", 42 | "foundation-sites": "6.7.5", 43 | "graphql": "14.7.0", 44 | "graphql-2-json-schema": "0.9.1", 45 | "graphql-json-schema": "0.1.2", 46 | "grunt": "1.5.3", 47 | "grunt-compile-handlebars": "2.0.2", 48 | "grunt-contrib-clean": "2.0.1", 49 | "grunt-contrib-concat": "1.0.1", 50 | "grunt-contrib-connect": "2.1.0", 51 | "grunt-contrib-copy": "1.0.0", 52 | "grunt-contrib-cssmin": "3.0.0", 53 | "grunt-contrib-handlebars": "2.0.0", 54 | "grunt-contrib-jshint": "2.1.0", 55 | "grunt-contrib-uglify": "4.0.1", 56 | "grunt-contrib-watch": "1.1.0", 57 | "grunt-embed": "0.2.1", 58 | "grunt-prettify": "0.4.0", 59 | "grunt-sass": "3.1.0", 60 | "handlebars": "4.7.7", 61 | "highlight.js": "9.18.5", 62 | "js-yaml": "3.14.1", 63 | "json-refs": "3.0.15", 64 | "json-stable-stringify": "1.0.1", 65 | "lodash": "4.17.21", 66 | "marked": "0.8.2", 67 | "node-sass": "6.0.1", 68 | "sync-request": "6.1.0", 69 | "tmp": "0.2.1", 70 | "trace": "3.1.1" 71 | }, 72 | "devDependencies": { 73 | "chai": "4.3.6", 74 | "codecov": "3.8.2", 75 | "mocha": "8.4.0", 76 | "nyc": "14.1.1" 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/grid/_position.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group grid 7 | //// 8 | 9 | /// Reposition a column. 10 | /// 11 | /// @param {Number|Keyword} $position - Direction and amount to move. The column will move equal to the width of the column count specified. A positive number will push the column to the right, while a negative number will pull it to the left. Set to center to center the column. 12 | @mixin grid-column-position($position) { 13 | @if type-of($position) == 'number' { 14 | $offset: percentage($position / $grid-column-count); 15 | 16 | position: relative; 17 | #{$global-left}: $offset; 18 | } 19 | @else if $position == center { 20 | &, &:last-child:not(:first-child) { 21 | float: none; 22 | clear: both; 23 | } 24 | margin-right: auto; 25 | margin-left: auto; 26 | } 27 | @else { 28 | @warn 'Wrong syntax for grid-column-position(). Enter a positive or negative number, or center.'; 29 | } 30 | } 31 | 32 | /// Reset a position definition. 33 | @mixin grid-column-unposition { 34 | position: static; 35 | float: left; 36 | margin-right: 0; 37 | margin-left: 0; 38 | } 39 | 40 | /// Offsets a column to the right by `$n` columns. 41 | /// @param {Number|List} $n - Width to offset by. You can pass in any value accepted by the `grid-column()` mixin, such as `6`, `50%`, or `1 of 2`. 42 | @mixin grid-column-offset($n) { 43 | margin-#{$global-left}: grid-column($n); 44 | } 45 | 46 | /// Disable the default behavior of the last column in a row aligning to the opposite edge. 47 | @mixin grid-column-end { 48 | // This extra specificity is required for the property to be applied 49 | &:last-child:last-child { 50 | float: $global-left; 51 | } 52 | } 53 | 54 | /// Shorthand for `grid-column-position()`. 55 | /// @alias grid-column-position 56 | @mixin grid-col-pos($position) { 57 | @include grid-column-position($position); 58 | } 59 | 60 | /// Shorthand for `grid-column-unposition()`. 61 | /// @alias grid-column-unposition 62 | @mixin grid-col-unpos { 63 | @include grid-column-unposition; 64 | } 65 | 66 | /// Shorthand for `grid-column-offset()`. 67 | /// @alias grid-column-offset 68 | @mixin grid-col-off($n) { 69 | @include grid-column-offset($n); 70 | } 71 | 72 | /// Shorthand for `grid-column-end()`. 73 | /// @alias grid-column-end 74 | @mixin grid-col-end { 75 | @include grid-column-end; 76 | } 77 | -------------------------------------------------------------------------------- /app/views/partials/json-schema/datatype.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | Original work Copyright (c) 2015 Nils Knappmeier 3 | https://github.com/bootprint/bootprint-json-schema 4 | 5 | When properties are renderered this partial renders the datatype of a property, 6 | with a link to the type-definition (in case of a $ref). 7 | Depending on the input, it renders an augmented data-type (e.g. "string[]"), 8 | the 'format'-value (e.g. "date-time") and "enum"-values. 9 | 10 | @param {boolean} discriminator true, this property is a swagger-discriminator (in which case enums are rendered as links) 11 | --}} 12 |
13 | {{~#if $ref}} 14 | {{~>json-schema/reference .}} 15 | {{~else if items.$ref}} 16 | {{~>json-schema/reference .}} 17 | {{~else}} 18 | {{~schemaDatatype .}} 19 | {{~/if}} 20 | {{~#if x-nullable}} 21 | | null 22 | {{~/if}} 23 |
24 | {{~#if format}} 25 | ({{format}}) 26 | {{~/if~}} 27 | 28 | {{!-- Enum values --}} 29 | {{~#if enum}} 30 | 31 | {{#each enum}} 32 | {{! Render enums in the descriminator as links to the appropriate definitions}} 33 | {{~#if ../discriminator}} 34 | {{.}} 35 | {{~else if $ref}} 36 | {{~>json-schema/reference .}} 37 | {{~else}} 38 | {{.}} 39 | {{~/if}}{{#unless @last}},{{/unless}} 40 | {{/each}} 41 | 42 | {{~/if}} 43 | 44 | {{!-- Min and Max values --}} 45 | 46 | {{~schemaRange . ~}} 47 | 48 | 49 | {{!-- Default values --}} 50 | {{~#ifneq default undefined}} 51 | {{~default}} 52 | {{/ifneq}} 53 | 54 | {{#if minLength}} 55 | 56 | {{#if maxLength}} 57 | {{#ifeq minLength maxLength}} 58 | ({{minLength}} chars) 59 | {{else}} 60 | ({{minLength}} to {{maxLength}} chars) 61 | {{/ifeq}} 62 | {{else}} 63 | (at least {{minLength}} chars) 64 | {{/if}} 65 | 66 | {{else}} 67 | {{#if maxLength}} 68 | 69 | (up to {{maxLength}} chars) 70 | 71 | {{/if}} 72 | {{/if}} 73 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/forms/_error.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group abide 7 | //// 8 | 9 | /// Sets if error styles should be added to inputs. 10 | /// @type Boolean 11 | $abide-inputs: true !default; 12 | 13 | /// Sets if error styles should be added to labels. 14 | /// @type Boolean 15 | $abide-labels: true !default; 16 | 17 | /// Background color to use for invalid text inputs. 18 | /// @type Color 19 | $input-background-invalid: get-color(alert) !default; 20 | 21 | /// Color to use for labels of invalid inputs. 22 | /// @type Color 23 | $form-label-color-invalid: get-color(alert) !default; 24 | 25 | /// Default font color for form error text. 26 | /// @type Color 27 | $input-error-color: get-color(alert) !default; 28 | 29 | /// Default font size for form error text. 30 | /// @type Number 31 | $input-error-font-size: rem-calc(12) !default; 32 | 33 | /// Default font weight for form error text. 34 | /// @type Keyword 35 | $input-error-font-weight: $global-weight-bold !default; 36 | 37 | /// Styles the background and border of an input field to have an error state. 38 | /// 39 | /// @param {Color} $background [$alert-color] - Color to use for the background and border. 40 | /// @param {Number} $background-lighten [10%] - Lightness level of the background color. 41 | @mixin form-input-error( 42 | $background: $input-background-invalid, 43 | $background-lighten: 10% 44 | ) { 45 | &:not(:focus) { 46 | border-color: $background; 47 | background-color: mix($background, $white, $background-lighten); 48 | &::placeholder { 49 | color: $background; 50 | } 51 | } 52 | } 53 | 54 | /// Adds error styles to a form element, using the values in the settings file. 55 | @mixin form-error { 56 | display: none; 57 | margin-top: $form-spacing * -0.5; 58 | margin-bottom: $form-spacing; 59 | 60 | font-size: $input-error-font-size; 61 | font-weight: $input-error-font-weight; 62 | color: $input-error-color; 63 | } 64 | 65 | @mixin foundation-form-error { 66 | @if $abide-inputs { 67 | // Error class for invalid inputs 68 | .is-invalid-input { 69 | @include form-input-error; 70 | } 71 | } 72 | 73 | @if $abide-labels { 74 | // Error class for labels of invalid outputs 75 | .is-invalid-label { 76 | color: $form-label-color-invalid; 77 | } 78 | } 79 | 80 | // Form error element 81 | .form-error { 82 | @include form-error; 83 | 84 | &.is-visible { 85 | display: block; 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /bin/dociql.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var program = require('commander'), 4 | package = require('../package'), 5 | spectacle = require('../index.js') 6 | 7 | // 8 | //= Process CLI input 9 | 10 | program.version(package.version) 11 | .usage('[options] ') 12 | .description(package.description) 13 | .option('-C, --disable-css', 'omit CSS generation (default: false)') 14 | .option('-J, --disable-js', 'omit JavaScript generation (default: false)') 15 | .option('-e, --embeddable', 'omit the HTML and generate the documentation content only (default: false)') 16 | .option('-1, --one-file', 'Embed all resources (CSS and JS) into the same file (default: false)') 17 | .option('-d, --development-mode', 'start HTTP server with the file watcher (default: false)') 18 | .option('-D, --development-mode-live', 'start HTTP server with the file watcher and live reload (default: false)') 19 | .option('-s, --start-server', 'start the HTTP server without any development features') 20 | .option('-p, --port ', 'the port number for the HTTP server to listen on (default: 4400)', Number) 21 | .option('-P, --port-live ', 'the port number for the live reload to listen on (default: 4401)', Number) 22 | .option('-t, --target-dir ', 'the target build directory (default: public)', String) 23 | .option('-f, --target-file ', 'the target build HTML file (default: index.html)', String) 24 | .option('-a, --app-dir ', 'the application source directory (default: app)', String) 25 | .option('-l, --logo-file ', 'specify a custom logo file (default: null)', String, null) 26 | .option('-c, --config-file ', 'specify a custom configuration file (default: app/lib/config.js)') 27 | .option('-H, --header
', 'specify a custom auth token for the header (default: none)') 28 | .option('-u, --introspection-url ', 'specify a custom url to use for introspection (default: none)') 29 | .option('-q, --quiet', 'Silence the output from the generator (default: false)') 30 | // .option('-f, --spec-file ', 'the input OpenAPI/Swagger spec file (default: test/fixtures/petstore.json)', String, 'test/fixtures/petstore.json') 31 | .parse(process.argv) 32 | 33 | // Show help if no specfile or options are specified 34 | if (program.args.length < 1) { // && program.rawArgs.length < 1 35 | program.help() 36 | } 37 | 38 | program.specFile = program.args[0]; // || path.resolve(root, 'test/fixtures/cheese.json') 39 | 40 | // Run the main app with parsed options 41 | spectacle(program) 42 | -------------------------------------------------------------------------------- /test/test-reference-contexts.js: -------------------------------------------------------------------------------- 1 | var chai = require("chai"); 2 | var should = chai.should(); 3 | 4 | var contexts = require("../app/lib/reference-contexts.js"); 5 | 6 | /** 7 | * Check that a context function passes one or more paths. 8 | * @param {String} fn the name of a context function. 9 | * @param {Array} paths the paths to check. 10 | */ 11 | function success(fn, paths) { 12 | describe("should match", function() { 13 | paths.forEach(function(ref) { 14 | it(ref, function() { 15 | contexts[fn](ref).should.equal(true, "should have matched "+ref); 16 | }); 17 | }); 18 | }); 19 | } 20 | 21 | /** 22 | * Check that a context function doesn't pass one or more paths. 23 | * @param {String} fn the name of a context function. 24 | * @param {Array} paths the paths to check. 25 | */ 26 | function failure(fn, paths) { 27 | describe("shouldn't match", function() { 28 | paths.forEach(function(ref) { 29 | it(ref, function() { 30 | contexts[fn](ref).should.equal(false, "shouldn't have matched "+ref); 31 | }); 32 | }); 33 | }); 34 | } 35 | 36 | describe("reference-contexts.js", function() { 37 | 38 | describe("responseSchemaDefinition()", function() { 39 | 40 | success("responseSchemaDefinition", [ 41 | "paths/index.html/responses/200/schema/", 42 | ]); 43 | 44 | failure("responseSchemaDefinition", [ 45 | "paths/index.html/schema/", 46 | "paths/index.html/responses/200/test/", 47 | "paths/index.html/responses/", 48 | "definitions/Pet/", 49 | ]); 50 | 51 | }); 52 | 53 | describe("propertyArrayDefinition()", function() { 54 | 55 | success("propertyArrayDefinition", [ 56 | "definitions/Pet/properties/tags/items/", 57 | ]); 58 | 59 | failure("propertyArrayDefinition", [ 60 | "definitions/Pet/", 61 | "definitions/Pet/properties/", 62 | "definitions/Pet/properties/tags/items/$ref/", 63 | ]); 64 | 65 | }); 66 | 67 | describe("definition()", function() { 68 | 69 | success("definition", [ 70 | "paths/index.html/responses/200/schema/", 71 | ]); 72 | 73 | failure("definition", [ 74 | "definitions/Pet/", 75 | ]); 76 | 77 | }); 78 | 79 | describe("path()", function() { 80 | 81 | success("path", [ 82 | "paths/index.html/", 83 | "paths/{part}/", 84 | "paths/{a}-{b}-{c}/", 85 | ]); 86 | 87 | failure("path", [ 88 | "paths/index.html", 89 | "paths/", 90 | "paths", 91 | "paths/index.html/responses/", 92 | ]); 93 | 94 | }); 95 | 96 | }); 97 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/prototype/_font-styling.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | //// 6 | /// @group prototype-font-styling 7 | //// 8 | 9 | /// Responsive breakpoints for font styling types 10 | /// @type Boolean 11 | $prototype-font-breakpoints: $global-prototype-breakpoints !default; 12 | 13 | /// Letter spacing for `.font-wide` 14 | /// @type Number 15 | $prototype-wide-letter-spacing: rem-calc(4) !default; 16 | 17 | /// Default weight for `.font-normal`, defaulted to `global-weight-normal` 18 | /// @type Number 19 | $prototype-font-normal: $global-weight-normal !default; 20 | 21 | /// Default weight for `.font-bold`, defaulted to `global-weight-bold` 22 | /// @type Number 23 | $prototype-font-bold: $global-weight-bold !default; 24 | 25 | /// Font wide letter spacing! 26 | /// @param {Number} $letter-spacing [$prototype-wide-letter-spacing] Wide letter spacing for the font 27 | @mixin font-wide( 28 | $letter-spacing: $prototype-wide-letter-spacing 29 | ) { 30 | letter-spacing: $letter-spacing; 31 | } 32 | 33 | /// Font Weight Normal, default value coming through `global-weight-normal` 34 | /// @param {Number} $weight [$prototype-font-normal] Weight of the font (normal) 35 | @mixin font-normal( 36 | $weight: $prototype-font-normal 37 | ) { 38 | font-weight: $weight; 39 | } 40 | 41 | /// Font Weight Bold, default value coming through `global-weight-bold` 42 | /// @param {Number} $weight [$prototype-font-bold] Weight of the font (bold) 43 | @mixin font-bold( 44 | $weight: $prototype-font-bold 45 | ) { 46 | font-weight: $weight; 47 | } 48 | 49 | /// Font Style Italic 50 | @mixin font-italic { 51 | font-style: italic !important; 52 | } 53 | 54 | @mixin foundation-prototype-font-styling { 55 | .font-wide{ 56 | @include font-wide; 57 | } 58 | 59 | .font-normal { 60 | @include font-normal; 61 | } 62 | 63 | .font-bold { 64 | @include font-bold; 65 | } 66 | 67 | .font-italic { 68 | @include font-italic; 69 | } 70 | 71 | @if ($prototype-font-breakpoints) { 72 | // Loop through Responsive Breakpoints 73 | @each $size in $breakpoint-classes { 74 | @include breakpoint($size) { 75 | @if $size != $-zf-zero-breakpoint { 76 | .#{$size}-font-wide{ 77 | @include font-wide; 78 | } 79 | 80 | .#{$size}-font-normal { 81 | @include font-normal; 82 | } 83 | 84 | .#{$size}-font-bold { 85 | @include font-bold; 86 | } 87 | 88 | .#{$size}-font-italic { 89 | @include font-italic; 90 | } 91 | } 92 | } 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /app/vendor/foundation/scss/typography/_print.scss: -------------------------------------------------------------------------------- 1 | // Foundation for Sites by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | /// If `true`, all elements will have transparent backgrounds when printed, to save on ink. 6 | /// @type Boolean 7 | /// @group global 8 | $print-transparent-backgrounds: true !default; 9 | $print-hrefs: true !default; 10 | 11 | // sass-lint:disable-all 12 | 13 | @mixin foundation-print-styles { 14 | .show-for-print { display: none !important; } 15 | 16 | @media print { 17 | * { 18 | @if $print-transparent-backgrounds { 19 | background: transparent !important; 20 | } 21 | 22 | box-shadow: none !important; 23 | 24 | color: black !important; // Black prints faster: h5bp.com/s 25 | text-shadow: none !important; 26 | } 27 | 28 | .show-for-print { display: block !important; } 29 | .hide-for-print { display: none !important; } 30 | 31 | table.show-for-print { display: table !important; } 32 | thead.show-for-print { display: table-header-group !important; } 33 | tbody.show-for-print { display: table-row-group !important; } 34 | tr.show-for-print { display: table-row !important; } 35 | td.show-for-print { display: table-cell !important; } 36 | th.show-for-print { display: table-cell !important; } 37 | 38 | // Display the URL of a link after the text 39 | a, 40 | a:visited { text-decoration: underline;} 41 | @if $print-hrefs { 42 | a[href]:after { content: ' (' attr(href) ')'; } 43 | } 44 | 45 | // Don't display the URL for images or JavaScript/internal links 46 | .ir a:after, 47 | a[href^='javascript:']:after, 48 | a[href^='#']:after { content: ''; } 49 | 50 | // Display what an abbreviation stands for after the text 51 | abbr[title]:after { content: ' (' attr(title) ')'; } 52 | 53 | // Prevent page breaks in the middle of a blockquote or preformatted text block 54 | pre, 55 | blockquote { 56 | border: 1px solid $dark-gray; 57 | page-break-inside: avoid; 58 | } 59 | 60 | // h5bp.com/t 61 | thead { display: table-header-group; } 62 | 63 | tr, 64 | img { page-break-inside: avoid; } 65 | 66 | img { max-width: 100% !important; } 67 | 68 | @page { margin: 0.5cm; } 69 | 70 | p, 71 | h2, 72 | h3 { 73 | orphans: 3; 74 | widows: 3; 75 | } 76 | 77 | // Avoid page breaks after a heading 78 | h2, 79 | h3 { page-break-after: avoid; } 80 | 81 | // Helper to re-allow page breaks in the middle of certain elements (e.g. pre, blockquote, tr) 82 | .print-break-inside { 83 | page-break-inside: auto; 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /config.yml: -------------------------------------------------------------------------------- 1 | introspection: https://graphql-pokemon2.vercel.app 2 | servers: 3 | - url: https://graphql-pokemon2.vercel.app 4 | description: Test Server 5 | info: 6 | description: | 7 | Welcome to the sample Pokémon API reference. This is a live example of how you can use [DociQL](https://github.com/wayfair/dociql) in conjunction with [GraphQL](https://graphql.org/) to generate beautiful static documentation for your own APIs. 8 | 9 | The Pokémon API is GraphQL API. It's schema can be fetched using introspection query and can be used for generating code, documentations, tests etc. 10 | 11 | GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools. 12 | version: 1.0.0 13 | title: Pokémon API 14 | termsOfService: 'https://graphql-pokemon2.vercel.app/terms' 15 | contact: 16 | email: dmiasoutov@wayfair.com 17 | license: 18 | name: Apache 2.0 19 | url: 'http://www.apache.org/licenses/LICENSE-2.0.html' 20 | domains: 21 | - name: Fetching Pokémons 22 | description: Base methods to fetch pokemon information. 23 | usecases: 24 | - name: Fetch Pokémons 25 | description: Query list of Pokémon 26 | query: query.pokemons 27 | expand: weight,height 28 | - name: Fetch single Pokémon 29 | description: Query any Pokémon by number or name 30 | query: query.pokemon 31 | expand: weight,height 32 | - name: Evolution & Attacks 33 | description: Custom methods to fetch pokemon 34 | usecases: 35 | - name: Query Attack Rating 36 | description: Query Pokémon 37 | query: query.pokemon 38 | select: id name 39 | expand: attacks,fast,special 40 | - name: Query Evolutions 41 | description: Query Pokémon evolutions 42 | query: query.pokemon 43 | select: id name 44 | expand: evolutions 45 | # securityDefinitions: 46 | # cheesy_auth: 47 | # type: oauth2 48 | # authorizationUrl: 'http://cheesy.sourcey.com/api/oauth/dialog' 49 | # description: Provides OAuth access to the cheese 50 | # flow: implicit 51 | # scopes: 52 | # 'write:cheeses': Modify cheeses in your account 53 | # 'read:cheeses': Read your cheeses 54 | # api_key: 55 | # type: apiKey 56 | # name: api_key 57 | # description: Provides API Key access to the cheese 58 | # in: header 59 | # externalDocs: 60 | # description: Find out more about Swagger 61 | # url: 'http://swagger.io' 62 | --------------------------------------------------------------------------------