Skip to content

Commit 94b962e

Browse files
authored
Add Scala client scripts to ensure-uptodate process (#5712)
* add scala client to ensure-upto-date * new scala-akka petstore oas3 folder * regenerate scala akka oas2 petstore * remove script
1 parent 419bcf0 commit 94b962e

25 files changed

Lines changed: 1773 additions & 1 deletion

bin/openapi3/scala-akka-petstore.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ fi
2727

2828
# if you've executed sbt assembly previously it will use that instead.
2929
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
30-
ags="generate --artifact-id "scala-akka-petstore-client" -t modules/openapi-generator/src/main/resources/scala-akka-client -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-akka -o samples/client/petstore/scala-akka $@"
30+
ags="generate --artifact-id "scala-akka-petstore-client" -t modules/openapi-generator/src/main/resources/scala-akka-client -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-akka -o samples/openapi3/client/petstore/scala-akka $@"
3131

3232
java $JAVA_OPTS -jar $executable $ags

bin/utils/ensure-up-to-date

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ declare -a samples=(
8585
"${root}/bin/cpp-restsdk-petstore.sh"
8686
"${root}/bin/cpp-qt5-qhttpengine-server-petstore.sh"
8787
#"${root}/bin/openapi3/powershell-experimental-petstore.sh"
88+
"${root}/bin/scala-akka-petstore.sh"
89+
"${root}/bin/openapi3/scala-akka-petstore.sh"
90+
"${root}/bin/openapi3/scala-sttp-petstore.sh"
8891
)
8992

9093
# Some special case generators may expect to be run as a stanalone process (e.g. modifying classpath)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4.3.0-SNAPSHOT
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# scala-akka-petstore-client
2+
3+
OpenAPI Petstore
4+
- API version: 1.0.0
5+
6+
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
7+
8+
9+
*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*
10+
11+
## Requirements
12+
13+
Building the API client library requires:
14+
1. Java 1.7+
15+
2. Maven/Gradle/SBT
16+
17+
## Installation
18+
19+
To install the API client library to your local Maven repository, simply execute:
20+
21+
```shell
22+
mvn clean install
23+
```
24+
25+
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
26+
27+
```shell
28+
mvn clean deploy
29+
```
30+
31+
Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
32+
33+
### Maven users
34+
35+
Add this dependency to your project's POM:
36+
37+
```xml
38+
<dependency>
39+
<groupId>org.openapitools</groupId>
40+
<artifactId>scala-akka-petstore-client</artifactId>
41+
<version>1.0.0</version>
42+
<scope>compile</scope>
43+
</dependency>
44+
```
45+
46+
### Gradle users
47+
48+
Add this dependency to your project's build file:
49+
50+
```groovy
51+
compile "org.openapitools:scala-akka-petstore-client:1.0.0"
52+
```
53+
54+
### SBT users
55+
56+
```scala
57+
libraryDependencies += "org.openapitools" % "scala-akka-petstore-client" % "1.0.0"
58+
```
59+
60+
## Getting Started
61+
62+
## Documentation for API Endpoints
63+
64+
All URIs are relative to *http://petstore.swagger.io/v2*
65+
66+
Class | Method | HTTP request | Description
67+
------------ | ------------- | ------------- | -------------
68+
*PetApi* | **addPet** | **POST** /pet | Add a new pet to the store
69+
*PetApi* | **deletePet** | **DELETE** /pet/{petId} | Deletes a pet
70+
*PetApi* | **findPetsByStatus** | **GET** /pet/findByStatus | Finds Pets by status
71+
*PetApi* | **findPetsByTags** | **GET** /pet/findByTags | Finds Pets by tags
72+
*PetApi* | **getPetById** | **GET** /pet/{petId} | Find pet by ID
73+
*PetApi* | **updatePet** | **PUT** /pet | Update an existing pet
74+
*PetApi* | **updatePetWithForm** | **POST** /pet/{petId} | Updates a pet in the store with form data
75+
*PetApi* | **uploadFile** | **POST** /pet/{petId}/uploadImage | uploads an image
76+
*StoreApi* | **deleteOrder** | **DELETE** /store/order/{orderId} | Delete purchase order by ID
77+
*StoreApi* | **getInventory** | **GET** /store/inventory | Returns pet inventories by status
78+
*StoreApi* | **getOrderById** | **GET** /store/order/{orderId} | Find purchase order by ID
79+
*StoreApi* | **placeOrder** | **POST** /store/order | Place an order for a pet
80+
*UserApi* | **createUser** | **POST** /user | Create user
81+
*UserApi* | **createUsersWithArrayInput** | **POST** /user/createWithArray | Creates list of users with given input array
82+
*UserApi* | **createUsersWithListInput** | **POST** /user/createWithList | Creates list of users with given input array
83+
*UserApi* | **deleteUser** | **DELETE** /user/{username} | Delete user
84+
*UserApi* | **getUserByName** | **GET** /user/{username} | Get user by user name
85+
*UserApi* | **loginUser** | **GET** /user/login | Logs user into the system
86+
*UserApi* | **logoutUser** | **GET** /user/logout | Logs out current logged in user session
87+
*UserApi* | **updateUser** | **PUT** /user/{username} | Updated user
88+
89+
90+
## Documentation for Models
91+
92+
- [ApiResponse](ApiResponse.md)
93+
- [Category](Category.md)
94+
- [InlineObject](InlineObject.md)
95+
- [InlineObject1](InlineObject1.md)
96+
- [Order](Order.md)
97+
- [Pet](Pet.md)
98+
- [Tag](Tag.md)
99+
- [User](User.md)
100+
101+
102+
## Documentation for Authorization
103+
104+
Authentication schemes defined for the API:
105+
### api_key
106+
107+
- **Type**: API key
108+
- **API key parameter name**: api_key
109+
- **Location**: HTTP header
110+
111+
### auth_cookie
112+
113+
- **Type**: API key
114+
- **API key parameter name**: AUTH_KEY
115+
- **Location**:
116+
117+
118+
## Author
119+
120+
121+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version := "1.0.0"
2+
name := "scala-akka-petstore-client"
3+
organization := "org.openapitools"
4+
scalaVersion := "2.12.8"
5+
6+
libraryDependencies ++= Seq(
7+
"com.typesafe" % "config" % "1.3.3",
8+
"com.typesafe.akka" %% "akka-actor" % "2.5.21",
9+
"com.typesafe.akka" %% "akka-stream" % "2.5.21",
10+
"com.typesafe.akka" %% "akka-http" % "10.1.7",
11+
"org.json4s" %% "json4s-jackson" % "3.6.5",
12+
"org.json4s" %% "json4s-ext" % "3.6.5",
13+
"de.heikoseeberger" %% "akka-http-json4s" % "1.25.2",
14+
// test dependencies
15+
"org.scalatest" %% "scalatest" % "3.0.5" % "test",
16+
"junit" % "junit" % "4.13" % "test"
17+
)
18+
19+
resolvers ++= Seq(Resolver.mavenLocal)
20+
21+
scalacOptions := Seq(
22+
"-unchecked",
23+
"-deprecation",
24+
"-feature"
25+
)
26+
27+
publishArtifact in (Compile, packageDoc) := false

0 commit comments

Comments
 (0)