Skip to content

Commit f30d09b

Browse files
committed
add: contibuting.md
[ci skip]
1 parent e17018f commit f30d09b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Typesense Java Client ☕ 🔍
2+
3+
Java client for the Typesense API: https://github.com/typesense/typesense
4+
5+
## Pull Request Process
6+
7+
Please note we have a code of conduct, please follow it in all your interactions with the project.
8+
9+
Before making a PR to this repository look out for the following guidelines.
10+
11+
## Guidelines for updating the client
12+
13+
- Head over to [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) and download the cli jar.
14+
- Download the latest api spec for typesense server from [typesense-api-spec](https://github.com/typesense/typesense-api-spec)
15+
- Create a new `config.json` and add the following content
16+
```json
17+
{
18+
"modelPackage" : "org.typesense.model",
19+
"apiPackage" : "org.typesense.api"
20+
}
21+
```
22+
- Run the following command:
23+
```bash
24+
java -jar swagger-codegen-cli-3.0.20.jar generate -i <path-to-spec> -l jaxrs-cxf-client -c <path-to-config.json> -o <out-dir>
25+
```
26+
- Now, copy the content under ```<out-dir>/src/gen/java/org/typesense/model``` and replace it with the content of the ```typesense-java/src/main/java/org/typesense/model``` folder in the `typesense-java` client repository.
27+
- And then make the necessary changes in `api` folder.
28+
29+
**NOTE**: The `model` directory is **read-only** make sure not to edit it.
30+

0 commit comments

Comments
 (0)