Commit 29f194a9 authored by dsudheesh's avatar dsudheesh

Modifications to README.txt, added LICENSE.txt, added full swagger_ui library...

Modifications to README.txt, added LICENSE.txt, added full swagger_ui library and changes to file paths
parent 1ac09da5
\ No newline at end of file
......@@ -6,7 +6,8 @@ Introduction
This module provides a field formatter for file fields with allowed file types
as json or yml, which renders the uploaded json or yml file using the Swagger UI
if the uploaded json or yml file is a valid swagger file.
if the uploaded json or yml file is a valid swagger file. This module uses the
Swagger UI Library available at
* text eol=lf
src/**/*.ttf binary
dist/**/*.js binary
dist/**/*.ttf binary
dist/**/*.map binary
dist/**/*.eot binary
dist/**/*.svg binary
dist/**/*.ttf binary
dist/**/*.woff binary
dist/**/*.woff2 binary
dist/**/*.png binary
dist/*.html text
src/main/html/images/*.png binary
\ No newline at end of file
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": false,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"validthis": true,
"globals": {
// Libraries
"_": false,
"$": false,
"Backbone": false,
"Handlebars": false,
"jQuery": false,
"marked": false,
"SwaggerClient": false,
"hljs": false,
"SwaggerUi": false,
"define": false,
// Global object
// TODO: remove these
"Docs": false
\ No newline at end of file
sudo: false
language: node_js
- '4.2'
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- npm i -g jshint
- npm install
SwaggerUI uses [SwaggerJS]( library for many internal operations. If you see errors in swagger-client.js code, you should probably open the issue in [SwaggerJS]( repository.
Please open issues related to OpenAPI Specifications in [OpenAPI Specs]( repository.
# swagger-ui-builder -
# Container for building the swagger-ui static site
# Build: docker build -t swagger-ui-builder .
# Run: docker run -v $PWD/dist:/build/dist swagger-ui-builder
FROM ubuntu:14.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y git npm nodejs openjdk-7-jre
RUN ln -s /usr/bin/nodejs /usr/local/bin/node
WORKDIR /build
ADD package.json /build/package.json
RUN npm install
ADD . /build
CMD ./node_modules/gulp/bin/gulp.js serve
Copyright 2016 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at [](
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
This diff is collapsed.
"name": "swagger-ui",
"main": "dist/index.html",
"authors": [
"Mohsen Azimi <>"
"description": "Swagger UI",
"moduleType": [
"keywords": [
"license": "Copyright 2016 SmartBear Software",
"homepage": "",
"private": true,
"ignore": [
<!DOCTYPE html>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="icon" type="image/png" href="images/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="images/favicon-16x16.png" sizes="16x16" />
<link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
<link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>
<script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
<script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
<script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
<script src='lib/' type='text/javascript'></script>
<script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>
<script src='lib/underscore-min.js' type='text/javascript'></script>
<script src='lib/backbone-min.js' type='text/javascript'></script>
<script src='swagger-ui.js' type='text/javascript'></script>
<script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
<script src='lib/marked.js' type='text/javascript'></script>
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
<!-- Some basic translations -->
<!-- <script src='lang/translator.js' type='text/javascript'></script> -->
<!-- <script src='lang/ru.js' type='text/javascript'></script> -->
<!-- <script src='lang/en.js' type='text/javascript'></script> -->
<script type="text/javascript">
$(function () {
var url =[^&]+)/);
if (url && url.length > 1) {
url = decodeURIComponent(url[1]);
} else {
url = "";
// Pre load translate...
if(window.SwaggerTranslator) {
window.swaggerUi = new SwaggerUi({
url: url,
dom_id: "swagger-ui-container",
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
onComplete: function(swaggerApi, swaggerUi){
if(typeof initOAuth == "function") {
clientId: "your-client-id",
clientSecret: "your-client-secret-if-required",
realm: "your-realms",
appName: "your-app-name",
scopeSeparator: ",",
additionalQueryStringParams: {}
if(window.SwaggerTranslator) {
$('pre code').each(function(i, e) {
onFailure: function(data) {
log("Unable to Load SwaggerUI");
docExpansion: "none",
jsonEditor: false,
apisSorter: "alpha",
defaultModelRendering: 'schema',
showRequestHeaders: false
function addApiKeyAuthorization(){
var key = encodeURIComponent($('#input_apiKey')[0].value);
if(key && key.trim() != "") {
var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization("api_key", key, "query");
window.swaggerUi.api.clientAuthorizations.add("api_key", apiKeyAuth);
log("added key " + key);
// if you have an apiKey you would like to pre-populate on the page for demonstration purposes...
var apiKey = "myApiKeyXXXX123456789";
function log() {
if ('console' in window) {
console.log.apply(console, arguments);
<body class="swagger-section">
<div id='header'>
<div class="swagger-ui-wrap">
<a id="logo" href="">swagger</a>
<form id='api_selector'>
<div class='input'><input placeholder="" id="input_baseUrl" name="baseUrl" type="text"/></div>
<div class='input'><input placeholder="api_key" id="input_apiKey" name="apiKey" type="text"/></div>
<div class='input'><a id="explore" href="#" data-sw-translate>Explore</a></div>
<div id="message-bar" class="swagger-ui-wrap" data-sw-translate>&nbsp;</div>
<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
'use strict';
/* jshint quotmark: double */
"Warning: Deprecated":"Warning: Deprecated",
"Implementation Notes":"Implementation Notes",
"Response Class":"Response Class",
"Parameter Type":"Parameter Type",
"Data Type":"Data Type",
"Response Messages":"Response Messages",
"HTTP Status Code":"HTTP Status Code",
"Response Model":"Response Model",
"Request URL":"Request URL",
"Response Body":"Response Body",
"Response Code":"Response Code",
"Response Headers":"Response Headers",
"Hide Response":"Hide Response",
"Try it out!":"Try it out!",
"List Operations":"List Operations",
"Expand Operations":"Expand Operations",
"can't parse JSON. Raw result":"can't parse JSON. Raw result",
"Model Schema":"Model Schema",
"Click to set as parameter value":"Click to set as parameter value",
"Terms of service":"Terms of service",
"Created by":"Created by",
"See more at":"See more at",
"Contact the developer":"Contact the developer",
"api version":"api version",
"Response Content Type":"Response Content Type",
"Parameter content type:":"Parameter content type:",
"fetching resource":"fetching resource",
"fetching resource list":"fetching resource list",
"Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis",
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Can't read from server. It may not have the appropriate access-control-origin settings.",
"Please specify the protocol for":"Please specify the protocol for",
"Can't read swagger JSON from":"Can't read swagger JSON from",
"Finished Loading Resource Information. Rendering Swagger UI":"Finished Loading Resource Information. Rendering Swagger UI",
"Unable to read api":"Unable to read api",
"from path":"from path",
"server returned":"server returned"
'use strict';
/* jshint quotmark: double */
"Warning: Deprecated":"Advertencia: Obsoleto",
"Implementation Notes":"Notas de implementación",
"Response Class":"Clase de la Respuesta",
"Parameter Type":"Tipo del Parámetro",
"Data Type":"Tipo del Dato",
"Response Messages":"Mensajes de la Respuesta",
"HTTP Status Code":"Código de Status HTTP",
"Response Model":"Modelo de la Respuesta",
"Request URL":"URL de la Solicitud",
"Response Body":"Cuerpo de la Respuesta",
"Response Code":"Código de la Respuesta",
"Response Headers":"Encabezados de la Respuesta",
"Hide Response":"Ocultar Respuesta",
"Try it out!":"Pruébalo!",
"List Operations":"Listar Operaciones",
"Expand Operations":"Expandir Operaciones",
"can't parse JSON. Raw result":"no puede parsear el JSON. Resultado crudo",
"Model Schema":"Esquema del Modelo",
"Username":"Nombre de usuario",
"Terms of service":"Términos de Servicio",
"Created by":"Creado por",
"See more at":"Ver más en",
"Contact the developer":"Contactar al desarrollador",
"api version":"versión de la api",
"Response Content Type":"Tipo de Contenido (Content Type) de la Respuesta",
"fetching resource":"buscando recurso",
"fetching resource list":"buscando lista del recurso",
"Show Swagger Petstore Example Apis":"Mostrar Api Ejemplo de Swagger Petstore",
"Can't read from server. It may not have the appropriate access-control-origin settings.":"No se puede leer del servidor. Tal vez no tiene la configuración de control de acceso de origen (access-control-origin) apropiado.",
"Please specify the protocol for":"Por favor, especificar el protocola para",
"Can't read swagger JSON from":"No se puede leer el JSON de swagger desde",
"Finished Loading Resource Information. Rendering Swagger UI":"Finalizada la carga del recurso de Información. Mostrando Swagger UI",
"Unable to read api":"No se puede leer la api",
"from path":"desde ruta",
"server returned":"el servidor retornó"
'use strict';
/* jshint quotmark: double */
"Warning: Deprecated":"Avertissement : Obsolète",
"Implementation Notes":"Notes d'implementation",
"Response Class":"Classe de la réponse",
"Parameter Type":"Type du paramètre",
"Data Type":"Type de données",
"Response Messages":"Messages de la réponse",
"HTTP Status Code":"Code de statut HTTP",
"Response Model":"Modèle de réponse",
"Request URL":"URL appelée",
"Response Body":"Corps de la réponse",
"Response Code":"Code de la réponse",
"Response Headers":"En-têtes de la réponse",
"Hide Response":"Cacher la réponse",
"Try it out!":"Testez !",
"List Operations":"Liste des opérations",
"Expand Operations":"Développer les opérations",
"can't parse JSON. Raw result":"impossible de décoder le JSON. Résultat brut",
"Model Schema":"Définition du modèle",
"Username":"Nom d'utilisateur",
"Password":"Mot de passe",
"Terms of service":"Conditions de service",
"Created by":"Créé par",
"See more at":"Voir plus sur",
"Contact the developer":"Contacter le développeur",
"api version":"version de l'api",
"Response Content Type":"Content Type de la réponse",
"fetching resource":"récupération de la ressource",
"fetching resource list":"récupération de la liste de ressources",
"Show Swagger Petstore Example Apis":"Montrer les Apis de l'exemple Petstore de Swagger",
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Impossible de lire à partir du serveur. Il se peut que les réglages access-control-origin ne soient pas appropriés.",
"Please specify the protocol for":"Veuillez spécifier un protocole pour",
"Can't read swagger JSON from":"Impossible de lire le JSON swagger à partir de",
"Finished Loading Resource Information. Rendering Swagger UI":"Chargement des informations terminé. Affichage de Swagger UI",
"Unable to read api":"Impossible de lire l'api",
"from path":"à partir du chemin",
"server returned":"réponse du serveur"
'use strict';
/* jshint quotmark: double */
"Warning: Deprecated":"Attenzione: Deprecato",
"Implementation Notes":"Note di implementazione",
"Response Class":"Classe della risposta",
"Parameter Type":"Tipo di parametro",
"Data Type":"Tipo di dato",
"Response Messages":"Messaggi della risposta",
"HTTP Status Code":"Codice stato HTTP",
"Response Model":"Modello di risposta",
"Request URL":"URL della richiesta",
"Response Body":"Corpo della risposta",
"Response Code":"Oggetto della risposta",
"Response Headers":"Intestazioni della risposta",
"Hide Response":"Nascondi risposta",
"Try it out!":"Provalo!",
"List Operations":"Mostra operazioni",
"Expand Operations":"Espandi operazioni",
"Raw":"Grezzo (raw)",
"can't parse JSON. Raw result":"non è possibile parsare il JSON. Risultato grezzo (raw).",
"Model Schema":"Schema del modello",
"Username":"Nome utente",
"Terms of service":"Condizioni del servizio",
"Created by":"Creato da",
"See more at":"Informazioni aggiuntive:",
"Contact the developer":"Contatta lo sviluppatore",
"api version":"versione api",
"Response Content Type":"Tipo di contenuto (content type) della risposta",
"fetching resource":"recuperando la risorsa",
"fetching resource list":"recuperando lista risorse",
"Show Swagger Petstore Example Apis":"Mostra le api di esempio di Swagger Petstore",
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Non è possibile leggere dal server. Potrebbe non avere le impostazioni di controllo accesso origine (access-control-origin) appropriate.",
"Please specify the protocol for":"Si prega di specificare il protocollo per",
"Can't read swagger JSON from":"Impossibile leggere JSON swagger da:",
"Finished Loading Resource Information. Rendering Swagger UI":"Lettura informazioni risorse termianta. Swagger UI viene mostrata",
"Unable to read api":"Impossibile leggere la api",
"from path":"da cartella",
"server returned":"il server ha restituito"
'use strict';
/* jshint quotmark: double */
"Warning: Deprecated":"警告: 廃止予定",
"Implementation Notes":"実装メモ",
"Response Class":"レスポンスクラス",
"Parameter Type":"パラメータタイプ",
"Data Type":"データタイプ",