Bug reports and pull requests are welcome on GitHub at https://github.com/typesense/typesense-java.
Please note we have a code of conduct, please follow it in all your interactions with the project.
Before making a PR to this repository look out for the following guidelines.
- Head over to Swagger Codegen and download the cli jar.
- Download the latest api spec for typesense server from typesense-api-spec
- Create a new
config.jsonand add the following content{ "modelPackage" : "org.typesense.model", "apiPackage" : "org.typesense.api" } - Run the following command:
java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED \ --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED \ --add-opens java.desktop/java.awt.font=ALL-UNNAMED -jar ~/apps/swagger-codegen-cli-3.0.20.jar generate \ -i /path/to/typesense-api-spec/openapi.yml -l jaxrs-cxf-client -c config.json -o /tmp/model - Now, copy the content under
<out-dir>/src/gen/java/org/typesense/modeland replace it with the content of thetypesense-java/src/main/java/org/typesense/modelfolder in thetypesense-javaclient repository. - And then make the necessary changes in
apifolder.
NOTE: The model directory is read-only make sure not to edit it.
Publishing requires the presence of a ~/.gradle.properties file:
signing.keyId=x1234567
signing.password=
signing.secretKeyRingFile=/Users/user/.gnupg/secring.gpg
sonatypeUsername=xxxxxx
sonatypePassword=The secring.gpg file can be generated with:
gpg --keyring secring.gpg --export-secret-keys > ~/.gnupg/secring.gpg./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository