[doc] akka-scala and Java README normalize (#7382)

* normalize scala-akka and Java README.mustache

* move version info to the project info section
This commit is contained in:
Jinkui Shi 2018-01-20 14:15:16 +08:00 committed by William Cheng
parent 6bf84d5fa7
commit 197b4481ef
2 changed files with 52 additions and 55 deletions

View File

@ -1,24 +1,41 @@
# {{artifactId}} # {{artifactId}}
{{appName}}
- API version: {{appVersion}}
{{^hideGenerationTimestamp}}
- Build date: {{generatedDate}}
{{/hideGenerationTimestamp}}
{{#appDescription}}{{{appDescription}}}{{/appDescription}}
{{#infoUrl}}
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
{{/infoUrl}}
*Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen)*
## Requirements ## Requirements
Building the API client library requires [Maven](https://maven.apache.org/) to be installed. Building the API client library requires:
1. Java 1.7+
2. Maven/Gradle
## Installation ## Installation
To install the API client library to your local Maven repository, simply execute: To install the API client library to your local Maven repository, simply execute:
```shell ```shell
mvn install mvn clean install
``` ```
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
```shell ```shell
mvn deploy mvn clean deploy
``` ```
Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
### Maven users ### Maven users
@ -26,10 +43,10 @@ Add this dependency to your project's POM:
```xml ```xml
<dependency> <dependency>
<groupId>{{{groupId}}}</groupId> <groupId>{{{groupId}}}</groupId>
<artifactId>{{{artifactId}}}</artifactId> <artifactId>{{{artifactId}}}</artifactId>
<version>{{{artifactVersion}}}</version> <version>{{{artifactVersion}}}</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
``` ```
@ -45,12 +62,14 @@ compile "{{{groupId}}}:{{{artifactId}}}:{{{artifactVersion}}}"
At first generate the JAR by executing: At first generate the JAR by executing:
mvn package ```shell
mvn clean package
```
Then manually install the following JARs: Then manually install the following JARs:
* target/{{{artifactId}}}-{{{artifactVersion}}}.jar * `target/{{{artifactId}}}-{{{artifactVersion}}}.jar`
* target/lib/*.jar * `target/lib/*.jar`
## Getting Started ## Getting Started

View File

@ -1,42 +1,40 @@
# NAME # {{artifactId}}
{{appName}} {{appName}}
- API version: {{appVersion}}
{{^hideGenerationTimestamp}}
- Build date: {{generatedDate}}
{{/hideGenerationTimestamp}}
{{#appDescription}}{{{appDescription}}}{{/appDescription}} {{#appDescription}}{{{appDescription}}}{{/appDescription}}
# VERSION
Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: {{appVersion}}
- Package version: {{moduleVersion}}
{{^hideGenerationTimestamp}}
- Build date: {{generatedDate}}
{{/hideGenerationTimestamp}}
- Build package: {{generatorClass}}
{{#infoUrl}} {{#infoUrl}}
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
{{/infoUrl}} {{/infoUrl}}
# Requirements *Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen)*
Building the API client library requires [Maven](https://maven.apache.org/) to be installed. ## Requirements
Building the API client library requires:
1. Java 1.7+
2. Maven/Gradle/SBT
## Installation ## Installation
To install the API client library to your local Maven repository, simply execute: To install the API client library to your local Maven repository, simply execute:
```shell ```shell
mvn install mvn clean install
``` ```
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
```shell ```shell
mvn deploy mvn clean deploy
``` ```
Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
### Maven users ### Maven users
@ -44,10 +42,10 @@ Add this dependency to your project's POM:
```xml ```xml
<dependency> <dependency>
<groupId>{{{groupId}}}</groupId> <groupId>{{{groupId}}}</groupId>
<artifactId>{{{artifactId}}}</artifactId> <artifactId>{{{artifactId}}}</artifactId>
<version>{{{artifactVersion}}}</version> <version>{{{artifactVersion}}}</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
``` ```
@ -65,13 +63,15 @@ compile "{{{groupId}}}:{{{artifactId}}}:{{{artifactVersion}}}"
libraryDependencies += "{{{groupId}}}" % "{{{artifactId}}}" % "{{{artifactVersion}}}" libraryDependencies += "{{{groupId}}}" % "{{{artifactId}}}" % "{{{artifactVersion}}}"
``` ```
## Getting Started
## Documentation for API Endpoints ## Documentation for API Endpoints
All URIs are relative to *{{basePath}}* All URIs are relative to *{{basePath}}*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | **{{operationId}}** | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
## Documentation for Models ## Documentation for Models
@ -101,28 +101,6 @@ Class | Method | HTTP request | Description
{{/authMethods}} {{/authMethods}}
# BUILDING YOUR LIBRARY
See the homepage `https://github.com/swagger-api/swagger-codegen` for full details.
But briefly, clone the git repository, build the codegen codebase, set up your build
config file, then run the API build script. You will need git, Java 7 or 8 and Apache
maven 3.0.3 or better already installed.
Your library files will be built under `WWW::MyProjectName`.
$ git clone https://github.com/swagger-api/swagger-codegen.git
$ cd swagger-codegen
$ mvn package
$ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
-i [URL or file path to JSON swagger API spec] \
-l akka-scala \
-c /path/to/config/file.json \
-o /path/to/output/folder
Bang, all done. Run the `autodoc` script in the `bin` directory to see the API
you just built.
## Author ## Author
{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} {{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}}