forked from loafle/openapi-generator-original
1 line
14 KiB
JavaScript
1 line
14 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[119],{290:function(e,a,t){"use strict";t.r(a);var n=t(1);function l(e,a){return a||(a=e.slice(0)),e.raw=a,e}t(304);var r=t(0),o=t.n(r),c=t(293),s=t.n(c),i=t(297),m=t(295),u=t(294),p=t(296),g=t(125),d=t.n(g),E=t(305);function h(){var e=l(["\n |docker run --rm \\\n | -v $PWD:/local openapitools/openapi-generator-cli generate \\\n | -i /local/petstore.yaml \\\n | -g go \\\n | -o /local/out/go\n "],["\n |docker run --rm \\\\\n | -v $PWD:/local openapitools/openapi-generator-cli generate \\\\\n | -i /local/petstore.yaml \\\\\n | -g go \\\\\n | -o /local/out/go\n "]);return h=function(){return e},e}function f(){var e=l(['\n |# install the latest version of "openapi-generator-cli"\n |npm install @openapitools/openapi-generator-cli -g\n |\n |# install a specific version of "openapi-generator-cli"\n |npm install @openapitools/openapi-generator-cli@cli-4.2.3 -g\n |\n |# Or install it as dev-dependency in your node.js projects\n |npm install @openapitools/openapi-generator-cli -D\n ']);return f=function(){return e},e}var b=[{title:o.a.createElement(o.a.Fragment,null,"Easy to Use"),imageUrl:"img/icons/plug.svg",description:o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,"With ",o.a.createElement("em",null,"50+")," client generators, you can easily generate code to interact with any server which exposes an OpenAPI document."),o.a.createElement("p",null,"Maintainers of APIs may also automatically generate and distribute clients as part of official SDKs."),o.a.createElement("p",null,"Each client supports different options and features, but all templates can be replaced with your own Mustache-based templates."),"See ",o.a.createElement("a",{href:"./docs/customization"},"Customization")," for details.")},{title:o.a.createElement(o.a.Fragment,null,"Servers"),imageUrl:"img/icons/exchange.svg",description:o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,"Getting started with server development can be tough, especially if you're evaluating technologies. We can reduce the burden when you bring your own OpenAPI document."),o.a.createElement("p",null,"Generate server stubs for 40+ different languages and technologies, including Java, Kotlin, Go, and PHP."),o.a.createElement("p",null,"Some generators support ",o.a.createElement("em",null,"Inversion of Control"),", allowing you to iterate on design via your OpenAPI document without worrying about blowing away your entire domain layer when you regenerate code."))},{title:o.a.createElement(o.a.Fragment,null,"Schemas/Configs"),imageUrl:"img/icons/pencil.svg",description:o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,"Ever wanted to iteratively design a MySQL database, but writing table declarations was too tedious?"),o.a.createElement("p",null,"OpenAPI Generator offers some special generators such as Apache2 Configuration, MySQL and GraphQL schema generators."),o.a.createElement("p",null,"You can easily extend these generators and their templates to create derivative generators!"))},{title:o.a.createElement(o.a.Fragment,null,"Documentation"),imageUrl:"img/icons/newspaper-o.svg",description:o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,"OpenAPI documents allow you to convert the metadata about your API into some other format."),o.a.createElement("p",null,"We include documentation formats such as HTML and Cwiki, which allow you to distribute static documentation to your consumers."),o.a.createElement("p",null,"We also support generating from OpenAPI 2.0 to newer JSON/YAML OpenAPI 3.x documents."))}];function v(e){for(var a=arguments.length,t=new Array(a>1?a-1:0),n=1;n<a;n++)t[n-1]=arguments[n];var l=e.reduce((function(e,a,n){return e+t[n-1]+a}));return l.replace(/\r?(\n)\s*\|/g,"$1")}var y=[{id:"learn",imageUrl:"img/color-logo.svg",title:o.a.createElement(o.a.Fragment,null,"Learn How"),content:o.a.createElement("div",null,o.a.createElement("span",null,o.a.createElement("p",null,"OpenAPI Generator supports many different integrations and use cases, including (but not limited to):"),o.a.createElement("ul",null,o.a.createElement("li",null,"Maven Plugin"),o.a.createElement("li",null,"Gradle Plugin"),o.a.createElement("li",null,"Bazel Plugin"),o.a.createElement("li",null,"CLI via Homebrew"),o.a.createElement("li",null,"CLI via Docker"),o.a.createElement("li",null,"CLI via npm"),o.a.createElement("li",null,"Generator SaaS")),o.a.createElement("p",null,"For details, see ",o.a.createElement("a",{href:"/docs/integrations"},"Workflow Integrations")),o.a.createElement("p",null,"Generation also allows for easy customization via options, custom templates, or even custom generators on your classpath. See ",o.a.createElement("a",{href:"/docs/customization"},"Customization")," for details.")))},{id:"connectOnSlack",imageUrl:"img/tools/Slack_Mark-256x256-3a29a6b.png",title:o.a.createElement(o.a.Fragment,null,"Active Community"),content:o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,o.a.createElement("strong",null,"Connect")," with us on Slack!"),o.a.createElement("p",null,"We're a very community-oriented project. We have an active community of users, contributors, and core team members on Slack. Slack is often a good place to start if you're looking for guidance about where to begin contributing, if you have an idea you're not sure fits the project, or if you just want to ask a question or say hello."),o.a.createElement("p",null,"Slack is free to ",o.a.createElement("a",{href:"https://slack.com/downloads",className:"href"},"download"),", and our workspace is free to ",o.a.createElement("a",{href:"https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM",className:"href"},"sign up"),"."))},{id:"try",imageUrl:"img/tools/npm.svg",title:o.a.createElement(o.a.Fragment,null,"Try via NPM"),content:o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,"The ",o.a.createElement("a",{href:"https://github.com/openapitools/openapi-generator-cli",className:"href"},"NPM package wrapper")," is cross-platform wrapper around the .jar artifact."),o.a.createElement("p",null,o.a.createElement("strong",null,"Install")," globally, exposing the CLI on the command line:"),o.a.createElement("p",null,o.a.createElement(E.a,{className:"bash"},v(f()))),o.a.createElement("p",null,"Then, ",o.a.createElement("strong",null,"generate")," a ruby client from a valid ",o.a.createElement("a",{href:"https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml",className:"href"},"petstore.yaml")," doc:"),o.a.createElement("p",null,o.a.createElement(E.a,{className:"bash"},"\n openapi-generator generate -i petstore.yaml -g ruby -o /tmp/test/\n ")))},{id:"tryHomebrew",imageUrl:"img/tools/homebrew-256x256.png",title:o.a.createElement(o.a.Fragment,null,"Try via Homebrew"),content:o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,o.a.createElement("strong",null,"Install")," via ",o.a.createElement("a",{href:"https://brew.sh/",className:"href"},"homebrew"),":"),o.a.createElement("p",null,o.a.createElement(E.a,{className:"bash"},"brew install openapi-generator")),o.a.createElement("p",null,"Then, ",o.a.createElement("strong",null,"generate")," a ruby client from a valid ",o.a.createElement("a",{href:"https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml",className:"href"},"petstore.yaml")," doc:"),o.a.createElement("p",null,o.a.createElement(E.a,{className:"bash"},"openapi-generator generate -i petstore.yaml -g ruby -o /tmp/test/")))},{id:"tryDocker",imageUrl:"img/tools/docker.png",title:o.a.createElement(o.a.Fragment,null,"Try via Docker"),content:o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,"The OpenAPI Generator image acts as a standalone executable. It can be used as an alternative to installing via homebrew, or for developers who are unable to install Java or upgrade the installed version."),o.a.createElement("p",null,"To generate code from a valid ",o.a.createElement("a",{href:"https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"},"petstore.yaml")," doc with this image, you'll need to mount a local location as a volume."),o.a.createElement("p",null,o.a.createElement(E.a,{className:"bash"},v(h()))),o.a.createElement("p",null,"For a full list of our docker images, check out ",o.a.createElement("a",{href:"https://hub.docker.com/u/openapitools"},"u/openapitools")," on Docker Hub."))}];function w(e){var a=e.id,t=e.title,n=e.imageUrl,l=e.content,r=Object(p.a)(n),c=a+" logo";return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{id:a,className:s()("row",d.a.calloutRow)},o.a.createElement("div",{className:s()("col col--3 blockImage")},o.a.createElement("img",{className:"image",src:r,alt:c})),o.a.createElement("div",{className:"col col--9"},o.a.createElement("h2",null,t),l)))}function N(e){var a=e.imageUrl,t=e.title,n=e.description,l=Object(p.a)(a);return o.a.createElement("div",{className:s()("col col--6",d.a.feature)},l&&o.a.createElement("div",{className:"text--center"},o.a.createElement("img",{className:d.a.featureImage,src:l,alt:"logo"})),o.a.createElement("h3",null,t),o.a.createElement("div",null,n))}function k(e){var a=e.image,t=e.infoLink,n=e.caption,l=Object(p.a)(a);return o.a.createElement("a",{href:t,key:t},o.a.createElement("img",{src:l,alt:n,title:n,className:d.a.productShowcaseSectionLogo}))}function I(e){var a=e.users,t=Object(u.a)().siteConfig,l=void 0===t?{}:t;return o.a.createElement(o.a.Fragment,null,o.a.createElement("h2",null,"Who is Using This?"),o.a.createElement("p",null,"Here are some users of OpenAPI Generator"),o.a.createElement("div",{className:"logos"},a.filter((function(e){return e.pinned})).map((function(e,a){return o.a.createElement(k,Object(n.a)({key:a},e))}))),o.a.createElement("div",{className:"more-users"},o.a.createElement(m.a,{className:s()("button button--outline button--primary button--lg",d.a.productShowcaseSectionButton),to:Object(p.a)("users")},"More ",l.title," Users")))}a.default=function(){var e=Object(u.a)().siteConfig,a=void 0===e?{}:e,t=a.customFields,l=t.sponsors,r=void 0===l?{}:l,c=t.users,g=void 0===c?{}:c;return o.a.createElement(i.a,{title:"Hello from "+a.title,description:"Description will go into a meta tag in <head />"},o.a.createElement("header",{className:s()("hero hero--primary",d.a.heroBanner)},o.a.createElement("div",{className:"container"},o.a.createElement("h1",{className:"hero__title"},a.title),o.a.createElement("p",{className:"hero__subtitle"},a.tagline),o.a.createElement("div",{className:d.a.buttons},o.a.createElement(m.a,{className:s()("button button--outline button--secondary button--lg",d.a.getStarted),to:Object(p.a)("#try")},"Try It Out"),o.a.createElement(m.a,{className:s()("button button--outline button--secondary button--lg",d.a.getStarted),to:Object(p.a)("docs/installation")},"Install")),o.a.createElement("div",{className:d.a.buttons},o.a.createElement(m.a,{className:s()("button button--outline button--secondary button--md",d.a.getStarted),to:Object(p.a)("docs/generators")},"Generators"),o.a.createElement(m.a,{className:s()("button button--outline button--secondary button--md",d.a.getStarted),to:Object(p.a)("docs/customization")},"Customization"),o.a.createElement(m.a,{className:s()("button button--outline button--secondary button--md",d.a.getStarted),to:Object(p.a)("docs/integrations")},"Integrations")))),o.a.createElement("div",{className:s()(d.a.announcement,d.a.announcementDark)},o.a.createElement("div",{className:d.a.announcementInner},o.a.createElement("h2",null,o.a.createElement("b",null,"Sponsors")),o.a.createElement("p",null,"If you find OpenAPI Generator useful, please consider asking your company to ",o.a.createElement("a",{href:"https://opencollective.com/openapi_generator"},"become a sponsor"),"."),o.a.createElement("p",null,"You can also individually sponsor the project by ",o.a.createElement("a",{href:"https://opencollective.com/openapi_generator"},"becoming a backer"),"."),o.a.createElement("h3",null,"Thank you to our bronze sponsors!"),o.a.createElement("div",{className:s()("avatar",d.a.bronzeSponsorAvatars)},r.filter((function(e){return e.bronze})).map((function(e){return o.a.createElement("a",{className:s()("avatar__photo-link bronze-sponsor"),href:e.infoLink,key:e.infoLink},o.a.createElement("img",{src:Object(p.a)(e.image),alt:e.caption,title:e.caption,className:s()("avatar__photo avatar__photo--lg")}))}))))),o.a.createElement("main",null,b&&b.length&&o.a.createElement("section",{className:d.a.features},o.a.createElement("div",{className:"features container"},o.a.createElement("div",{className:"row"},b.map((function(e,a){return o.a.createElement(N,Object(n.a)({key:a},e))}))))),y&&y.length&&o.a.createElement("section",{className:d.a.callout},o.a.createElement("div",{className:"callout container"},y.map((function(e,a){return o.a.createElement(w,Object(n.a)({key:a},e))}))))),g&&g.length&&o.a.createElement("div",{className:s()(d.a.announcement,d.a.announcementLight)},o.a.createElement("div",{className:s()(d.a.productShowcaseSection,d.a.announcementInner)},o.a.createElement(I,{users:g}))),o.a.createElement("div",{className:s()(d.a.announcement,d.a.announcementDark)},'"OpenAPI Tools" and "OpenAPI Generator" are not affiliated with OpenAPI Initiative (OAI)'))}}}]); |