Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
653fedb
Merge branch 'master' into fix/null-node-error
zakhenry Oct 31, 2017
43d5d10
Merge pull request #94 from svisser/fix_typos_cheese_store
auscaster Nov 13, 2017
0abdf7d
Merge pull request #92 from zakhenry/fix/null-node-error
auscaster Nov 13, 2017
b26073b
Bump version 0.9.12
auscaster Nov 13, 2017
81377d4
Fix a broken test. Fixed #106
ogis-yyamano Nov 30, 2017
94a6816
Fix typos in test/fixtures/cheese.yml.
ogis-yyamano Nov 30, 2017
3f2b595
Print default value even if it is 0 or empty. Fixed #103
yyamano Nov 30, 2017
1e87387
Merge pull request #107 from yyamano/issue-106
auscaster Nov 30, 2017
02074ea
Merge pull request #108 from yyamano/fix-typo
auscaster Nov 30, 2017
8538ebb
Merge pull request #109 from yyamano/issue-103
auscaster Dec 4, 2017
571fce3
Bump version
auscaster Dec 4, 2017
9f01551
Make some tests pass on Windows.
ogis-yyamano Dec 1, 2017
72bd343
file separator police for improving windows support.
ogis-yyamano Dec 5, 2017
667b309
Merge pull request #110 from yyamano/win
auscaster Dec 5, 2017
4a3f12a
Make npm build work without global installation.
yyamano Dec 7, 2017
2a63611
Merge pull request #111 from yyamano/fix-build
auscaster Dec 7, 2017
0745d8a
Show enum values in response. Fixed #69.
yyamano Dec 7, 2017
9e54d12
Add a spec file to test. Taken from #69 with some modifications.
yyamano Dec 9, 2017
cbab96b
Fix indent. Non functional change.
ogis-yyamano Dec 20, 2017
61b27c0
Improve log messages.
ogis-yyamano Dec 20, 2017
4c272f1
Make parameters rendering more complete
yetithefoot Jan 11, 2018
4071cf8
Update _layout.scss
yetithefoot Jan 11, 2018
8be8778
Update parameters.hbs
yetithefoot Jan 11, 2018
f4738a2
Update parameters.hbs
yetithefoot Jan 11, 2018
a691223
Add spectacle extension x-spectacle-articles
yetithefoot Jan 12, 2018
af95f4d
add Articles to content
yetithefoot Jan 12, 2018
4a8c343
Create x-spectacle-articles.hbs
yetithefoot Jan 12, 2018
6cf523d
Make table rendering more readable
yetithefoot Jan 12, 2018
7ec345e
Update swaggerCollectionFormat.js
yetithefoot Jan 12, 2018
5986693
Ad topics to navigation sidebar
yetithefoot Jan 12, 2018
2673c21
Add topics to content page
yetithefoot Jan 12, 2018
c7d8242
rename x-spectacle-articles to x-spectacle-topics
yetithefoot Jan 12, 2018
3d2d4eb
Merge pull request #116 from yetithefoot/master
auscaster Jan 13, 2018
de5fa3e
Merge pull request #115 from yyamano/log
auscaster Jan 13, 2018
f389c64
Merge pull request #112 from yyamano/issue-69
auscaster Jan 13, 2018
0ccd8d8
use htmlId to build links instead of extra name property
yetithefoot Jan 15, 2018
9fef15e
allow to hide security definitions rendering
yetithefoot Jan 17, 2018
43ad20b
specify x-spectacle-hide property to control rendering
yetithefoot Jan 17, 2018
992c7d1
Merge pull request #117 from yetithefoot/master
auscaster Jan 17, 2018
d447d0b
Merge pull request #100 from zakhenry/feat/display-response-headers
auscaster Jan 17, 2018
e3853be
Add an OpenAPI spec file for #98.
yyamano Jan 30, 2018
51c6fc9
Add https://github.com/sourcey/spectacle/files/1678647/swagger.json.z…
ogis-yyamano Feb 1, 2018
68dba56
Add link to #98.
ogis-yyamano Feb 1, 2018
1757305
POC for #98
ogis-yyamano Feb 1, 2018
33f1882
Adding quiet option
dmgarland Mar 15, 2018
e297fb9
Release 0.9.14
auscaster Mar 20, 2018
c78cf37
Fix rendering of remote file references
auscaster Mar 20, 2018
fccdd0a
Release 0.9.15
auscaster Mar 20, 2018
f5d74c2
Merge pull request #125 from dmgarland/master
auscaster Mar 20, 2018
88b9217
Require Node.js >= 8
auscaster Mar 20, 2018
c7a4f8b
Release 1.0.0
auscaster Mar 20, 2018
e11adc7
Fix #122 and #126 markdown rendering issues
auscaster Mar 21, 2018
c49339f
Release 1.0.1
auscaster Mar 21, 2018
9a4bab2
Make this work on Windows with spec files outside the current directory.
ogis-yyamano Dec 7, 2017
d7e68b9
Improve comment. Non functional change.
ogis-yyamano Dec 20, 2017
198d545
Merge pull request #127 from yyamano/win
auscaster Mar 22, 2018
07f609e
Update security partial
auscaster Mar 22, 2018
c50bd06
Release 1.0.2
auscaster Mar 22, 2018
0758fcb
x-nullable support
schursin Mar 22, 2018
bdf2846
Merge pull request #128 from schursin/master
auscaster Mar 22, 2018
ff1ac52
support of $ref in parameters and responses
schursin Mar 23, 2018
1f088a4
Merge pull request #131 from schursin/master
auscaster Mar 23, 2018
c88e0f0
development mode with live reload support
schursin Mar 23, 2018
b5d859c
schema syntax errors reporting in development mode
schursin Mar 23, 2018
6b03e34
Merge pull request #133 from schursin/issue-67
auscaster Mar 23, 2018
7f09317
Merge pull request #132 from schursin/master
auscaster Mar 23, 2018
9f8e407
support description for enum definitions
schursin Mar 29, 2018
9d0d3d1
Add support for displaying nested objects and arrays in definitions
Apr 12, 2018
016e5ef
Added support for resource embedding
Apr 12, 2018
b3bb546
Merge pull request #137 from noliran/issue-98
auscaster Apr 15, 2018
6c039f5
Merge pull request #138 from noliran/support-for-resource-embedding
auscaster Apr 15, 2018
1b8b058
Merge pull request #135 from schursin/issue-119
auscaster Apr 15, 2018
35387af
Release 1.0.3
auscaster Apr 15, 2018
43dbba6
Update dockerfile to work with new baseimage
ptte Jun 11, 2018
4dadab3
Merge pull request #152 from ptte/spectacle-docker-file-update
auscaster Jun 12, 2018
f363b95
Allow x-spectacle-topic to have examples
itsmefox Jun 27, 2018
2d8fee3
Change position of type in request parameters
itsmefox Jun 27, 2018
4f6128d
Merge pull request #154 from patrickboesch/x-spectacle-topics_advanced
auscaster Jun 27, 2018
31d956e
Merge pull request #155 from patrickboesch/change-property-type-position
auscaster Jun 27, 2018
5f9a3b5
Works around grunt-sass dependency problem
TheIDCo-ScottLeckie Jun 29, 2018
2c48b61
Merge pull request #157 from TheIDCo-ScottLeckie/master
auscaster Jul 1, 2018
52dca06
Update to grunt-saas 3.0 #156
auscaster Jul 1, 2018
7754372
Release 1.0.4
auscaster Jul 1, 2018
c448c63
Update Grunt dependencies
auscaster Jul 2, 2018
624f681
Release 1.0.5
auscaster Jul 2, 2018
325ba4a
Fixed README that references an old file that does not exist in this …
m0un10 Aug 21, 2018
8026b60
Update LICENCE
auscaster Sep 19, 2018
b0c1a52
Release 1.0.6
auscaster Sep 19, 2018
1237e04
Update dependencies & fix tests
martwz Oct 16, 2018
ef946b7
Fix deprecated $header-sizes warning
martwz Oct 16, 2018
916baec
Resolve app dir path to fix #165.
ogis-yyamano Oct 19, 2018
d227ffd
Merge pull request #169 from martinxxD/dev-update-dependencies
auscaster Nov 28, 2018
fe65455
Merge pull request #171 from yyamano/issue-165
auscaster Nov 28, 2018
af8f5ef
Merge pull request #170 from martinxxD/dev-fix-depreciated-warning
auscaster Nov 28, 2018
220c048
Merge pull request #163 from craigbarrau/patch-1
auscaster Nov 28, 2018
c54bf1e
fix href with multiple dots
lionelvillard Nov 29, 2018
a37005d
yaml example support
lionelvillard Jul 12, 2018
4c6b529
Translate : to - in hrefs
Jan 9, 2019
865fd30
Fixed overflow of code blocks
Jan 30, 2019
19426d7
Merge pull request #180 from kellycampbell/fix_href_colonchar
auscaster Jan 30, 2019
2155a62
Merge pull request #177 from lionelvillard/fixhref
auscaster Jan 30, 2019
21252e9
Merge pull request #160 from lionelvillard/yaml
auscaster Jan 30, 2019
46dc681
Merge pull request #182 from paulotokimatu/fix/code-block-overflow
auscaster Jan 30, 2019
378f89e
Release 1.0.7
auscaster Jan 30, 2019
b0b88a1
remove cache in resolve references since files change often
huttotw Mar 6, 2019
44fa1e4
Fix displaying a response examples
Apr 4, 2019
9c3141c
Fix typo
Apr 5, 2019
a37e50a
Merge pull request #186 from elyesbenabdelkader/fix-display-response-…
auscaster Apr 8, 2019
f747888
Update common.js
auscaster Apr 8, 2019
17e9f0c
fix conflicts
huttotw Apr 8, 2019
1feb924
Merge pull request #185 from huttotw/master
auscaster Apr 9, 2019
d9d15f5
Fixed #141 by adding support for $ref based circular reference support
Jun 28, 2019
c7233ec
Merge pull request #190 from tommyschnabel/master
auscaster Jun 29, 2019
1c2fce7
Bump handlebars from 4.0.12 to 4.3.0
dependabot[bot] Dec 27, 2019
f817d8b
fix example rendering
Jan 29, 2020
dfca985
Merge pull request #198 from Damokl3s/fix-example-render
auscaster Feb 26, 2020
777e7ce
Merge pull request #197 from sourcey/dependabot/npm_and_yarn/handleba…
auscaster Feb 26, 2020
a80d989
Bump js-yaml from 3.12.0 to 3.13.1
dependabot[bot] Feb 26, 2020
ac9183c
Bump lodash from 4.17.11 to 4.17.13
dependabot[bot] Feb 26, 2020
18fcadc
Bump marked from 0.5.1 to 0.6.1
dependabot[bot] Feb 26, 2020
31658d4
Bump fstream from 1.0.11 to 1.0.12
dependabot[bot] Feb 26, 2020
8fea330
Bump lodash.mergewith from 4.6.1 to 4.6.2
dependabot[bot] Feb 26, 2020
17cab7d
Merge pull request #203 from sourcey/dependabot/npm_and_yarn/lodash.m…
auscaster Feb 26, 2020
8fffe42
Merge pull request #202 from sourcey/dependabot/npm_and_yarn/fstream-…
auscaster Feb 26, 2020
6fcbd86
Merge pull request #201 from sourcey/dependabot/npm_and_yarn/marked-0…
auscaster Feb 26, 2020
0194d03
Merge pull request #200 from sourcey/dependabot/npm_and_yarn/lodash-4…
auscaster Feb 26, 2020
c92c6b1
Merge pull request #199 from sourcey/dependabot/npm_and_yarn/js-yaml-…
auscaster Feb 26, 2020
f3b3271
Release 1.1.0
auscaster Mar 10, 2020
564f4ed
Update node-sass to 4.14.1
May 19, 2020
2775912
Merge pull request #205 from ahmed-abdallah/update-node-sass
auscaster May 21, 2020
0802dec
Updated and installed dependencies
MatheusCamelucci Jul 7, 2021
e2165fd
Fixed code issues due the dependencies update
MatheusCamelucci Jul 7, 2021
daba405
Fixed commander options parse bug
MatheusCamelucci Jul 7, 2021
3257da5
Merge pull request #224 from MatheusCamelucci/fix/dependencies
auscaster Aug 9, 2021
1f42b11
Bump grunt from 1.4.1 to 1.5.3
dependabot[bot] May 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
*cache
*.log
node_modules
.history
.idea
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:7.5.0-alpine
FROM node:8-alpine
MAINTAINER Kam Low <hello@sourcey.com>

USER 0
WORKDIR /opt

RUN apk update \
&& apk add git vim curl wget \
&& rm -rf /var/cache/apk/* \
&& npm install -g spectacle-docs
RUN apk add --no-cache \
nodejs nodejs-npm g++ \
python python-dev

RUN npm install --unsafe-perm -g spectacle-docs
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2015-2017 Kam Low
Code from bootprint-openapi and bootprint-json-schema Copyright (c) 2015 Nils Knappmeier

MIT License

Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
NAME := sourcey/spectacle
VERSION := $$(git describe --tags `git rev-list --tags --max-count=1`)

build:
docker build -t ${NAME}:latest -t ${NAME}:v${VERSION} .

push:
@echo ${NAME}
@docker push ${NAME}

login:
@docker log -u ${DOCKER_USER} -p ${DOCKER_PASS}
46 changes: 30 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ See a demo of Spectacle in action here: [http://cheesestore.github.io](http://ch
* **OpenAPI/Swagger 2.0 support**: Support for the latest OpenAPI/Swagger specification.
* **Highly configurable**: Easily configurable Handlebars templates and SCSS styles so you can add your own design and flavour without going bald. See [Custom Builds](#custom-builds)
* **Markdown support**: Render markdown written in any of your API descriptions.
* **Remote file references**: Support for swagger specs split across multiple files.
* **Clean responsive design**: Responsive HTML5 and CSS3 layout built with [Foundation 6](http://foundation.zurb.com/sites.html) that looks great on all devices and screen sizes.
* **Embed into your existing website**: An embedded option so that generate partial docs without a HTML `<body>` for convenient integration into your existing website.
* **Live preview developer mode**: Development mode that starts a local HTTP server with a file watcher and live reload so you can preview live changes in your browser as you update your spec.
Expand All @@ -40,14 +41,14 @@ Next pass your `swagger.json` document use the CLI to generate your documentatio
spectacle -d your_swagger_api.json

# Or use the cheese.json example to test it out
# spectacle -d -l test/fixtures/cheese.png test/fixtures/cheese.json
# spectacle -d -l test/fixtures/cheese.png test/fixtures/cheese.yml
```

Your generated documentation will be located in the `public` directory by default. You can either copy the generated HTML to your web server, or view your docs by pointing your browser to [http://localhost:4400/](http://localhost:4400/).

### Docker

A basic Docker script is included that allows Spectacle to be run from the inside, not outside. It's useful, for instance, in a Gitlab CI pipeline. Thanks @alexeiaguiar.
[Docker](https://hub.docker.com/r/sourcey/spectacle/) images are included that allow Spectacle to be run from the inside. It's useful, for instance, in a Gitlab CI pipeline. Thanks @alexeiaguiar.

How to use it: `docker run -it sourcey/spectacle /bin/sh`

Expand All @@ -62,24 +63,28 @@ $ spectacle -h

Options:

-h, --help output usage information
-V, --version output the version number
-C, --disable-css omit CSS generation (default: false)
-J, --disable-js omit JavaScript generation (default: false)
-e, --embeddable omit the HTML <body/> and generate the documentation content only (default: false)
-d, --development-mode start HTTP server with the file watcher and live reload (default: false)
-s, --start-server start the HTTP server without any development features
-p, --port <dir> the port number for the HTTP server to listen on (default: 4400)
-t, --target-dir <dir> the target build directory (default: public)
-f, --target-file <file> the target build HTML file (default: index.html)
-a, --app-dir <dir> the application source directory (default: app)
-l, --logo-file <file> specify a custom logo file (default: null)
-c, --config-file <file> specify a custom configuration file (default: app/lib/config.js)
-h, --help output usage information
-V, --version output the version number
-C, --disable-css omit CSS generation (default: false)
-J, --disable-js omit JavaScript generation (default: false)
-e, --embeddable omit the HTML <body/> and generate the documentation content only (default: false)
-d, --development-mode start HTTP server with the file watcher (default: false)
-D, --development-mode-live start HTTP server with the file watcher and live reload (default: false)
-s, --start-server start the HTTP server without any development features
-p, --port <port> the port number for the HTTP server to listen on (default: 4400)
-P, --port-live <port> the port number for the live reload to listen on (default: 4401)
-t, --target-dir <dir> the target build directory (default: public)
-f, --target-file <file> the target build HTML file (default: index.html)
-a, --app-dir <dir> the application source directory (default: app)
-l, --logo-file <file> specify a custom logo file (default: null)
-c, --config-file <file> specify a custom configuration file (default: app/lib/config.js)
```

Most options are self explanatory, but the following options warrant some further explanation:

* **--development-mode** `-d`: This option starts a development server with a file watcher and live reload, and will automatically regenerate your docs when any of your spec or app files change.
* **--development-mode** `-d`: This option starts a development server with a file watcher, and will automatically regenerate your docs when any of your spec or app files change.

* **--development-mode-live** `-D`: This option starts a development server with a file watcher and live reload, and will automatically regenerate your docs when any of your spec or app files change.

* **--start-server** `-s`: This option starts a production server without any development options enabled that serves the contents of your `--target-dir`.

Expand Down Expand Up @@ -131,6 +136,15 @@ Some parts of testing can be configured using environment variables.

Include environment variables before calling `npm test`. For example, `OFFLINE` mode can be enabled via `OFFLINE=true npm test`.


<!-- ## Contributors

Thanks to all the great developers who make Spectacle great!

TODO
-->


## More Information

More info is available on the [Spectacle homepage](http://sourcey.com/spectacle).
Expand Down
7 changes: 7 additions & 0 deletions app/helpers/equal.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2015 Nils Knappmeier
* https://github.com/bootprint/bootprint-openapi
*
* @license MIT
**/

/**
* Checks whether two values a equal as in (==)
* @param value1
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/htmlId.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
* is not addressed by this helper.
*/
module.exports = function(value) {
return value.replace(/[^A-Za-z0-9-_:.]/g, "-")
return value.replace(/[^A-Za-z0-9-_.]/g, "-")
};
7 changes: 7 additions & 0 deletions app/helpers/httpResponseCode.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2015 Nils Knappmeier
* https://github.com/bootprint/bootprint-openapi
*
* @license MIT
**/

module.exports = function(code) {
// Comments refer to the section number in rfc2616
// If an rfc number is specified, the code is
Expand Down
1 change: 1 addition & 0 deletions app/helpers/md.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var common = require('../lib/common')
* markdown, rendered as HTML.
*/
module.exports = function(value, options) {
value = value + ''
var html = common.markdown(value, options.hash ? options.hash.stripParagraph : false)
return new Handlebars.SafeString(html)
};
4 changes: 2 additions & 2 deletions app/helpers/printExample.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
var Handlebars = require('handlebars')
var common = require('../lib/common')

module.exports = function(value, options) {
module.exports = function(value, options) {
var cloned = common.formatExample(value, options.data.root, options.hash)
if (!cloned)
return '';
var html = common.printSchema(cloned)
var html = common.printSchema(cloned, options.hash.yaml === true)
return new Handlebars.SafeString(html)
};
23 changes: 15 additions & 8 deletions app/helpers/schemaDatatype.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
/**
* Copyright (c) 2015 Nils Knappmeier
* https://github.com/bootprint/bootprint-openapi
*
* @license MIT
**/

/**
* Returns a descriptive string for a datatype
* @param value
* @returns {String} a string like <code>string[]</code> or <code>object[][]</code>
*/
module.exports = function (value) {
return dataType(value)
};
}

function dataType(value) {
// console.log('dataType', value)
if (!value) return null;
if (!value) return null
if (typeof value === 'string') {
throw 'invalid value'
}
if (value['anyOf'] || value['allOf'] || value['oneOf']) {
return '';
return ''
}
if (!value.type) {
return 'object';
return 'object'
}
if (value.type === 'array') {
if (!value.items) {
return 'array';
return 'array'
}
if (value.items.type) {
return dataType(value.items) + '[]';
return dataType(value.items) + '[]'
} else {
return 'object[]';
return 'object[]'
}
}
return value.type;
return value.type
}
16 changes: 11 additions & 5 deletions app/helpers/schemaRange.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
var util = require('util')
/**
* Copyright (c) 2015 Nils Knappmeier
* https://github.com/bootprint/bootprint-openapi
*
* @license MIT
**/

/**
*
Expand All @@ -10,12 +16,12 @@ var util = require('util')
* @param {Handlebars} engine the current handlebars engine
*/
module.exports = function(range, options) {
var hasMinimum = range.minimum || range.minimum === 0;
var hasMaximum = range.maximum || range.maximum === 0;
var hasMinimum = range.minimum || range.minimum === 0
var hasMaximum = range.maximum || range.maximum === 0

if (!hasMinimum && !hasMaximum) {
// There is no range
return "";
return ""
}

if (hasMinimum && !hasMaximum) {
Expand All @@ -41,7 +47,7 @@ module.exports = function(range, options) {
range.maximum)
}

// var numberSet = "";
// var numberSet = ""
// if (range.type === "integer") {
// numberSet = "\u2208 \u2124" // ELEMENT OF - DOUBLE-STRUCK CAPITAL Z
// } else if (range.type === "number") {
Expand All @@ -67,4 +73,4 @@ module.exports = function(range, options) {
// range.maximumExclusive ? "<" : "\u2264",
// range.maximum)
// }
};
}
10 changes: 10 additions & 0 deletions app/helpers/schemaReferenceContext.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var common = require('../lib/common');

/**
* Resolve a (local) json schema $ref and replace context to referenced object.
* @param reference
* @param options
*/
module.exports = function(reference, options) {
return options.fn(reference ? common.resolveSchemaReference(reference, options.data.root) : this);
};
18 changes: 18 additions & 0 deletions app/helpers/schemaReferenceHref.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
var common = require('../lib/common')

/**
* Build href links for local and remote references.
* @param reference
*/
module.exports = function(reference, options) {
if (reference.indexOf('#') === 0) {
// local references
return reference
}
else {
// remote references
var path = ' #definition-'
path += require('./htmlId')(reference)
return path
}
};
17 changes: 12 additions & 5 deletions app/helpers/swaggerCollectionFormat.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
/**
* Copyright (c) 2015 Nils Knappmeier
* https://github.com/bootprint/bootprint-openapi
*
* @license MIT
**/

module.exports = function(value, paramName) {
return {
'csv': 'comma separated (`' + paramName + '=aaa,bbb`)',
'ssv': 'space separated (`' + paramName + '=aaa bbb`)',
'tsv': 'tab separated (`' + paramName + '=aaa\\tbbb`)',
'pipes': 'pipe separated (`' + paramName + '=aaa|bbb`)',
'multi': 'multiple parameters (`' + paramName + '=aaa&' + paramName + '=bbb`)'
'csv': 'Array values passed separated by comma: `?' + paramName + '=aaa,bbb`',
'ssv': 'Array values passed separated by space: `?' + paramName + '=aaa bbb`',
'tsv': 'Array values passed separated by tab: `?' + paramName + '=aaa\\tbbb`',
'pipes': 'Array values passed separated by pipe: `?' + paramName + '=aaa|bbb`',
'multi': 'Array values passed as multiple parameters: `?' + paramName + '=aaa&' + paramName + '=bbb`'
}[value]
};
7 changes: 7 additions & 0 deletions app/helpers/swaggerEndpoint.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2015 Nils Knappmeier
* https://github.com/bootprint/bootprint-openapi
*
* @license MIT
**/

module.exports = function(options) {
var data = options.data.root;
var endpoint = 'http';
Expand Down
2 changes: 1 addition & 1 deletion app/javascripts/traverse.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Traverse.prototype._events = function() {

this.$element.on('click', 'a[href^="#"]', function(e) { //'click.zf.traverse'
e.preventDefault();
var arrival = this.getAttribute('href').replace(".", "\\."),
var arrival = this.getAttribute('href').replace(/\./g, "\\."),
scrollPos = $(arrival).offset().top - _this.options.barOffset; // - _this.options.threshold / 2 - _this.options.barOffset;

$body.stop(true).animate({
Expand Down
Loading