-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat][docs][website] Initial docusaurus based site #1770
Conversation
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
…ical order pinning
…generators/README)
* master: (26 commits) Delete unused method (OpenAPITools#1744) Use JsonNullable wrapper on nullable/x-nullable fields (OpenAPITools#1762) Add an option to use reflection in equals, hashCode (Java client) (OpenAPITools#1767) [Slim] Encode path to support non-latin characters (OpenAPITools#1687) [elm] Add support for sending headers (OpenAPITools#1704) Add test case for InlineModelResolver: inline array response (OpenAPITools#1778) fix group parameter logic (OpenAPITools#1779) Add test case for InlineModelResolver: inline array request body (OpenAPITools#1777) Add test case for InlineModelResolver: inline array schema (OpenAPITools#1772) Fix type inference error (OpenAPITools#1773) skip default value for contaier in spring (OpenAPITools#1725) [Slim] Add PHP CodeSniffer config template (OpenAPITools#1764) Use CompareNetObject for object comparison in C# client (refactor) (OpenAPITools#1765) Add test case for InlineModelResolver (OpenAPITools#1771) Add online gen tests (OpenAPITools#1759) Resolve inline models before preprocess (OpenAPITools#1761) better handling of allOf (composition) (OpenAPITools#1757) Fix UUID support (OpenAPITools#1746) Use appInfo.version for podspec (OpenAPITools#1760) [Swift 4] Add `createURLRequest` method (OpenAPITools#1727) ...
@OpenAPITools/openapi-generator-collaborators I'm looking for feedback on this PR, which introduces a new static documentation site intended to be deployed to gh-pages. There are about 10 wiki pages to cleanup and migrate, then a couple of small things included configuring CI to automatically publish to gh-pages. But I think as-is, it is pretty sound and the TODO items can be moved to issues for later pickup. |
@jimschubert thanks for your work on this. Is it correct to say the documentation under wiki and "docs" folder will be consolidated into the new static documentation site and then these documentations (wiki, "docs" folder) will be removed?? |
@wing328 this PR adds a Docusaurus works from So the idea is to move all wiki docs under |
Understood so the wiki pages will be consolidated into |
I think this PR is ready for evaluation, and to merge into master if we're all comfortable with it. This solution has been more maintainable than my original attempt with Git Playbook. One of the biggest differences being that Docusaurus does automatic resolution of links in referenced documentation, and compiles those docs to HTML output for deployment (Git Playbook pulled Markdown from the repo and rendered client-side, resulting in a small rendering delay). After deployment, we'd want to clear the Wiki texts I've ticked in the TODO items, and link to the new deployed pages. The remaining TODO items can either be left on the wiki (git, repo, and core contributor specific details), or would take some time to rewrite (FAQ has many headers and makes nav look jumped, new generator wiki just links to PRs where people have created new generators). I've updated the CI to publish to gh-pages according to the Docusaurus documentation. The only differences are that I've used We currently have a CNAME for http://openapi-generator.tech/ bound to https://openapitools.github.io, and I'm not sure how the bound domain would work with the default configuration. If, after publish, the site does not render correctly, we may need to change diff --git a/website/siteConfig.js b/website/siteConfig.js
index 2f9d548885..62a1dfd2b1 100755
--- a/website/siteConfig.js
+++ b/website/siteConfig.js
@@ -13,8 +13,8 @@ const users = loadYaml("dynamic/users.yml");
const siteConfig = {
title: 'OpenAPI Generator', // Title for your website.
tagline: 'Generate clients, servers, and documentation from OpenAPI 2.0/3.x documents',
- url: 'https://OpenAPITools.github.io', // Your website URL
- baseUrl: '/openapi-generator/', // Base URL for your project */
+ url: 'https://openapi-generator.tech', // Your website URL
+ baseUrl: '/', // Base URL for your project */
// For github.io type URLs, you would set the url and baseUrl like:
// url: 'https://facebook.github.io',
// baseUrl: '/test-site/', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!!! Looks good to me. ✨
My thoughts about the questions:
I think yes, we can rely on users to query CLI for the generator options. (e.g . What the generator name is available on If users couldn't find that, we may need to provide users how to query what parameters available.
I think the wiki page can be left on the Wiki as the page targets us (team members). But users may wants to know that the release frequency in the project and what kind of changes is contained in each release. |
@ackintosh Thanks for the feedback! The release cycle would be addressed by the remaining FAQ page. I will have to sort this FAQ into the docs in a meaningful way. There are process, generator, and general questions all answered in the same doc, and I think some of the question are clarified in the updated guides. |
FAQ has been split into multiple smaller documents to better categorize and allow users to find what they're looking for (in docs folder or in new website). Release summary information (versioning strategy and cadence) has been migrated from the Wiki and clarified a bit. Also adds copy button for all code snippets in website.
I think it's fine to left some docs in the wiki to start with (I didn't expect all docs to be migrated in the debut) |
@wing328 thanks for the feedback. I have one more remaining doc to migrate (new generator). And one more I would like to write: extending a built-in generator (see https://github.com/jimschubert/custom-generator-example). I think the remaining wiki pages would best be left on the wiki, and the remaining TODO items would be new docs which I can create issues for tracking. After this, I think the "Documentation" section of our short-term roadmap will be complete. |
@jimschubert when you've time, can you please resolve the merge conflicts? |
* master: (52 commits) Support for "x-enum-descriptions" (OpenAPITools#1752) add new sample files Add a checklist to issue report (OpenAPITools#1851) Fix typo in template (OpenAPITools#1859) update samples add isModel to updatebooleanflagwithcodegenproperty (OpenAPITools#1844) [python-client] Add model default values (OpenAPITools#1776) fix: force to decode as utf-8 when header contains application/json to avoid text garbling. (OpenAPITools#1700) Better support for composed schema (allOf) (OpenAPITools#1842) Add additional properties to Java CodegenModel (OpenAPITools#1854) Minor Angular type improvements (OpenAPITools#1843) [DART] fix: set fields to null if json value is null. (OpenAPITools#1798) add options to maven plugin (OpenAPITools#1845) fix unqiue name in handling forward slash (OpenAPITools#1839) better handle of oauth (OpenAPITools#1838) [C] Support for authentication methods (OpenAPITools#1628) better error message when parameter ref not defined (OpenAPITools#1837) Add links to articles about openapi generator Add a link to @watiko article Delete langs command (OpenAPITools#1836) ...
@wing328 I've fixed the merge conflicts (they're due to the new markdown formatting in the generators docs). I've also rewrote the documentation for creating a new generator, and put this under the "Contributing" sidebar section in docs. This completes the migration of all content from the wiki that I have planned for this branch. The remaining two items are currently undocumented and should probably become issues to document these (I think you may have already accounted for the feature matrix). Once this is merged, and the deployment options are tweaked to work with the CNAME and custom domain, a follow up would be to modify the migrated wiki pages to point to the new "current" docs whether that's on the hosted site or a direct link to the docs within the repository. I'd also like to thin out the README and direct users to the new site as the source of truth for guides/options/etc. Docusaurus also gives us the ability to version docs. So when we move between minor and major versions, we will probably want to execute the versioning strategy for deployment. |
Travis CI failed with the following:
|
I saw GH_NAME, GH_EMAIL and GITHUB_TOKEN setup in Travis and my guess is that |
@wing328 yeah it should be my username. I wonder if I set it to my full name by accident. Have you changed this already? |
Yes, just changed it 3 seconds ago with my user ID, token and email address. Just restarted the Travis latest master job to see how it goes. |
UPDATE: Just renamed |
Thanks for sorting that out! I was following two articles for CI setup, and they must have differed sightly and I missed it. |
@jimschubert no problem bro. |
* Iniital docusaurus based site * Remove error about default local being used by String.format * Change pinned users to represent global presence rather than alphabetical order pinning * Include generator indexes in ensure-up-to-date (docusaurus site and /generators/README) * Add Font Awesome attribution footer * Remove feature callout until it is completed * Include NPM try it out section * Improve "Getting Started" type docs * Include new custom template documentation * Updating templating and customization docs * Add vendor extension docs * Cleanup templating page(s). * Move users to yaml file for easy edit. * travis configuration, and baseUrl mods to image URLs * [docs] Migrate FAQ, release summary from wiki FAQ has been split into multiple smaller documents to better categorize and allow users to find what they're looking for (in docs folder or in new website). Release summary information (versioning strategy and cadence) has been migrated from the Wiki and clarified a bit. Also adds copy button for all code snippets in website. * Copy current contributing/code of conduct to website * [docs] Creating a new generator
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,. Default:3.4.x
,4.0.x
master
.Description of the PR
To evaluate:
This will automatically open
http://localhost:3000
with the generated site.This PR include some changes to the docs under
./docs
to support the docusaurus configuration. Every generator markdown under./docs/generators
includes the docusaurus metadata header, although the tool doesn't currently support indexing markdown documents in subdirectories under./docs
(as they support localization and walking the tree becomes difficult).There are some todo items, either before or after this is evaluated:
bin/utils/export_generators_docusaurus_index.sh
in CIFeature matrixsee [Discussion] Generator Compatibility Check and Table #503List OpenAPI Specification features we supportsee [Discussion] Generator Compatibility Check and Table #503docs/conduct.md
anddocs/contributing.md
(where these include docusaurus headers.templating.md
) Wiki Mustache VariablesQuestions:
Can the following be left on the Wiki?
TODO items (so I don't forget)
(included all three above items in single feature request: [REQ] Provide templating authoring details in config-help or generate CLI command (or subcommands of generate) #1811)