Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document local mock setup for development #45

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,29 @@
[![CI Build](https://github.com/axonivy-market/deepl-connector/actions/workflows/ci.yml/badge.svg)](https://github.com/axonivy-market/deepl-connector/actions/workflows/ci.yml)

Read our [documentation](deepl-connector-product/README.md).


## Development

To maintain this project and simulate requests there's no necessity to have a DeepL account and accessible environment.

### Mocking
Setup the mock service for DeepL requests, which provides static results. This mock is enabled when running JUnit tests, but it can be enabled for the normal Designer as follows:

- Use your File Manager to navigate into the `configuration` directory of your Axon.ivy Designer.
- Create a file called `app.yaml` and add the following contents with an editor:

```yaml
# yaml-language-server: $schema=https://json-schema.axonivy.com/app/12.0.0/app.json
RestClients:
deepl:
Url: '{ivy.app.baseurl}/api/mock'
Properties:
AUTH.deepLKey: notMyKey
Features:
- ch.ivyteam.ivy.rest.client.mapper.JsonFeature
- org.glassfish.jersey.media.multipart.MultiPartFeature
- ch.ivyteam.ivy.rest.client.security.CsrfHeaderFeature
```
- Run any startable Process in the Demo project and verify in the RuntimeLog view, that requests are being sent to localhost rathern than deepl.com.

Loading