Skip to content

Commit

Permalink
[doc] akka-scala and Java README normalize (#7382)
Browse files Browse the repository at this point in the history
* normalize scala-akka and Java README.mustache

* move version info to the project info section
  • Loading branch information
shijinkui authored and wing328 committed Jan 20, 2018
1 parent 6bf84d5 commit 197b448
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 55 deletions.
41 changes: 30 additions & 11 deletions modules/swagger-codegen/src/main/resources/Java/README.mustache
Original file line number Diff line number Diff line change
@@ -1,35 +1,52 @@
# {{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

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

To install the API client library to your local Maven repository, simply execute:

```shell
mvn install
mvn clean install
```

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

```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

Add this dependency to your project's POM:

```xml
<dependency>
<groupId>{{{groupId}}}</groupId>
<artifactId>{{{artifactId}}}</artifactId>
<version>{{{artifactVersion}}}</version>
<scope>compile</scope>
<groupId>{{{groupId}}}</groupId>
<artifactId>{{{artifactId}}}</artifactId>
<version>{{{artifactVersion}}}</version>
<scope>compile</scope>
</dependency>
```

Expand All @@ -45,12 +62,14 @@ compile "{{{groupId}}}:{{{artifactId}}}:{{{artifactVersion}}}"

At first generate the JAR by executing:

mvn package
```shell
mvn clean package
```

Then manually install the following JARs:

* target/{{{artifactId}}}-{{{artifactVersion}}}.jar
* target/lib/*.jar
* `target/{{{artifactId}}}-{{{artifactVersion}}}.jar`
* `target/lib/*.jar`

## Getting Started

Expand Down
Original file line number Diff line number Diff line change
@@ -1,53 +1,51 @@
# NAME
# {{artifactId}}

{{appName}}

{{#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}}
- Build date: {{generatedDate}}
{{/hideGenerationTimestamp}}
- Build package: {{generatorClass}}

{{#appDescription}}{{{appDescription}}}{{/appDescription}}

{{#infoUrl}}
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
For more information, please visit [{{{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

To install the API client library to your local Maven repository, simply execute:

```shell
mvn install
mvn clean install
```

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

```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

Add this dependency to your project's POM:

```xml
<dependency>
<groupId>{{{groupId}}}</groupId>
<artifactId>{{{artifactId}}}</artifactId>
<version>{{{artifactVersion}}}</version>
<scope>compile</scope>
<groupId>{{{groupId}}}</groupId>
<artifactId>{{{artifactId}}}</artifactId>
<version>{{{artifactVersion}}}</version>
<scope>compile</scope>
</dependency>
```

Expand All @@ -65,13 +63,15 @@ compile "{{{groupId}}}:{{{artifactId}}}:{{{artifactVersion}}}"
libraryDependencies += "{{{groupId}}}" % "{{{artifactId}}}" % "{{{artifactVersion}}}"
```

## Getting Started

## Documentation for API Endpoints

All URIs are relative to *{{basePath}}*

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}}

## Documentation for Models
Expand Down Expand Up @@ -101,28 +101,6 @@ Class | Method | HTTP request | Description

{{/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

{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}}
Expand Down

0 comments on commit 197b448

Please # to comment.