Skip to content

Commit 197b448

Browse files
shijinkuiwing328
authored andcommitted
[doc] akka-scala and Java README normalize (#7382)
* normalize scala-akka and Java README.mustache * move version info to the project info section
1 parent 6bf84d5 commit 197b448

File tree

2 files changed

+52
-55
lines changed

2 files changed

+52
-55
lines changed

modules/swagger-codegen/src/main/resources/Java/README.mustache

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,52 @@
11
# {{artifactId}}
22

3+
{{appName}}
4+
- API version: {{appVersion}}
5+
{{^hideGenerationTimestamp}}
6+
- Build date: {{generatedDate}}
7+
{{/hideGenerationTimestamp}}
8+
9+
{{#appDescription}}{{{appDescription}}}{{/appDescription}}
10+
11+
{{#infoUrl}}
12+
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
13+
{{/infoUrl}}
14+
15+
*Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen)*
16+
17+
318
## Requirements
419

5-
Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
20+
Building the API client library requires:
21+
1. Java 1.7+
22+
2. Maven/Gradle
623

724
## Installation
825

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

1128
```shell
12-
mvn install
29+
mvn clean install
1330
```
1431

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

1734
```shell
18-
mvn deploy
35+
mvn clean deploy
1936
```
2037

21-
Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.
38+
Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
2239

2340
### Maven users
2441

2542
Add this dependency to your project's POM:
2643

2744
```xml
2845
<dependency>
29-
<groupId>{{{groupId}}}</groupId>
30-
<artifactId>{{{artifactId}}}</artifactId>
31-
<version>{{{artifactVersion}}}</version>
32-
<scope>compile</scope>
46+
<groupId>{{{groupId}}}</groupId>
47+
<artifactId>{{{artifactId}}}</artifactId>
48+
<version>{{{artifactVersion}}}</version>
49+
<scope>compile</scope>
3350
</dependency>
3451
```
3552

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

4663
At first generate the JAR by executing:
4764

48-
mvn package
65+
```shell
66+
mvn clean package
67+
```
4968

5069
Then manually install the following JARs:
5170

52-
* target/{{{artifactId}}}-{{{artifactVersion}}}.jar
53-
* target/lib/*.jar
71+
* `target/{{{artifactId}}}-{{{artifactVersion}}}.jar`
72+
* `target/lib/*.jar`
5473

5574
## Getting Started
5675

modules/swagger-codegen/src/main/resources/akka-scala/README.mustache

Lines changed: 22 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,51 @@
1-
# NAME
1+
# {{artifactId}}
22

33
{{appName}}
4-
5-
{{#appDescription}}{{{appDescription}}}{{/appDescription}}
6-
7-
# VERSION
8-
9-
Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
10-
114
- API version: {{appVersion}}
12-
- Package version: {{moduleVersion}}
135
{{^hideGenerationTimestamp}}
14-
- Build date: {{generatedDate}}
6+
- Build date: {{generatedDate}}
157
{{/hideGenerationTimestamp}}
16-
- Build package: {{generatorClass}}
8+
9+
{{#appDescription}}{{{appDescription}}}{{/appDescription}}
10+
1711
{{#infoUrl}}
18-
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
12+
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
1913
{{/infoUrl}}
2014

21-
# Requirements
15+
*Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen)*
2216

23-
Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
17+
## Requirements
18+
19+
Building the API client library requires:
20+
1. Java 1.7+
21+
2. Maven/Gradle/SBT
2422

2523
## Installation
2624

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

2927
```shell
30-
mvn install
28+
mvn clean install
3129
```
3230

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

3533
```shell
36-
mvn deploy
34+
mvn clean deploy
3735
```
3836

39-
Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.
37+
Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
4038

4139
### Maven users
4240

4341
Add this dependency to your project's POM:
4442

4543
```xml
4644
<dependency>
47-
<groupId>{{{groupId}}}</groupId>
48-
<artifactId>{{{artifactId}}}</artifactId>
49-
<version>{{{artifactVersion}}}</version>
50-
<scope>compile</scope>
45+
<groupId>{{{groupId}}}</groupId>
46+
<artifactId>{{{artifactId}}}</artifactId>
47+
<version>{{{artifactVersion}}}</version>
48+
<scope>compile</scope>
5149
</dependency>
5250
```
5351

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

66+
## Getting Started
67+
6868
## Documentation for API Endpoints
6969

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

7272
Class | Method | HTTP request | Description
7373
------------ | ------------- | ------------- | -------------
74-
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
74+
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | **{{operationId}}** | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
7575
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
7676

7777
## Documentation for Models
@@ -101,28 +101,6 @@ Class | Method | HTTP request | Description
101101

102102
{{/authMethods}}
103103

104-
105-
# BUILDING YOUR LIBRARY
106-
107-
See the homepage `https://github.com/swagger-api/swagger-codegen` for full details.
108-
But briefly, clone the git repository, build the codegen codebase, set up your build
109-
config file, then run the API build script. You will need git, Java 7 or 8 and Apache
110-
maven 3.0.3 or better already installed.
111-
112-
Your library files will be built under `WWW::MyProjectName`.
113-
114-
$ git clone https://github.com/swagger-api/swagger-codegen.git
115-
$ cd swagger-codegen
116-
$ mvn package
117-
$ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
118-
-i [URL or file path to JSON swagger API spec] \
119-
-l akka-scala \
120-
-c /path/to/config/file.json \
121-
-o /path/to/output/folder
122-
123-
Bang, all done. Run the `autodoc` script in the `bin` directory to see the API
124-
you just built.
125-
126104
## Author
127105

128106
{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}}

0 commit comments

Comments
 (0)