Skip to content

Commit

Permalink
Merge pull request #30 from nci-ats/feat/swagger-ui
Browse files Browse the repository at this point in the history
Initial version of swagger-ui API documentation
  • Loading branch information
brianfunk authored Feb 17, 2017
2 parents 352e5c6 + 2aea9b5 commit a69a49c
Show file tree
Hide file tree
Showing 52 changed files with 26,582 additions and 9 deletions.
1 change: 1 addition & 0 deletions public/css/print.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/css/reset.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions public/css/screen.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file added public/css/typography.css
Empty file.
Binary file added public/fonts/DroidSans-Bold.ttf
Binary file not shown.
Binary file added public/fonts/DroidSans.ttf
Binary file not shown.
Binary file added public/images/.DS_Store
Binary file not shown.
Binary file added public/images/collapse.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/expand.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/explorer_icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/favicon.ico
Binary file not shown.
Binary file added public/images/fs_bw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/pet_store_api.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/throbber.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/wordnik_api.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 98 additions & 9 deletions public/index.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,104 @@

<html>
<head>
<title>FS ePermit API</title>
<meta charset="UTF-8">
<meta http-equiv="x-ua-compatible" content="IE=edge">
<title>US Forest Service ePermit Middlelayer API</title>
<link rel="icon" type="image/png" href="images/favicon.ico" sizes="32x32" />
<link rel="icon" type="image/png" href="images/favicon.ico" 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/object-assign-pollyfill.js' type='text/javascript'></script>
<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/jquery.ba-bbq.min.js' type='text/javascript'></script>
<script src='lib/handlebars-4.0.5.js' type='text/javascript'></script>
<script src='lib/lodash.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.9.1.0.pack.js' type='text/javascript'></script>
<script src='lib/highlight.9.1.0.pack_extended.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 = window.location.search.match(/url=([^&]+)/);
var baseUrl = 'swagger.json';
if (url && url.length > 1) {
url = decodeURIComponent(url[1]);
} else {
url = baseUrl;
}

hljs.configure({
highlightSizeThreshold: 5000
});

// Pre load translate...
if(window.SwaggerTranslator) {
window.SwaggerTranslator.translate();
}
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") {
initOAuth({
clientId: "your-client-id",
clientSecret: "your-client-secret-if-required",
realm: "your-realms",
appName: "your-app-name",
scopeSeparator: " ",
additionalQueryStringParams: {}
});
}

if(window.SwaggerTranslator) {
window.SwaggerTranslator.translate();
}
},
onFailure: function(data) {
log("Unable to Load SwaggerUI");
},
docExpansion: "list",
jsonEditor: false,
defaultModelRendering: 'schema',
showRequestHeaders: false,
showOperationIds: false
});

window.swaggerUi.load();

function log() {
if ('console' in window) {
console.log.apply(console, arguments);
}
}
});
</script>
</head>
<body>
<header>
</header>
<main>
<strong>FS ePermit API</strong>
</main>
<footer>
</footer>

<body class="swagger-section">
<div id='header'>
<div class="swagger-ui-wrap">
<a id="logo" href="/"><img class="logo__img" alt="swagger" height="50" width="50" src="images/fs_bw.png" /><span class="logo__title">US Forest Service ePermit Middlelayer API</span></a>
</div>
</div>

<div id="message-bar" class="swagger-ui-wrap" data-sw-translate>&nbsp;</div>
<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
</body>
</html>
53 changes: 53 additions & 0 deletions public/lang/ca.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
'use strict';

/* jshint quotmark: double */
window.SwaggerTranslator.learn({
"Warning: Deprecated":"Advertència: Obsolet",
"Implementation Notes":"Notes d'implementació",
"Response Class":"Classe de la Resposta",
"Status":"Estatus",
"Parameters":"Paràmetres",
"Parameter":"Paràmetre",
"Value":"Valor",
"Description":"Descripció",
"Parameter Type":"Tipus del Paràmetre",
"Data Type":"Tipus de la Dada",
"Response Messages":"Missatges de la Resposta",
"HTTP Status Code":"Codi d'Estatus HTTP",
"Reason":"Raó",
"Response Model":"Model de la Resposta",
"Request URL":"URL de la Sol·licitud",
"Response Body":"Cos de la Resposta",
"Response Code":"Codi de la Resposta",
"Response Headers":"Capçaleres de la Resposta",
"Hide Response":"Amagar Resposta",
"Try it out!":"Prova-ho!",
"Show/Hide":"Mostrar/Amagar",
"List Operations":"Llista Operacions",
"Expand Operations":"Expandir Operacions",
"Raw":"Cru",
"can't parse JSON. Raw result":"no puc analitzar el JSON. Resultat cru",
"Example Value":"Valor d'Exemple",
"Model Schema":"Esquema del Model",
"Model":"Model",
"apply":"aplicar",
"Username":"Nom d'usuari",
"Password":"Contrasenya",
"Terms of service":"Termes del servei",
"Created by":"Creat per",
"See more at":"Veure més en",
"Contact the developer":"Contactar amb el desenvolupador",
"api version":"versió de la api",
"Response Content Type":"Tipus de Contingut de la Resposta",
"fetching resource":"recollint recurs",
"fetching resource list":"recollins llista de recursos",
"Explore":"Explorant",
"Show Swagger Petstore Example Apis":"Mostrar API d'Exemple Swagger Petstore",
"Can't read from server. It may not have the appropriate access-control-origin settings.":"No es pot llegir del servidor. Potser no teniu la configuració de control d'accés apropiada.",
"Please specify the protocol for":"Si us plau, especifiqueu el protocol per a",
"Can't read swagger JSON from":"No es pot llegir el JSON de swagger des de",
"Finished Loading Resource Information. Rendering Swagger UI":"Finalitzada la càrrega del recurs informatiu. Renderitzant Swagger UI",
"Unable to read api":"No es pot llegir l'api",
"from path":"des de la ruta",
"server returned":"el servidor ha retornat"
});
56 changes: 56 additions & 0 deletions public/lang/el.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
'use strict';

/* jshint quotmark: double */
window.SwaggerTranslator.learn({
"Warning: Deprecated":"Προειδοποίηση: Έχει αποσυρθεί",
"Implementation Notes":"Σημειώσεις Υλοποίησης",
"Response Class":"Απόκριση",
"Status":"Κατάσταση",
"Parameters":"Παράμετροι",
"Parameter":"Παράμετρος",
"Value":"Τιμή",
"Description":"Περιγραφή",
"Parameter Type":"Τύπος Παραμέτρου",
"Data Type":"Τύπος Δεδομένων",
"Response Messages":"Μηνύματα Απόκρισης",
"HTTP Status Code":"Κωδικός Κατάστασης HTTP",
"Reason":"Αιτιολογία",
"Response Model":"Μοντέλο Απόκρισης",
"Request URL":"URL Αιτήματος",
"Response Body":"Σώμα Απόκρισης",
"Response Code":"Κωδικός Απόκρισης",
"Response Headers":"Επικεφαλίδες Απόκρισης",
"Hide Response":"Απόκρυψη Απόκρισης",
"Headers":"Επικεφαλίδες",
"Try it out!":"Δοκιμάστε το!",
"Show/Hide":"Εμφάνιση/Απόκρυψη",
"List Operations":"Λίστα Λειτουργιών",
"Expand Operations":"Ανάπτυξη Λειτουργιών",
"Raw":"Ακατέργαστο",
"can't parse JSON. Raw result":"αδυναμία ανάλυσης JSON. Ακατέργαστο αποτέλεσμα",
"Example Value":"Παράδειγμα Τιμής",
"Model Schema":"Σχήμα Μοντέλου",
"Model":"Μοντέλο",
"Click to set as parameter value":"Πατήστε για να θέσετε τιμή παραμέτρου",
"apply":"εφαρμογή",
"Username":"Όνομα χρήση",
"Password":"Κωδικός πρόσβασης",
"Terms of service":"Όροι χρήσης",
"Created by":"Δημιουργήθηκε από",
"See more at":"Δείτε περισσότερα στο",
"Contact the developer":"Επικοινωνήστε με τον προγραμματιστή",
"api version":"έκδοση api",
"Response Content Type":"Τύπος Περιεχομένου Απόκρισης",
"Parameter content type:":"Τύπος περιεχομένου παραμέτρου:",
"fetching resource":"παραλαβή πόρου",
"fetching resource list":"παραλαβή λίστας πόρων",
"Explore":"Εξερεύνηση",
"Show Swagger Petstore Example Apis":"Εμφάνιση Api Δειγμάτων Petstore του Swagger",
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Αδυναμία ανάγνωσης από τον εξυπηρετητή. Μπορεί να μην έχει κατάλληλες ρυθμίσεις για access-control-origin.",
"Please specify the protocol for":"Παρακαλώ προσδιορίστε το πρωτόκολλο για",
"Can't read swagger JSON from":"Αδυναμία ανάγνωσης swagger JSON από",
"Finished Loading Resource Information. Rendering Swagger UI":"Ολοκλήρωση Φόρτωσης Πληροφορικών Πόρου. Παρουσίαση Swagger UI",
"Unable to read api":"Αδυναμία ανάγνωσης api",
"from path":"από το μονοπάτι",
"server returned":"ο εξυπηρετηρής επέστρεψε"
});
56 changes: 56 additions & 0 deletions public/lang/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
'use strict';

/* jshint quotmark: double */
window.SwaggerTranslator.learn({
"Warning: Deprecated":"Warning: Deprecated",
"Implementation Notes":"Implementation Notes",
"Response Class":"Response Class",
"Status":"Status",
"Parameters":"Parameters",
"Parameter":"Parameter",
"Value":"Value",
"Description":"Description",
"Parameter Type":"Parameter Type",
"Data Type":"Data Type",
"Response Messages":"Response Messages",
"HTTP Status Code":"HTTP Status Code",
"Reason":"Reason",
"Response Model":"Response Model",
"Request URL":"Request URL",
"Response Body":"Response Body",
"Response Code":"Response Code",
"Response Headers":"Response Headers",
"Hide Response":"Hide Response",
"Headers":"Headers",
"Try it out!":"Try it out!",
"Show/Hide":"Show/Hide",
"List Operations":"List Operations",
"Expand Operations":"Expand Operations",
"Raw":"Raw",
"can't parse JSON. Raw result":"can't parse JSON. Raw result",
"Example Value":"Example Value",
"Model Schema":"Model Schema",
"Model":"Model",
"Click to set as parameter value":"Click to set as parameter value",
"apply":"apply",
"Username":"Username",
"Password":"Password",
"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",
"Explore":"Explore",
"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"
});
53 changes: 53 additions & 0 deletions public/lang/es.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
'use strict';

/* jshint quotmark: double */
window.SwaggerTranslator.learn({
"Warning: Deprecated":"Advertencia: Obsoleto",
"Implementation Notes":"Notas de implementación",
"Response Class":"Clase de la Respuesta",
"Status":"Status",
"Parameters":"Parámetros",
"Parameter":"Parámetro",
"Value":"Valor",
"Description":"Descripción",
"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",
"Reason":"Razón",
"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!",
"Show/Hide":"Mostrar/Ocultar",
"List Operations":"Listar Operaciones",
"Expand Operations":"Expandir Operaciones",
"Raw":"Crudo",
"can't parse JSON. Raw result":"no puede parsear el JSON. Resultado crudo",
"Example Value":"Valor de Ejemplo",
"Model Schema":"Esquema del Modelo",
"Model":"Modelo",
"apply":"aplicar",
"Username":"Nombre de usuario",
"Password":"Contraseña",
"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",
"Explore":"Explorar",
"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ó"
});
Loading

0 comments on commit a69a49c

Please sign in to comment.