├── .gitignore ├── LICENSE ├── README.md ├── pom.xml └── src ├── main ├── java │ └── com │ │ └── raibledesigns │ │ └── camel │ │ ├── AbstractRouteBuilder.java │ │ ├── Application.java │ │ ├── config │ │ ├── AppConfig.java │ │ ├── CamelConfig.java │ │ └── SwaggerConfig.java │ │ └── hello │ │ ├── HelloWorld.java │ │ └── HelloWorldRoute.java └── resources │ ├── application.properties │ ├── log4j2.xml │ ├── static │ ├── 401.html │ ├── 404.html │ ├── 500.html │ ├── css │ │ └── main.css │ ├── docs │ │ ├── css │ │ │ ├── reset.css │ │ │ └── screen.css │ │ ├── images │ │ │ ├── explorer_icons.png │ │ │ ├── logo_small.png │ │ │ ├── pet_store_api.png │ │ │ ├── rd-logo.png │ │ │ ├── throbber.gif │ │ │ └── wordnik_api.png │ │ ├── index.html │ │ ├── lib │ │ │ ├── backbone-min.js │ │ │ ├── handlebars-1.0.0.js │ │ │ ├── highlight.7.3.pack.js │ │ │ ├── jquery-1.8.0.min.js │ │ │ ├── jquery.ba-bbq.min.js │ │ │ ├── jquery.slideto.min.js │ │ │ ├── jquery.wiggle.min.js │ │ │ ├── shred.bundle.js │ │ │ ├── shred │ │ │ │ └── content.js │ │ │ ├── swagger-client.js │ │ │ ├── swagger-oauth.js │ │ │ ├── swagger.js │ │ │ └── underscore-min.js │ │ ├── o2c.html │ │ ├── swagger-ui.js │ │ └── swagger-ui.min.js │ └── index.html │ └── templates │ └── mail │ └── error.ftl └── site └── site.xml /.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse 2 | .classpath 3 | .project 4 | .settings/ 5 | 6 | # Intellij 7 | .idea/ 8 | *.iml 9 | *.ipr 10 | *.iws 11 | 12 | # Mac 13 | .DS_Store 14 | 15 | # Maven 16 | log/ 17 | target/ 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Camel REST + Swagger 2 | 3 | An example application that shows how to configure Camel with Spring JavaConfig and Camel's Swagger 4 | support with no web.xml. 5 | 6 | ## Quick Start 7 | 8 | This project is built with [Spring Boot](http://projects.spring.io/spring-boot/) and uses 9 | [Apache Camel](http://camel.apache.org) for its REST API. 10 | 11 | To run this project use: 12 | 13 | mvn spring-boot:run 14 | 15 | Then navigate to [http://localhost:8080/docs/index.html](http://localhost:8080/docs/index.html) to 16 | see the Swagger documentation. 17 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 4.0.0 6 | 7 | com.raibledesigns.camel 8 | camel-rest-swagger 9 | war 10 | 1.0-SNAPSHOT 11 | 12 | Camel REST + Swagger 13 | 14 | Camel with Spring JavaConfig and Camel's Swagger support with no web.xml 15 | 16 | http://www.raibledesigns.com 17 | 18 | 19 | 3.1.0 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-parent 25 | 1.2.3.RELEASE 26 | 27 | 28 | 29 | scm:git:git@github.com:mraible/camel-rest-swagger.git 30 | scm:git:git@github.com:mraible/camel-rest-swagger.git 31 | https://github.com/mraible/camel-rest-swagger 32 | 33 | 34 | 35 | UTF-8 36 | UTF-8 37 | 2.15.2 38 | 2.0.1 39 | 1.8 40 | 3.1.0 41 | 42 | 43 | 44 | install 45 | 46 | 47 | org.codehaus.mojo 48 | build-helper-maven-plugin 49 | 1.9 50 | 51 | 52 | reserve-network-port 53 | pre-integration-test 54 | 55 | reserve-network-port 56 | 57 | 58 | 59 | tomcat.http.port 60 | 61 | 62 | 63 | 64 | 65 | 66 | org.codehaus.mojo 67 | cobertura-maven-plugin 68 | 69 | 70 | 71 | **/model/*.class 72 | 73 | 74 | 75 | 76 | 2.6 77 | 78 | 79 | org.apache.maven.plugins 80 | maven-resources-plugin 81 | 2.6 82 | 83 | UTF-8 84 | 85 | 86 | 87 | org.apache.maven.plugins 88 | maven-war-plugin 89 | 2.4 90 | 91 | false 92 | 93 | 94 | 95 | org.apache.tomcat.maven 96 | tomcat7-maven-plugin 97 | 2.2 98 | 99 | / 100 | 101 | 102 | /console 103 | io.hawt 104 | hawtio-web 105 | 1.4.21 106 | war 107 | true 108 | 109 | 110 | 111 | 112 | 113 | start-tomcat 114 | pre-integration-test 115 | 116 | run 117 | 118 | 119 | true 120 | ${tomcat.http.port} 121 | 122 | 123 | 124 | stop-tomcat 125 | post-integration-test 126 | 127 | shutdown 128 | 129 | 130 | 131 | 132 | 133 | org.apache.maven.plugins 134 | maven-surefire-plugin 135 | 2.17 136 | 137 | 138 | **/*IT*.java 139 | 140 | 141 | **/*Tests.java 142 | **/*Test.java 143 | 144 | 145 | 146 | 147 | org.apache.maven.plugins 148 | maven-failsafe-plugin 149 | 2.17 150 | 151 | 152 | **/*IT*.java 153 | 154 | 155 | ${tomcat.http.port} 156 | 157 | 158 | 159 | 160 | 161 | integration-test 162 | verify 163 | 164 | 165 | 166 | 167 | 168 | org.springframework.boot 169 | spring-boot-maven-plugin 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | org.springframework.boot 178 | spring-boot-starter-actuator 179 | 180 | 181 | org.springframework.boot 182 | spring-boot-starter-logging 183 | 184 | 185 | 186 | 187 | org.springframework.boot 188 | spring-boot-starter-tomcat 189 | provided 190 | 191 | 192 | org.springframework.boot 193 | spring-boot-starter-web 194 | 195 | 196 | 197 | 198 | org.apache.camel 199 | camel-core 200 | ${camel.version} 201 | 202 | 203 | org.apache.camel 204 | camel-spring 205 | ${camel.version} 206 | 207 | 208 | org.apache.camel 209 | camel-spring-javaconfig 210 | ${camel.version} 211 | 212 | 213 | org.apache.camel 214 | camel-freemarker 215 | ${camel.version} 216 | 217 | 218 | org.apache.camel 219 | camel-jackson 220 | ${camel.version} 221 | 222 | 223 | org.apache.camel 224 | camel-mail 225 | ${camel.version} 226 | 227 | 228 | org.apache.camel 229 | camel-metrics 230 | ${camel.version} 231 | 232 | 233 | org.apache.camel 234 | camel-sql 235 | ${camel.version} 236 | 237 | 238 | org.apache.camel 239 | camel-servlet 240 | ${camel.version} 241 | 242 | 243 | org.apache.camel 244 | camel-swagger 245 | ${camel.version} 246 | 247 | 248 | 249 | 250 | com.h2database 251 | h2 252 | 253 | 254 | 255 | 256 | javax.inject 257 | javax.inject 258 | 1 259 | 260 | 261 | 262 | 263 | org.apache.logging.log4j 264 | log4j-jcl 265 | ${log4j.version} 266 | 267 | 268 | org.apache.logging.log4j 269 | log4j-slf4j-impl 270 | ${log4j.version} 271 | 272 | 273 | org.apache.logging.log4j 274 | log4j-web 275 | ${log4j.version} 276 | 277 | 278 | 279 | joda-time 280 | joda-time 281 | 282 | 283 | commons-dbcp 284 | commons-dbcp 285 | 286 | 287 | 288 | 289 | org.springframework.boot 290 | spring-boot-starter-test 291 | test 292 | 293 | 294 | org.springframework.boot 295 | spring-boot-starter-logging 296 | 297 | 298 | 299 | 300 | org.apache.camel 301 | camel-test 302 | ${camel.version} 303 | test 304 | 305 | 306 | org.apache.camel 307 | camel-test-spring 308 | ${camel.version} 309 | test 310 | 311 | 312 | org.projectlombok 313 | lombok 314 | 1.12.2 315 | provided 316 | 317 | 318 | 319 | 320 | 321 | 322 | org.codehaus.mojo 323 | cobertura-maven-plugin 324 | 2.6 325 | 326 | 327 | maven-javadoc-plugin 328 | 2.9.1 329 | 330 | 331 | maven-jxr-plugin 332 | 2.3 333 | 334 | 335 | maven-pmd-plugin 336 | 337 | true 338 | 1.6 339 | 340 | 3.0.1 341 | 342 | 343 | maven-surefire-report-plugin 344 | 2.16 345 | 346 | 347 | 348 | maven-project-info-reports-plugin 349 | 2.7 350 | 351 | false 352 | 353 | 354 | 355 | org.codehaus.mojo 356 | taglist-maven-plugin 357 | 2.4 358 | 359 | 360 | 361 | 362 | 363 | 364 | mraible 365 | Matt Raible 366 | matt@raibledesigns.com 367 | Raible Designs 368 | http://raibledesigns.com 369 | -7 370 | 371 | 372 | 373 | -------------------------------------------------------------------------------- /src/main/java/com/raibledesigns/camel/AbstractRouteBuilder.java: -------------------------------------------------------------------------------- 1 | package com.raibledesigns.camel; 2 | 3 | import org.apache.camel.Exchange; 4 | import org.apache.camel.builder.RouteBuilder; 5 | import org.springframework.beans.factory.annotation.Value; 6 | 7 | /** 8 | * Base class for routes. Contains global exception handler. 9 | */ 10 | public abstract class AbstractRouteBuilder extends RouteBuilder { 11 | 12 | @Value("${camel.env}") 13 | private String camelEnv; 14 | 15 | @Value("${camel.alert.email}") 16 | private String camelAlertEmail; 17 | 18 | /** 19 | * Default exception handling for all routes. 20 | * 21 | * @throws Exception 22 | */ 23 | @Override 24 | public void configure() throws Exception { 25 | onException(Exception.class) 26 | .setHeader("routeId", property(Exchange.FAILURE_ROUTE_ID)) 27 | .setHeader("endpoint", property(Exchange.FAILURE_ENDPOINT)) 28 | .setHeader("exception", property(Exchange.EXCEPTION_CAUGHT)) 29 | .setHeader("subject", simple("Camel Error (" + camelEnv + ") - ${exception.class.simpleName}")) 30 | .transform(simple("${exception.message}\n\nStacktrace Details:\n\n${exception.stacktrace}")) 31 | .to("freemarker:/templates/mail/error.ftl") 32 | .to("smtp://{{mail.host}}?contentType=text/plain&to=" + camelAlertEmail + 33 | "&from={{mail.from}}&subject=${headers.subject})"); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/raibledesigns/camel/Application.java: -------------------------------------------------------------------------------- 1 | package com.raibledesigns.camel; 2 | 3 | import org.apache.camel.component.servlet.CamelHttpTransportServlet; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 6 | import org.springframework.boot.builder.SpringApplicationBuilder; 7 | import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer; 8 | import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer; 9 | import org.springframework.boot.context.embedded.ErrorPage; 10 | import org.springframework.boot.context.embedded.ServletRegistrationBean; 11 | import org.springframework.boot.context.web.SpringBootServletInitializer; 12 | import org.springframework.context.annotation.Bean; 13 | import org.springframework.context.annotation.ComponentScan; 14 | import org.springframework.context.annotation.Configuration; 15 | import org.springframework.http.HttpStatus; 16 | 17 | @Configuration 18 | @ComponentScan 19 | @EnableAutoConfiguration 20 | public class Application extends SpringBootServletInitializer { 21 | private static final String CAMEL_URL_MAPPING = "/api/*"; 22 | private static final String CAMEL_SERVLET_NAME = "CamelServlet"; 23 | 24 | public static void main(String[] args) { 25 | SpringApplication.run(Application.class, args); 26 | } 27 | 28 | @Override 29 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { 30 | return application.sources(Application.class); 31 | } 32 | 33 | @Bean 34 | public ServletRegistrationBean servletRegistrationBean() { 35 | ServletRegistrationBean registration = 36 | new ServletRegistrationBean(new CamelHttpTransportServlet(), CAMEL_URL_MAPPING); 37 | registration.setName(CAMEL_SERVLET_NAME); 38 | return registration; 39 | } 40 | 41 | @Bean 42 | public EmbeddedServletContainerCustomizer containerCustomizer() { 43 | return new EmbeddedServletContainerCustomizer() { 44 | @Override 45 | public void customize(ConfigurableEmbeddedServletContainer container) { 46 | ErrorPage error401Page = new ErrorPage(HttpStatus.UNAUTHORIZED, "/401.html"); 47 | ErrorPage error404Page = new ErrorPage(HttpStatus.NOT_FOUND, "/404.html"); 48 | ErrorPage error500Page = new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/500.html"); 49 | 50 | container.addErrorPages(error401Page, error404Page, error500Page); 51 | } 52 | }; 53 | } 54 | } -------------------------------------------------------------------------------- /src/main/java/com/raibledesigns/camel/config/AppConfig.java: -------------------------------------------------------------------------------- 1 | package com.raibledesigns.camel.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.ComponentScan; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.context.annotation.PropertySource; 7 | import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; 8 | 9 | /** 10 | * JavaConfig for Spring Beans. 11 | */ 12 | @Configuration 13 | @ComponentScan("com.raibledesigns.camel.config") 14 | @PropertySource("classpath:application.properties") 15 | public class AppConfig { 16 | 17 | @Bean 18 | public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { 19 | return new PropertySourcesPlaceholderConfigurer(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/raibledesigns/camel/config/CamelConfig.java: -------------------------------------------------------------------------------- 1 | package com.raibledesigns.camel.config; 2 | 3 | import org.apache.camel.CamelContext; 4 | import org.apache.camel.component.metrics.routepolicy.MetricsRoutePolicyFactory; 5 | import org.apache.camel.component.properties.PropertiesComponent; 6 | import org.apache.camel.processor.interceptor.Tracer; 7 | import org.apache.camel.spring.javaconfig.CamelConfiguration; 8 | import org.springframework.beans.factory.annotation.Value; 9 | import org.springframework.context.annotation.Bean; 10 | import org.springframework.context.annotation.ComponentScan; 11 | import org.springframework.context.annotation.Configuration; 12 | 13 | @Configuration 14 | @ComponentScan("com.raibledesigns.camel") 15 | public class CamelConfig extends CamelConfiguration { 16 | @Value("${logging.trace.enabled}") 17 | private Boolean tracingEnabled; 18 | 19 | @Override 20 | protected void setupCamelContext(CamelContext camelContext) throws Exception { 21 | PropertiesComponent pc = new PropertiesComponent(); 22 | pc.setLocation("classpath:application.properties"); 23 | camelContext.addComponent("properties", pc); 24 | // see if trace logging is turned on 25 | if (tracingEnabled) { 26 | camelContext.setTracing(true); 27 | } 28 | 29 | // enable performance metrics: http://www.davsclaus.com/2014/09/more-metrics-in-apache-camel-214.html 30 | camelContext.addRoutePolicyFactory(new MetricsRoutePolicyFactory()); 31 | 32 | super.setupCamelContext(camelContext); 33 | } 34 | 35 | @Bean 36 | public Tracer camelTracer() { 37 | Tracer tracer = new Tracer(); 38 | tracer.setTraceExceptions(false); 39 | tracer.setTraceInterceptors(true); 40 | tracer.setLogName("com.raibledesigns.com.api.trace"); 41 | return tracer; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/raibledesigns/camel/config/SwaggerConfig.java: -------------------------------------------------------------------------------- 1 | package com.raibledesigns.camel.config; 2 | 3 | import org.apache.camel.component.swagger.DefaultCamelSwaggerServlet; 4 | import org.springframework.boot.bind.RelaxedPropertyResolver; 5 | import org.springframework.boot.context.embedded.ServletRegistrationBean; 6 | import org.springframework.context.EnvironmentAware; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | import org.springframework.core.env.Environment; 10 | 11 | import java.util.HashMap; 12 | import java.util.Map; 13 | 14 | @Configuration 15 | public class SwaggerConfig implements EnvironmentAware { 16 | 17 | private RelaxedPropertyResolver propertyResolver; 18 | 19 | @Override 20 | public void setEnvironment(Environment environment) { 21 | this.propertyResolver = new RelaxedPropertyResolver(environment, "swagger."); 22 | } 23 | 24 | /** 25 | * Swagger Camel Configuration 26 | */ 27 | @Bean 28 | public ServletRegistrationBean swaggerServlet() { 29 | ServletRegistrationBean swagger = new ServletRegistrationBean(new DefaultCamelSwaggerServlet(), "/api-docs/*"); 30 | Map params = new HashMap<>(); 31 | params.put("base.path", "http://localhost:8080/api"); 32 | params.put("api.title", propertyResolver.getProperty("title")); 33 | params.put("api.description", propertyResolver.getProperty("description")); 34 | params.put("api.termsOfServiceUrl", propertyResolver.getProperty("termsOfServiceUrl")); 35 | params.put("api.license", propertyResolver.getProperty("license")); 36 | params.put("api.licenseUrl", propertyResolver.getProperty("licenseUrl")); 37 | swagger.setInitParameters(params); 38 | return swagger; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/raibledesigns/camel/hello/HelloWorld.java: -------------------------------------------------------------------------------- 1 | package com.raibledesigns.camel.hello; 2 | 3 | import lombok.Data; 4 | 5 | import javax.xml.bind.annotation.XmlRootElement; 6 | 7 | @Data 8 | @XmlRootElement(name = "hello") 9 | public class HelloWorld { 10 | private String message; 11 | } -------------------------------------------------------------------------------- /src/main/java/com/raibledesigns/camel/hello/HelloWorldRoute.java: -------------------------------------------------------------------------------- 1 | package com.raibledesigns.camel.hello; 2 | 3 | import com.raibledesigns.camel.AbstractRouteBuilder; 4 | import org.apache.camel.builder.RouteBuilder; 5 | import org.apache.camel.model.rest.RestBindingMode; 6 | import org.springframework.stereotype.Component; 7 | 8 | @Component 9 | public class HelloWorldRoute extends AbstractRouteBuilder { 10 | @Override 11 | public void configure() throws Exception { 12 | super.configure(); 13 | 14 | // servlet is configured in Application.java 15 | restConfiguration().component("servlet").bindingMode(RestBindingMode.json); 16 | 17 | rest("/say") 18 | .get("/hello").outType(HelloWorld.class) 19 | .to("direct:talk"); 20 | from("direct:talk") 21 | .process(exchange -> { 22 | HelloWorld hw = new HelloWorld(); 23 | hw.setMessage("Howdy!"); 24 | exchange.getIn().setBody(hw); 25 | }); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | mail.from=camel-api@raibledesigns.com 2 | mail.host=localhost 3 | 4 | logging.trace.enabled=false 5 | 6 | camel.alert.email=matt@raibledesigns.com 7 | camel.env=localhost 8 | 9 | # Swagger 10 | swagger.title = Camel REST API 11 | swagger.description = A modern API for modern developers. 12 | swagger.termsOfServiceUrl = https://help.github.com/articles/github-terms-of-service/ 13 | swagger.contact = 14 | swagger.license = Apache 2.0 15 | swagger.licenseUrl = http://www.apache.org/licenses/LICENSE-2.0.html -------------------------------------------------------------------------------- /src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /var/log/camel-api 5 | %d %p %c: %m%n 6 | 1 MB 7 | 10 8 | 9 | 10 | 11 | 12 | 13 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/resources/static/401.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Not Authorized 6 | 7 | 8 | 9 |
10 |

Not Authorized

11 |

Sorry, but you are not authorized to view this page.

12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main/resources/static/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page Not Found 6 | 7 | 8 | 9 |
10 |

Not found :(

11 |

Sorry, but the page you were trying to view does not exist.

12 |

It looks like this was the result of either:

13 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/resources/static/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Server Error 6 | 7 | 8 | 9 |
10 |

Server Error

11 |

Sorry, but there was an error with the server that prevented this page from being displayed.

12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main/resources/static/css/main.css: -------------------------------------------------------------------------------- 1 | 2 | ::-moz-selection { 3 | background: #b3d4fc; 4 | text-shadow: none; 5 | } 6 | 7 | ::selection { 8 | background: #b3d4fc; 9 | text-shadow: none; 10 | } 11 | 12 | html { 13 | padding: 30px 10px; 14 | font-size: 20px; 15 | line-height: 1.4; 16 | color: #737373; 17 | background: #f0f0f0; 18 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 19 | -webkit-text-size-adjust: 100%; 20 | -ms-text-size-adjust: 100%; 21 | } 22 | 23 | body { 24 | max-width: 550px; 25 | _width: 550px; 26 | padding: 30px 20px 50px; 27 | border: 1px solid #b3b3b3; 28 | border-radius: 4px; 29 | margin: 0 auto; 30 | box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff; 31 | background: #fcfcfc; 32 | } 33 | 34 | h1 { 35 | margin: 0 10px; 36 | font-size: 50px; 37 | text-align: center; 38 | } 39 | 40 | h1 span { 41 | color: #bbb; 42 | } 43 | 44 | h3 { 45 | margin: 1.5em 0 0.5em; 46 | } 47 | 48 | p { 49 | margin: 1em 0; 50 | } 51 | 52 | ul { 53 | padding: 0 0 0 40px; 54 | margin: 1em 0; 55 | } 56 | 57 | .container { 58 | max-width: 500px; 59 | _width: 500px; 60 | margin: 0 auto; 61 | } 62 | -------------------------------------------------------------------------------- /src/main/resources/static/docs/css/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */ 2 | html, 3 | body, 4 | div, 5 | span, 6 | applet, 7 | object, 8 | iframe, 9 | h1, 10 | h2, 11 | h3, 12 | h4, 13 | h5, 14 | h6, 15 | p, 16 | blockquote, 17 | pre, 18 | a, 19 | abbr, 20 | acronym, 21 | address, 22 | big, 23 | cite, 24 | code, 25 | del, 26 | dfn, 27 | em, 28 | img, 29 | ins, 30 | kbd, 31 | q, 32 | s, 33 | samp, 34 | small, 35 | strike, 36 | strong, 37 | sub, 38 | sup, 39 | tt, 40 | var, 41 | b, 42 | u, 43 | i, 44 | center, 45 | dl, 46 | dt, 47 | dd, 48 | ol, 49 | ul, 50 | li, 51 | fieldset, 52 | form, 53 | label, 54 | legend, 55 | table, 56 | caption, 57 | tbody, 58 | tfoot, 59 | thead, 60 | tr, 61 | th, 62 | td, 63 | article, 64 | aside, 65 | canvas, 66 | details, 67 | embed, 68 | figure, 69 | figcaption, 70 | footer, 71 | header, 72 | hgroup, 73 | menu, 74 | nav, 75 | output, 76 | ruby, 77 | section, 78 | summary, 79 | time, 80 | mark, 81 | audio, 82 | video { 83 | margin: 0; 84 | padding: 0; 85 | border: 0; 86 | font-size: 100%; 87 | font: inherit; 88 | vertical-align: baseline; 89 | } 90 | /* HTML5 display-role reset for older browsers */ 91 | article, 92 | aside, 93 | details, 94 | figcaption, 95 | figure, 96 | footer, 97 | header, 98 | hgroup, 99 | menu, 100 | nav, 101 | section { 102 | display: block; 103 | } 104 | body { 105 | line-height: 1; 106 | } 107 | ol, 108 | ul { 109 | list-style: none; 110 | } 111 | blockquote, 112 | q { 113 | quotes: none; 114 | } 115 | blockquote:before, 116 | blockquote:after, 117 | q:before, 118 | q:after { 119 | content: ''; 120 | content: none; 121 | } 122 | table { 123 | border-collapse: collapse; 124 | border-spacing: 0; 125 | } 126 | -------------------------------------------------------------------------------- /src/main/resources/static/docs/css/screen.css: -------------------------------------------------------------------------------- 1 | /* Original style from softwaremaniacs.org (c) Ivan Sagalaev */ 2 | .swagger-section pre code { 3 | display: block; 4 | padding: 0.5em; 5 | background: #F0F0F0; 6 | } 7 | .swagger-section pre code, 8 | .swagger-section pre .subst, 9 | .swagger-section pre .tag .title, 10 | .swagger-section pre .lisp .title, 11 | .swagger-section pre .clojure .built_in, 12 | .swagger-section pre .nginx .title { 13 | color: black; 14 | } 15 | .swagger-section pre .string, 16 | .swagger-section pre .title, 17 | .swagger-section pre .constant, 18 | .swagger-section pre .parent, 19 | .swagger-section pre .tag .value, 20 | .swagger-section pre .rules .value, 21 | .swagger-section pre .rules .value .number, 22 | .swagger-section pre .preprocessor, 23 | .swagger-section pre .ruby .symbol, 24 | .swagger-section pre .ruby .symbol .string, 25 | .swagger-section pre .aggregate, 26 | .swagger-section pre .template_tag, 27 | .swagger-section pre .django .variable, 28 | .swagger-section pre .smalltalk .class, 29 | .swagger-section pre .addition, 30 | .swagger-section pre .flow, 31 | .swagger-section pre .stream, 32 | .swagger-section pre .bash .variable, 33 | .swagger-section pre .apache .tag, 34 | .swagger-section pre .apache .cbracket, 35 | .swagger-section pre .tex .command, 36 | .swagger-section pre .tex .special, 37 | .swagger-section pre .erlang_repl .function_or_atom, 38 | .swagger-section pre .markdown .header { 39 | color: #800; 40 | } 41 | .swagger-section pre .comment, 42 | .swagger-section pre .annotation, 43 | .swagger-section pre .template_comment, 44 | .swagger-section pre .diff .header, 45 | .swagger-section pre .chunk, 46 | .swagger-section pre .markdown .blockquote { 47 | color: #888; 48 | } 49 | .swagger-section pre .number, 50 | .swagger-section pre .date, 51 | .swagger-section pre .regexp, 52 | .swagger-section pre .literal, 53 | .swagger-section pre .smalltalk .symbol, 54 | .swagger-section pre .smalltalk .char, 55 | .swagger-section pre .go .constant, 56 | .swagger-section pre .change, 57 | .swagger-section pre .markdown .bullet, 58 | .swagger-section pre .markdown .link_url { 59 | color: #080; 60 | } 61 | .swagger-section pre .label, 62 | .swagger-section pre .javadoc, 63 | .swagger-section pre .ruby .string, 64 | .swagger-section pre .decorator, 65 | .swagger-section pre .filter .argument, 66 | .swagger-section pre .localvars, 67 | .swagger-section pre .array, 68 | .swagger-section pre .attr_selector, 69 | .swagger-section pre .important, 70 | .swagger-section pre .pseudo, 71 | .swagger-section pre .pi, 72 | .swagger-section pre .doctype, 73 | .swagger-section pre .deletion, 74 | .swagger-section pre .envvar, 75 | .swagger-section pre .shebang, 76 | .swagger-section pre .apache .sqbracket, 77 | .swagger-section pre .nginx .built_in, 78 | .swagger-section pre .tex .formula, 79 | .swagger-section pre .erlang_repl .reserved, 80 | .swagger-section pre .prompt, 81 | .swagger-section pre .markdown .link_label, 82 | .swagger-section pre .vhdl .attribute, 83 | .swagger-section pre .clojure .attribute, 84 | .swagger-section pre .coffeescript .property { 85 | color: #8888ff; 86 | } 87 | .swagger-section pre .keyword, 88 | .swagger-section pre .id, 89 | .swagger-section pre .phpdoc, 90 | .swagger-section pre .title, 91 | .swagger-section pre .built_in, 92 | .swagger-section pre .aggregate, 93 | .swagger-section pre .css .tag, 94 | .swagger-section pre .javadoctag, 95 | .swagger-section pre .phpdoc, 96 | .swagger-section pre .yardoctag, 97 | .swagger-section pre .smalltalk .class, 98 | .swagger-section pre .winutils, 99 | .swagger-section pre .bash .variable, 100 | .swagger-section pre .apache .tag, 101 | .swagger-section pre .go .typename, 102 | .swagger-section pre .tex .command, 103 | .swagger-section pre .markdown .strong, 104 | .swagger-section pre .request, 105 | .swagger-section pre .status { 106 | font-weight: bold; 107 | } 108 | .swagger-section pre .markdown .emphasis { 109 | font-style: italic; 110 | } 111 | .swagger-section pre .nginx .built_in { 112 | font-weight: normal; 113 | } 114 | .swagger-section pre .coffeescript .javascript, 115 | .swagger-section pre .javascript .xml, 116 | .swagger-section pre .tex .formula, 117 | .swagger-section pre .xml .javascript, 118 | .swagger-section pre .xml .vbscript, 119 | .swagger-section pre .xml .css, 120 | .swagger-section pre .xml .cdata { 121 | opacity: 0.5; 122 | } 123 | .swagger-section .swagger-ui-wrap { 124 | line-height: 1; 125 | font-family: "Droid Sans", sans-serif; 126 | max-width: 960px; 127 | margin-left: auto; 128 | margin-right: auto; 129 | } 130 | .swagger-section .swagger-ui-wrap b, 131 | .swagger-section .swagger-ui-wrap strong { 132 | font-family: "Droid Sans", sans-serif; 133 | font-weight: bold; 134 | } 135 | .swagger-section .swagger-ui-wrap q, 136 | .swagger-section .swagger-ui-wrap blockquote { 137 | quotes: none; 138 | } 139 | .swagger-section .swagger-ui-wrap p { 140 | line-height: 1.4em; 141 | padding: 0 0 10px; 142 | color: #333333; 143 | } 144 | .swagger-section .swagger-ui-wrap q:before, 145 | .swagger-section .swagger-ui-wrap q:after, 146 | .swagger-section .swagger-ui-wrap blockquote:before, 147 | .swagger-section .swagger-ui-wrap blockquote:after { 148 | content: none; 149 | } 150 | .swagger-section .swagger-ui-wrap .heading_with_menu h1, 151 | .swagger-section .swagger-ui-wrap .heading_with_menu h2, 152 | .swagger-section .swagger-ui-wrap .heading_with_menu h3, 153 | .swagger-section .swagger-ui-wrap .heading_with_menu h4, 154 | .swagger-section .swagger-ui-wrap .heading_with_menu h5, 155 | .swagger-section .swagger-ui-wrap .heading_with_menu h6 { 156 | display: block; 157 | clear: none; 158 | float: left; 159 | -moz-box-sizing: border-box; 160 | -webkit-box-sizing: border-box; 161 | -ms-box-sizing: border-box; 162 | box-sizing: border-box; 163 | width: 60%; 164 | } 165 | .swagger-section .swagger-ui-wrap table { 166 | border-collapse: collapse; 167 | border-spacing: 0; 168 | } 169 | .swagger-section .swagger-ui-wrap table thead tr th { 170 | padding: 5px; 171 | font-size: 0.9em; 172 | color: #666666; 173 | border-bottom: 1px solid #999999; 174 | } 175 | .swagger-section .swagger-ui-wrap table tbody tr:last-child td { 176 | border-bottom: none; 177 | } 178 | .swagger-section .swagger-ui-wrap table tbody tr.offset { 179 | background-color: #f0f0f0; 180 | } 181 | .swagger-section .swagger-ui-wrap table tbody tr td { 182 | padding: 6px; 183 | font-size: 0.9em; 184 | border-bottom: 1px solid #cccccc; 185 | vertical-align: top; 186 | line-height: 1.3em; 187 | } 188 | .swagger-section .swagger-ui-wrap ol { 189 | margin: 0px 0 10px; 190 | padding: 0 0 0 18px; 191 | list-style-type: decimal; 192 | } 193 | .swagger-section .swagger-ui-wrap ol li { 194 | padding: 5px 0px; 195 | font-size: 0.9em; 196 | color: #333333; 197 | } 198 | .swagger-section .swagger-ui-wrap ol, 199 | .swagger-section .swagger-ui-wrap ul { 200 | list-style: none; 201 | } 202 | .swagger-section .swagger-ui-wrap h1 a, 203 | .swagger-section .swagger-ui-wrap h2 a, 204 | .swagger-section .swagger-ui-wrap h3 a, 205 | .swagger-section .swagger-ui-wrap h4 a, 206 | .swagger-section .swagger-ui-wrap h5 a, 207 | .swagger-section .swagger-ui-wrap h6 a { 208 | text-decoration: none; 209 | } 210 | .swagger-section .swagger-ui-wrap h1 a:hover, 211 | .swagger-section .swagger-ui-wrap h2 a:hover, 212 | .swagger-section .swagger-ui-wrap h3 a:hover, 213 | .swagger-section .swagger-ui-wrap h4 a:hover, 214 | .swagger-section .swagger-ui-wrap h5 a:hover, 215 | .swagger-section .swagger-ui-wrap h6 a:hover { 216 | text-decoration: underline; 217 | } 218 | .swagger-section .swagger-ui-wrap h1 span.divider, 219 | .swagger-section .swagger-ui-wrap h2 span.divider, 220 | .swagger-section .swagger-ui-wrap h3 span.divider, 221 | .swagger-section .swagger-ui-wrap h4 span.divider, 222 | .swagger-section .swagger-ui-wrap h5 span.divider, 223 | .swagger-section .swagger-ui-wrap h6 span.divider { 224 | color: #aaaaaa; 225 | } 226 | .swagger-section .swagger-ui-wrap a { 227 | color: #547f00; 228 | } 229 | .swagger-section .swagger-ui-wrap a img { 230 | border: none; 231 | } 232 | .swagger-section .swagger-ui-wrap article, 233 | .swagger-section .swagger-ui-wrap aside, 234 | .swagger-section .swagger-ui-wrap details, 235 | .swagger-section .swagger-ui-wrap figcaption, 236 | .swagger-section .swagger-ui-wrap figure, 237 | .swagger-section .swagger-ui-wrap footer, 238 | .swagger-section .swagger-ui-wrap header, 239 | .swagger-section .swagger-ui-wrap hgroup, 240 | .swagger-section .swagger-ui-wrap menu, 241 | .swagger-section .swagger-ui-wrap nav, 242 | .swagger-section .swagger-ui-wrap section, 243 | .swagger-section .swagger-ui-wrap summary { 244 | display: block; 245 | } 246 | .swagger-section .swagger-ui-wrap pre { 247 | font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; 248 | background-color: #fcf6db; 249 | border: 1px solid #e5e0c6; 250 | padding: 10px; 251 | } 252 | .swagger-section .swagger-ui-wrap pre code { 253 | line-height: 1.6em; 254 | background: none; 255 | } 256 | .swagger-section .swagger-ui-wrap .content > .content-type > div > label { 257 | clear: both; 258 | display: block; 259 | color: #0F6AB4; 260 | font-size: 1.1em; 261 | margin: 0; 262 | padding: 15px 0 5px; 263 | } 264 | .swagger-section .swagger-ui-wrap .content pre { 265 | font-size: 12px; 266 | margin-top: 5px; 267 | padding: 5px; 268 | } 269 | .swagger-section .swagger-ui-wrap .icon-btn { 270 | cursor: pointer; 271 | } 272 | .swagger-section .swagger-ui-wrap .info_title { 273 | padding-bottom: 10px; 274 | font-weight: bold; 275 | font-size: 25px; 276 | } 277 | .swagger-section .swagger-ui-wrap p.big, 278 | .swagger-section .swagger-ui-wrap div.big p { 279 | font-size: 1em; 280 | margin-bottom: 10px; 281 | } 282 | .swagger-section .swagger-ui-wrap form.fullwidth ol li.string input, 283 | .swagger-section .swagger-ui-wrap form.fullwidth ol li.url input, 284 | .swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea, 285 | .swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input { 286 | width: 500px !important; 287 | } 288 | .swagger-section .swagger-ui-wrap .info_license { 289 | padding-bottom: 5px; 290 | } 291 | .swagger-section .swagger-ui-wrap .info_tos { 292 | padding-bottom: 5px; 293 | } 294 | .swagger-section .swagger-ui-wrap .message-fail { 295 | color: #cc0000; 296 | } 297 | .swagger-section .swagger-ui-wrap .info_contact { 298 | padding-bottom: 5px; 299 | } 300 | .swagger-section .swagger-ui-wrap .info_description { 301 | padding-bottom: 10px; 302 | font-size: 15px; 303 | } 304 | .swagger-section .swagger-ui-wrap .markdown ol li, 305 | .swagger-section .swagger-ui-wrap .markdown ul li { 306 | padding: 3px 0px; 307 | line-height: 1.4em; 308 | color: #333333; 309 | } 310 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input, 311 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input, 312 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input { 313 | display: block; 314 | padding: 4px; 315 | width: auto; 316 | clear: both; 317 | } 318 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title, 319 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title, 320 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title { 321 | font-size: 1.3em; 322 | } 323 | .swagger-section .swagger-ui-wrap table.fullwidth { 324 | width: 100%; 325 | } 326 | .swagger-section .swagger-ui-wrap .model-signature { 327 | font-family: "Droid Sans", sans-serif; 328 | font-size: 1em; 329 | line-height: 1.5em; 330 | } 331 | .swagger-section .swagger-ui-wrap .model-signature .signature-nav a { 332 | text-decoration: none; 333 | color: #AAA; 334 | } 335 | .swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover { 336 | text-decoration: underline; 337 | color: black; 338 | } 339 | .swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected { 340 | color: black; 341 | text-decoration: none; 342 | } 343 | .swagger-section .swagger-ui-wrap .model-signature .propType { 344 | color: #5555aa; 345 | } 346 | .swagger-section .swagger-ui-wrap .model-signature pre:hover { 347 | background-color: #ffffdd; 348 | } 349 | .swagger-section .swagger-ui-wrap .model-signature pre { 350 | font-size: .85em; 351 | line-height: 1.2em; 352 | overflow: auto; 353 | max-height: 200px; 354 | cursor: pointer; 355 | } 356 | .swagger-section .swagger-ui-wrap .model-signature ul.signature-nav { 357 | display: block; 358 | margin: 0; 359 | padding: 0; 360 | } 361 | .swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child { 362 | padding-right: 0; 363 | border-right: none; 364 | } 365 | .swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li { 366 | float: left; 367 | margin: 0 5px 5px 0; 368 | padding: 2px 5px 2px 0; 369 | border-right: 1px solid #ddd; 370 | } 371 | .swagger-section .swagger-ui-wrap .model-signature .propOpt { 372 | color: #555; 373 | } 374 | .swagger-section .swagger-ui-wrap .model-signature .snippet small { 375 | font-size: 0.75em; 376 | } 377 | .swagger-section .swagger-ui-wrap .model-signature .propOptKey { 378 | font-style: italic; 379 | } 380 | .swagger-section .swagger-ui-wrap .model-signature .description .strong { 381 | font-weight: bold; 382 | color: #000; 383 | font-size: .9em; 384 | } 385 | .swagger-section .swagger-ui-wrap .model-signature .description div { 386 | font-size: 0.9em; 387 | line-height: 1.5em; 388 | margin-left: 1em; 389 | } 390 | .swagger-section .swagger-ui-wrap .model-signature .description .stronger { 391 | font-weight: bold; 392 | color: #000; 393 | } 394 | .swagger-section .swagger-ui-wrap .model-signature .propName { 395 | font-weight: bold; 396 | } 397 | .swagger-section .swagger-ui-wrap .model-signature .signature-container { 398 | clear: both; 399 | } 400 | .swagger-section .swagger-ui-wrap .body-textarea { 401 | width: 300px; 402 | height: 100px; 403 | border: 1px solid #aaa; 404 | } 405 | .swagger-section .swagger-ui-wrap .markdown p code, 406 | .swagger-section .swagger-ui-wrap .markdown li code { 407 | font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; 408 | background-color: #f0f0f0; 409 | color: black; 410 | padding: 1px 3px; 411 | } 412 | .swagger-section .swagger-ui-wrap .required { 413 | font-weight: bold; 414 | } 415 | .swagger-section .swagger-ui-wrap input.parameter { 416 | width: 300px; 417 | border: 1px solid #aaa; 418 | } 419 | .swagger-section .swagger-ui-wrap h1 { 420 | color: black; 421 | font-size: 1.5em; 422 | line-height: 1.3em; 423 | padding: 10px 0 10px 0; 424 | font-family: "Droid Sans", sans-serif; 425 | font-weight: bold; 426 | } 427 | .swagger-section .swagger-ui-wrap .heading_with_menu { 428 | float: none; 429 | clear: both; 430 | overflow: hidden; 431 | display: block; 432 | } 433 | .swagger-section .swagger-ui-wrap .heading_with_menu ul { 434 | display: block; 435 | clear: none; 436 | float: right; 437 | -moz-box-sizing: border-box; 438 | -webkit-box-sizing: border-box; 439 | -ms-box-sizing: border-box; 440 | box-sizing: border-box; 441 | margin-top: 10px; 442 | } 443 | .swagger-section .swagger-ui-wrap h2 { 444 | color: black; 445 | font-size: 1.3em; 446 | padding: 10px 0 10px 0; 447 | } 448 | .swagger-section .swagger-ui-wrap h2 a { 449 | color: black; 450 | } 451 | .swagger-section .swagger-ui-wrap h2 span.sub { 452 | font-size: 0.7em; 453 | color: #999999; 454 | font-style: italic; 455 | } 456 | .swagger-section .swagger-ui-wrap h2 span.sub a { 457 | color: #777777; 458 | } 459 | .swagger-section .swagger-ui-wrap span.weak { 460 | color: #666666; 461 | } 462 | .swagger-section .swagger-ui-wrap .message-success { 463 | color: #89BF04; 464 | } 465 | .swagger-section .swagger-ui-wrap caption, 466 | .swagger-section .swagger-ui-wrap th, 467 | .swagger-section .swagger-ui-wrap td { 468 | text-align: left; 469 | font-weight: normal; 470 | vertical-align: middle; 471 | } 472 | .swagger-section .swagger-ui-wrap .code { 473 | font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; 474 | } 475 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea { 476 | font-family: "Droid Sans", sans-serif; 477 | height: 250px; 478 | padding: 4px; 479 | display: block; 480 | clear: both; 481 | } 482 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select { 483 | display: block; 484 | clear: both; 485 | } 486 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean { 487 | float: none; 488 | clear: both; 489 | overflow: hidden; 490 | display: block; 491 | } 492 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label { 493 | display: block; 494 | float: left; 495 | clear: none; 496 | margin: 0; 497 | padding: 0; 498 | } 499 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input { 500 | display: block; 501 | float: left; 502 | clear: none; 503 | margin: 0 5px 0 0; 504 | } 505 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label { 506 | color: black; 507 | } 508 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label { 509 | display: block; 510 | clear: both; 511 | width: auto; 512 | padding: 0 0 3px; 513 | color: #666666; 514 | } 515 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr { 516 | padding-left: 3px; 517 | color: #888888; 518 | } 519 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints { 520 | margin-left: 0; 521 | font-style: italic; 522 | font-size: 0.9em; 523 | margin: 0; 524 | } 525 | .swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons { 526 | margin: 0; 527 | padding: 0; 528 | } 529 | .swagger-section .swagger-ui-wrap span.blank, 530 | .swagger-section .swagger-ui-wrap span.empty { 531 | color: #888888; 532 | font-style: italic; 533 | } 534 | .swagger-section .swagger-ui-wrap .markdown h3 { 535 | color: #547f00; 536 | } 537 | .swagger-section .swagger-ui-wrap .markdown h4 { 538 | color: #666666; 539 | } 540 | .swagger-section .swagger-ui-wrap .markdown pre { 541 | font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; 542 | background-color: #fcf6db; 543 | border: 1px solid #e5e0c6; 544 | padding: 10px; 545 | margin: 0 0 10px 0; 546 | } 547 | .swagger-section .swagger-ui-wrap .markdown pre code { 548 | line-height: 1.6em; 549 | } 550 | .swagger-section .swagger-ui-wrap div.gist { 551 | margin: 20px 0 25px 0 !important; 552 | } 553 | .swagger-section .swagger-ui-wrap ul#resources { 554 | font-family: "Droid Sans", sans-serif; 555 | font-size: 0.9em; 556 | } 557 | .swagger-section .swagger-ui-wrap ul#resources li.resource { 558 | border-bottom: 1px solid #dddddd; 559 | } 560 | .swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a, 561 | .swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a { 562 | color: black; 563 | } 564 | .swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a, 565 | .swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a { 566 | color: #555555; 567 | } 568 | .swagger-section .swagger-ui-wrap ul#resources li.resource:last-child { 569 | border-bottom: none; 570 | } 571 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading { 572 | border: 1px solid transparent; 573 | float: none; 574 | clear: both; 575 | overflow: hidden; 576 | display: block; 577 | } 578 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options { 579 | overflow: hidden; 580 | padding: 0; 581 | display: block; 582 | clear: none; 583 | float: right; 584 | margin: 14px 10px 0 0; 585 | } 586 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li { 587 | float: left; 588 | clear: none; 589 | margin: 0; 590 | padding: 2px 10px; 591 | border-right: 1px solid #dddddd; 592 | color: #666666; 593 | font-size: 0.9em; 594 | } 595 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a { 596 | color: #aaaaaa; 597 | text-decoration: none; 598 | } 599 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover { 600 | text-decoration: underline; 601 | color: black; 602 | } 603 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover, 604 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active, 605 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active { 606 | text-decoration: underline; 607 | } 608 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child, 609 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first { 610 | padding-left: 0; 611 | } 612 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child, 613 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last { 614 | padding-right: 0; 615 | border-right: none; 616 | } 617 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child, 618 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first { 619 | padding-left: 0; 620 | } 621 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 { 622 | color: #999999; 623 | padding-left: 0; 624 | display: block; 625 | clear: none; 626 | float: left; 627 | font-family: "Droid Sans", sans-serif; 628 | font-weight: bold; 629 | } 630 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a { 631 | color: #999999; 632 | } 633 | .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover { 634 | color: black; 635 | } 636 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation { 637 | float: none; 638 | clear: both; 639 | overflow: hidden; 640 | display: block; 641 | margin: 0 0 10px; 642 | padding: 0; 643 | } 644 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading { 645 | float: none; 646 | clear: both; 647 | overflow: hidden; 648 | display: block; 649 | margin: 0; 650 | padding: 0; 651 | } 652 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 { 653 | display: block; 654 | clear: none; 655 | float: left; 656 | width: auto; 657 | margin: 0; 658 | padding: 0; 659 | line-height: 1.1em; 660 | color: black; 661 | } 662 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path { 663 | padding-left: 10px; 664 | } 665 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a { 666 | color: black; 667 | text-decoration: none; 668 | } 669 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover { 670 | text-decoration: underline; 671 | } 672 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a { 673 | text-transform: uppercase; 674 | text-decoration: none; 675 | color: white; 676 | display: inline-block; 677 | width: 50px; 678 | font-size: 0.7em; 679 | text-align: center; 680 | padding: 7px 0 4px; 681 | -moz-border-radius: 2px; 682 | -webkit-border-radius: 2px; 683 | -o-border-radius: 2px; 684 | -ms-border-radius: 2px; 685 | -khtml-border-radius: 2px; 686 | border-radius: 2px; 687 | } 688 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span { 689 | margin: 0; 690 | padding: 0; 691 | } 692 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options { 693 | overflow: hidden; 694 | padding: 0; 695 | display: block; 696 | clear: none; 697 | float: right; 698 | margin: 6px 10px 0 0; 699 | } 700 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li { 701 | float: left; 702 | clear: none; 703 | margin: 0; 704 | padding: 2px 10px; 705 | font-size: 0.9em; 706 | } 707 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a { 708 | text-decoration: none; 709 | } 710 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access { 711 | color: black; 712 | } 713 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content { 714 | border-top: none; 715 | padding: 10px; 716 | -moz-border-radius-bottomleft: 6px; 717 | -webkit-border-bottom-left-radius: 6px; 718 | -o-border-bottom-left-radius: 6px; 719 | -ms-border-bottom-left-radius: 6px; 720 | -khtml-border-bottom-left-radius: 6px; 721 | border-bottom-left-radius: 6px; 722 | -moz-border-radius-bottomright: 6px; 723 | -webkit-border-bottom-right-radius: 6px; 724 | -o-border-bottom-right-radius: 6px; 725 | -ms-border-bottom-right-radius: 6px; 726 | -khtml-border-bottom-right-radius: 6px; 727 | border-bottom-right-radius: 6px; 728 | margin: 0 0 20px; 729 | } 730 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 { 731 | font-size: 1.1em; 732 | margin: 0; 733 | padding: 15px 0 5px; 734 | } 735 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header { 736 | float: none; 737 | clear: both; 738 | overflow: hidden; 739 | display: block; 740 | } 741 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a { 742 | padding: 4px 0 0 10px; 743 | display: inline-block; 744 | font-size: 0.9em; 745 | } 746 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit { 747 | display: block; 748 | clear: none; 749 | float: left; 750 | padding: 6px 8px; 751 | } 752 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber { 753 | background-image: url('../images/throbber.gif'); 754 | width: 128px; 755 | height: 16px; 756 | display: block; 757 | clear: none; 758 | float: right; 759 | } 760 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error { 761 | outline: 2px solid black; 762 | outline-color: #cc0000; 763 | } 764 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre { 765 | font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; 766 | padding: 10px; 767 | font-size: 0.9em; 768 | max-height: 400px; 769 | overflow-y: auto; 770 | } 771 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading { 772 | background-color: #f9f2e9; 773 | border: 1px solid #f0e0ca; 774 | } 775 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a { 776 | background-color: #c5862b; 777 | } 778 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { 779 | border-right: 1px solid #dddddd; 780 | border-right-color: #f0e0ca; 781 | color: #c5862b; 782 | } 783 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a { 784 | color: #c5862b; 785 | } 786 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content { 787 | background-color: #faf5ee; 788 | border: 1px solid #f0e0ca; 789 | } 790 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 { 791 | color: #c5862b; 792 | } 793 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a { 794 | color: #dcb67f; 795 | } 796 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading { 797 | background-color: #fcffcd; 798 | border: 1px solid black; 799 | border-color: #ffd20f; 800 | } 801 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a { 802 | text-transform: uppercase; 803 | background-color: #ffd20f; 804 | } 805 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { 806 | border-right: 1px solid #dddddd; 807 | border-right-color: #ffd20f; 808 | color: #ffd20f; 809 | } 810 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a { 811 | color: #ffd20f; 812 | } 813 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content { 814 | background-color: #fcffcd; 815 | border: 1px solid black; 816 | border-color: #ffd20f; 817 | } 818 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 { 819 | color: #ffd20f; 820 | } 821 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a { 822 | color: #6fc992; 823 | } 824 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading { 825 | background-color: #f5e8e8; 826 | border: 1px solid #e8c6c7; 827 | } 828 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a { 829 | text-transform: uppercase; 830 | background-color: #a41e22; 831 | } 832 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { 833 | border-right: 1px solid #dddddd; 834 | border-right-color: #e8c6c7; 835 | color: #a41e22; 836 | } 837 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a { 838 | color: #a41e22; 839 | } 840 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { 841 | background-color: #f7eded; 842 | border: 1px solid #e8c6c7; 843 | } 844 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 { 845 | color: #a41e22; 846 | } 847 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a { 848 | color: #c8787a; 849 | } 850 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading { 851 | background-color: #e7f6ec; 852 | border: 1px solid #c3e8d1; 853 | } 854 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a { 855 | background-color: #10a54a; 856 | } 857 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { 858 | border-right: 1px solid #dddddd; 859 | border-right-color: #c3e8d1; 860 | color: #10a54a; 861 | } 862 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a { 863 | color: #10a54a; 864 | } 865 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content { 866 | background-color: #ebf7f0; 867 | border: 1px solid #c3e8d1; 868 | } 869 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 { 870 | color: #10a54a; 871 | } 872 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a { 873 | color: #6fc992; 874 | } 875 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading { 876 | background-color: #FCE9E3; 877 | border: 1px solid #F5D5C3; 878 | } 879 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a { 880 | background-color: #D38042; 881 | } 882 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { 883 | border-right: 1px solid #dddddd; 884 | border-right-color: #f0cecb; 885 | color: #D38042; 886 | } 887 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a { 888 | color: #D38042; 889 | } 890 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content { 891 | background-color: #faf0ef; 892 | border: 1px solid #f0cecb; 893 | } 894 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 { 895 | color: #D38042; 896 | } 897 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a { 898 | color: #dcb67f; 899 | } 900 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading { 901 | background-color: #e7f0f7; 902 | border: 1px solid #c3d9ec; 903 | } 904 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a { 905 | background-color: #0f6ab4; 906 | } 907 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { 908 | border-right: 1px solid #dddddd; 909 | border-right-color: #c3d9ec; 910 | color: #0f6ab4; 911 | } 912 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a { 913 | color: #0f6ab4; 914 | } 915 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content { 916 | background-color: #ebf3f9; 917 | border: 1px solid #c3d9ec; 918 | } 919 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 { 920 | color: #0f6ab4; 921 | } 922 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a { 923 | color: #6fa5d2; 924 | } 925 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading { 926 | background-color: #e7f0f7; 927 | border: 1px solid #c3d9ec; 928 | } 929 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a { 930 | background-color: #0f6ab4; 931 | } 932 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li { 933 | border-right: 1px solid #dddddd; 934 | border-right-color: #c3d9ec; 935 | color: #0f6ab4; 936 | } 937 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a { 938 | color: #0f6ab4; 939 | } 940 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content { 941 | background-color: #ebf3f9; 942 | border: 1px solid #c3d9ec; 943 | } 944 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 { 945 | color: #0f6ab4; 946 | } 947 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a { 948 | color: #6fa5d2; 949 | } 950 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content, 951 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content, 952 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content, 953 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content, 954 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content, 955 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { 956 | border-top: none; 957 | } 958 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, 959 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, 960 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child, 961 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child, 962 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child, 963 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, 964 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last, 965 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last, 966 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last, 967 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last, 968 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last, 969 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last { 970 | padding-right: 0; 971 | border-right: none; 972 | } 973 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover, 974 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active, 975 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active { 976 | text-decoration: underline; 977 | } 978 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child, 979 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first { 980 | padding-left: 0; 981 | } 982 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child, 983 | .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first { 984 | padding-left: 0; 985 | } 986 | .swagger-section .swagger-ui-wrap p#colophon { 987 | margin: 0 15px 40px 15px; 988 | padding: 10px 0; 989 | font-size: 0.8em; 990 | border-top: 1px solid #dddddd; 991 | font-family: "Droid Sans", sans-serif; 992 | color: #999999; 993 | font-style: italic; 994 | } 995 | .swagger-section .swagger-ui-wrap p#colophon a { 996 | text-decoration: none; 997 | color: #547f00; 998 | } 999 | .swagger-section .swagger-ui-wrap h3 { 1000 | color: black; 1001 | font-size: 1.1em; 1002 | padding: 10px 0 10px 0; 1003 | } 1004 | .swagger-section .swagger-ui-wrap .markdown ol, 1005 | .swagger-section .swagger-ui-wrap .markdown ul { 1006 | font-family: "Droid Sans", sans-serif; 1007 | margin: 5px 0 10px; 1008 | padding: 0 0 0 18px; 1009 | list-style-type: disc; 1010 | } 1011 | .swagger-section .swagger-ui-wrap form.form_box { 1012 | background-color: #ebf3f9; 1013 | border: 1px solid #c3d9ec; 1014 | padding: 10px; 1015 | } 1016 | .swagger-section .swagger-ui-wrap form.form_box label { 1017 | color: #0f6ab4 !important; 1018 | } 1019 | .swagger-section .swagger-ui-wrap form.form_box input[type=submit] { 1020 | display: block; 1021 | padding: 10px; 1022 | } 1023 | .swagger-section .swagger-ui-wrap form.form_box p.weak { 1024 | font-size: 0.8em; 1025 | } 1026 | .swagger-section .swagger-ui-wrap form.form_box p { 1027 | font-size: 0.9em; 1028 | padding: 0 0 15px; 1029 | color: #7e7b6d; 1030 | } 1031 | .swagger-section .swagger-ui-wrap form.form_box p a { 1032 | color: #646257; 1033 | } 1034 | .swagger-section .swagger-ui-wrap form.form_box p strong { 1035 | color: black; 1036 | } 1037 | .swagger-section .title { 1038 | font-style: bold; 1039 | } 1040 | .swagger-section .secondary_form { 1041 | display: none; 1042 | } 1043 | .swagger-section .main_image { 1044 | display: block; 1045 | margin-left: auto; 1046 | margin-right: auto; 1047 | } 1048 | .swagger-section .oauth_body { 1049 | margin-left: 100px; 1050 | margin-right: 100px; 1051 | } 1052 | .swagger-section .oauth_submit { 1053 | text-align: center; 1054 | } 1055 | .swagger-section .api-popup-dialog { 1056 | z-index: 10000; 1057 | position: absolute; 1058 | width: 500px; 1059 | background: #FFF; 1060 | padding: 20px; 1061 | border: 1px solid #ccc; 1062 | border-radius: 5px; 1063 | display: none; 1064 | font-size: 13px; 1065 | color: #777; 1066 | } 1067 | .swagger-section .api-popup-dialog .api-popup-title { 1068 | font-size: 24px; 1069 | padding: 10px 0; 1070 | } 1071 | .swagger-section .api-popup-dialog .api-popup-title { 1072 | font-size: 24px; 1073 | padding: 10px 0; 1074 | } 1075 | .swagger-section .api-popup-dialog p.error-msg { 1076 | padding-left: 5px; 1077 | padding-bottom: 5px; 1078 | } 1079 | .swagger-section .api-popup-dialog button.api-popup-authbtn { 1080 | height: 30px; 1081 | } 1082 | .swagger-section .api-popup-dialog button.api-popup-cancel { 1083 | height: 30px; 1084 | } 1085 | .swagger-section .api-popup-scopes { 1086 | padding: 10px 20px; 1087 | } 1088 | .swagger-section .api-popup-scopes li { 1089 | padding: 5px 0; 1090 | line-height: 20px; 1091 | } 1092 | .swagger-section .api-popup-scopes .api-scope-desc { 1093 | padding-left: 20px; 1094 | font-style: italic; 1095 | } 1096 | .swagger-section .api-popup-scopes li input { 1097 | position: relative; 1098 | top: 2px; 1099 | } 1100 | .swagger-section .api-popup-actions { 1101 | padding-top: 10px; 1102 | } 1103 | .swagger-section .access { 1104 | float: right; 1105 | } 1106 | .swagger-section .auth { 1107 | float: right; 1108 | } 1109 | .swagger-section #api_information_panel { 1110 | position: absolute; 1111 | background: #FFF; 1112 | border: 1px solid #ccc; 1113 | border-radius: 5px; 1114 | display: none; 1115 | font-size: 13px; 1116 | max-width: 300px; 1117 | line-height: 30px; 1118 | color: black; 1119 | padding: 5px; 1120 | } 1121 | .swagger-section #api_information_panel p .api-msg-enabled { 1122 | color: green; 1123 | } 1124 | .swagger-section #api_information_panel p .api-msg-disabled { 1125 | color: red; 1126 | } 1127 | .swagger-section .api-ic { 1128 | height: 18px; 1129 | vertical-align: middle; 1130 | display: inline-block; 1131 | background: url(../images/explorer_icons.png) no-repeat; 1132 | } 1133 | .swagger-section .ic-info { 1134 | background-position: 0 0; 1135 | width: 18px; 1136 | margin-top: -7px; 1137 | margin-left: 4px; 1138 | } 1139 | .swagger-section .ic-warning { 1140 | background-position: -60px 0; 1141 | width: 18px; 1142 | margin-top: -7px; 1143 | margin-left: 4px; 1144 | } 1145 | .swagger-section .ic-error { 1146 | background-position: -30px 0; 1147 | width: 18px; 1148 | margin-top: -7px; 1149 | margin-left: 4px; 1150 | } 1151 | .swagger-section .ic-off { 1152 | background-position: -90px 0; 1153 | width: 58px; 1154 | margin-top: -4px; 1155 | cursor: pointer; 1156 | } 1157 | .swagger-section .ic-on { 1158 | background-position: -160px 0; 1159 | width: 58px; 1160 | margin-top: -4px; 1161 | cursor: pointer; 1162 | } 1163 | .swagger-section #header { 1164 | background-color: #fff; 1165 | padding: 14px; 1166 | } 1167 | .swagger-section #header a#logo { 1168 | background: transparent url(../images/rd-logo.png) no-repeat left center; 1169 | color: white; 1170 | width: 360px; 1171 | height: 80px; 1172 | text-indent: -1000px; 1173 | float: right; 1174 | margin-top: 20px; 1175 | } 1176 | .swagger-section #header form#api_selector { 1177 | display: block; 1178 | clear: none; 1179 | float: right; 1180 | } 1181 | .swagger-section #header form#api_selector .input { 1182 | display: block; 1183 | clear: none; 1184 | float: left; 1185 | margin: 0 10px 0 0; 1186 | } 1187 | .swagger-section #header form#api_selector .input input#input_apiKey { 1188 | width: 200px; 1189 | } 1190 | .swagger-section #header form#api_selector .input input#input_baseUrl { 1191 | width: 400px; 1192 | } 1193 | .swagger-section #header form#api_selector .input a#explore { 1194 | display: block; 1195 | text-decoration: none; 1196 | font-weight: bold; 1197 | padding: 6px 8px; 1198 | font-size: 0.9em; 1199 | color: white; 1200 | background-color: #547f00; 1201 | -moz-border-radius: 4px; 1202 | -webkit-border-radius: 4px; 1203 | -o-border-radius: 4px; 1204 | -ms-border-radius: 4px; 1205 | -khtml-border-radius: 4px; 1206 | border-radius: 4px; 1207 | } 1208 | .swagger-section #header form#api_selector .input a#explore:hover { 1209 | background-color: #547f00; 1210 | } 1211 | .swagger-section #header form#api_selector .input input { 1212 | font-size: 0.9em; 1213 | padding: 3px; 1214 | margin: 0; 1215 | } 1216 | .swagger-section #content_message { 1217 | margin: 10px 15px; 1218 | font-style: italic; 1219 | color: #999999; 1220 | } 1221 | .swagger-section #message-bar { 1222 | /*min-height: 30px;*/ 1223 | text-align: center; 1224 | padding-top: 10px; 1225 | } 1226 | -------------------------------------------------------------------------------- /src/main/resources/static/docs/images/explorer_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mraible/camel-rest-swagger/e91ef316979926aff8b2196dad993a5236c99690/src/main/resources/static/docs/images/explorer_icons.png -------------------------------------------------------------------------------- /src/main/resources/static/docs/images/logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mraible/camel-rest-swagger/e91ef316979926aff8b2196dad993a5236c99690/src/main/resources/static/docs/images/logo_small.png -------------------------------------------------------------------------------- /src/main/resources/static/docs/images/pet_store_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mraible/camel-rest-swagger/e91ef316979926aff8b2196dad993a5236c99690/src/main/resources/static/docs/images/pet_store_api.png -------------------------------------------------------------------------------- /src/main/resources/static/docs/images/rd-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mraible/camel-rest-swagger/e91ef316979926aff8b2196dad993a5236c99690/src/main/resources/static/docs/images/rd-logo.png -------------------------------------------------------------------------------- /src/main/resources/static/docs/images/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mraible/camel-rest-swagger/e91ef316979926aff8b2196dad993a5236c99690/src/main/resources/static/docs/images/throbber.gif -------------------------------------------------------------------------------- /src/main/resources/static/docs/images/wordnik_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mraible/camel-rest-swagger/e91ef316979926aff8b2196dad993a5236c99690/src/main/resources/static/docs/images/wordnik_api.png -------------------------------------------------------------------------------- /src/main/resources/static/docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Swagger UI 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 72 | 73 | 74 | 75 | 80 | 81 |
 
82 |
83 | 84 | 85 | -------------------------------------------------------------------------------- /src/main/resources/static/docs/lib/backbone-min.js: -------------------------------------------------------------------------------- 1 | // Backbone.js 0.9.2 2 | 3 | // (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. 4 | // Backbone may be freely distributed under the MIT license. 5 | // For all details and documentation: 6 | // http://backbonejs.org 7 | (function(){var l=this,y=l.Backbone,z=Array.prototype.slice,A=Array.prototype.splice,g;g="undefined"!==typeof exports?exports:l.Backbone={};g.VERSION="0.9.2";var f=l._;!f&&"undefined"!==typeof require&&(f=require("underscore"));var i=l.jQuery||l.Zepto||l.ender;g.setDomLibrary=function(a){i=a};g.noConflict=function(){l.Backbone=y;return this};g.emulateHTTP=!1;g.emulateJSON=!1;var p=/\s+/,k=g.Events={on:function(a,b,c){var d,e,f,g,j;if(!b)return this;a=a.split(p);for(d=this._callbacks||(this._callbacks= 8 | {});e=a.shift();)f=(j=d[e])?j.tail:{},f.next=g={},f.context=c,f.callback=b,d[e]={tail:g,next:j?j.next:f};return this},off:function(a,b,c){var d,e,h,g,j,q;if(e=this._callbacks){if(!a&&!b&&!c)return delete this._callbacks,this;for(a=a?a.split(p):f.keys(e);d=a.shift();)if(h=e[d],delete e[d],h&&(b||c))for(g=h.tail;(h=h.next)!==g;)if(j=h.callback,q=h.context,b&&j!==b||c&&q!==c)this.on(d,j,q);return this}},trigger:function(a){var b,c,d,e,f,g;if(!(d=this._callbacks))return this;f=d.all;a=a.split(p);for(g= 9 | z.call(arguments,1);b=a.shift();){if(c=d[b])for(e=c.tail;(c=c.next)!==e;)c.callback.apply(c.context||this,g);if(c=f){e=c.tail;for(b=[b].concat(g);(c=c.next)!==e;)c.callback.apply(c.context||this,b)}}return this}};k.bind=k.on;k.unbind=k.off;var o=g.Model=function(a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=n(this,"defaults"))a=f.extend({},c,a);b&&b.collection&&(this.collection=b.collection);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");this.changed={};this._silent= 10 | {};this._pending={};this.set(a,{silent:!0});this.changed={};this._silent={};this._pending={};this._previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)};f.extend(o.prototype,k,{changed:null,_silent:null,_pending:null,idAttribute:"id",initialize:function(){},toJSON:function(){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.get(a);return this._escapedAttributes[a]=f.escape(null== 11 | b?"":""+b)},has:function(a){return null!=this.get(a)},set:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c||(c={});if(!d)return this;d instanceof o&&(d=d.attributes);if(c.unset)for(e in d)d[e]=void 0;if(!this._validate(d,c))return!1;this.idAttribute in d&&(this.id=d[this.idAttribute]);var b=c.changes={},h=this.attributes,g=this._escapedAttributes,j=this._previousAttributes||{};for(e in d){a=d[e];if(!f.isEqual(h[e],a)||c.unset&&f.has(h,e))delete g[e],(c.silent?this._silent: 12 | b)[e]=!0;c.unset?delete h[e]:h[e]=a;!f.isEqual(j[e],a)||f.has(h,e)!=f.has(j,e)?(this.changed[e]=a,c.silent||(this._pending[e]=!0)):(delete this.changed[e],delete this._pending[e])}c.silent||this.change(c);return this},unset:function(a,b){(b||(b={})).unset=!0;return this.set(a,null,b)},clear:function(a){(a||(a={})).unset=!0;return this.set(f.clone(this.attributes),a)},fetch:function(a){var a=a?f.clone(a):{},b=this,c=a.success;a.success=function(d,e,f){if(!b.set(b.parse(d,f),a))return!1;c&&c(b,d)}; 13 | a.error=g.wrapError(a.error,b,a);return(this.sync||g.sync).call(this,"read",this,a)},save:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c=c?f.clone(c):{};if(c.wait){if(!this._validate(d,c))return!1;e=f.clone(this.attributes)}a=f.extend({},c,{silent:!0});if(d&&!this.set(d,c.wait?a:c))return!1;var h=this,i=c.success;c.success=function(a,b,e){b=h.parse(a,e);if(c.wait){delete c.wait;b=f.extend(d||{},b)}if(!h.set(b,c))return false;i?i(h,a):h.trigger("sync",h,a,c)};c.error=g.wrapError(c.error, 14 | h,c);b=this.isNew()?"create":"update";b=(this.sync||g.sync).call(this,b,this,c);c.wait&&this.set(e,a);return b},destroy:function(a){var a=a?f.clone(a):{},b=this,c=a.success,d=function(){b.trigger("destroy",b,b.collection,a)};if(this.isNew())return d(),!1;a.success=function(e){a.wait&&d();c?c(b,e):b.trigger("sync",b,e,a)};a.error=g.wrapError(a.error,b,a);var e=(this.sync||g.sync).call(this,"delete",this,a);a.wait||d();return e},url:function(){var a=n(this,"urlRoot")||n(this.collection,"url")||t(); 15 | return this.isNew()?a:a+("/"==a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},change:function(a){a||(a={});var b=this._changing;this._changing=!0;for(var c in this._silent)this._pending[c]=!0;var d=f.extend({},a.changes,this._silent);this._silent={};for(c in d)this.trigger("change:"+c,this,this.get(c),a);if(b)return this;for(;!f.isEmpty(this._pending);){this._pending= 16 | {};this.trigger("change",this,a);for(c in this.changed)!this._pending[c]&&!this._silent[c]&&delete this.changed[c];this._previousAttributes=f.clone(this.attributes)}this._changing=!1;return this},hasChanged:function(a){return!arguments.length?!f.isEmpty(this.changed):f.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?f.clone(this.changed):!1;var b,c=!1,d=this._previousAttributes,e;for(e in a)if(!f.isEqual(d[e],b=a[e]))(c||(c={}))[e]=b;return c},previous:function(a){return!arguments.length|| 17 | !this._previousAttributes?null:this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},isValid:function(){return!this.validate(this.attributes)},_validate:function(a,b){if(b.silent||!this.validate)return!0;var a=f.extend({},this.attributes,a),c=this.validate(a,b);if(!c)return!0;b&&b.error?b.error(this,c,b):this.trigger("error",this,c,b);return!1}});var r=g.Collection=function(a,b){b||(b={});b.model&&(this.model=b.model);b.comparator&&(this.comparator=b.comparator); 18 | this._reset();this.initialize.apply(this,arguments);a&&this.reset(a,{silent:!0,parse:b.parse})};f.extend(r.prototype,k,{model:o,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},add:function(a,b){var c,d,e,g,i,j={},k={},l=[];b||(b={});a=f.isArray(a)?a.slice():[a];c=0;for(d=a.length;c=b))this.iframe=i('