Skip to content

Commit

Permalink
Merge pull request #1723 from willbrown16/patch-2
Browse files Browse the repository at this point in the history
Add simplified structure text to reqrep docs
  • Loading branch information
wjhendry authored Jun 24, 2024
2 parents 24d75aa + 92c8e5e commit 5af9e8d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/03_server/03_request-server/03_advanced.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,19 @@ By defining your own Request Servers, you have maximum flexibility.
* For the request, optional fields should have a default value in the primary constructor.
* You cannot use native Kotlin classes. You should wrap these in custom input and output classes.

We recommend that you locate your classes within the messages module of your application. This is where we place all the custom message types for our application. You need to ensure that the _app-name_**-script-config** module has a dependency on the messages module.
Within a simplified project, we recommend that you locate your classes within the main/kotlin messages folder of your project structure. Ensure that the _app-name_**-reqrep.kts** file has a dependency on the _app-name_**-app** ScriptModule.

```bash
@file:ScriptModules("{app-name}-app")
```

Within a legacy project, we recommend that you locate your classes within the messages module of your application. This is where we place all the custom message types for our application. You need to ensure that the _app-name_**-script-config** module has a dependency on the messages module.

```bash
api(project("{app-name}-messages"))
```


The `requestReply` code blocks can be as simple or complex as your requirements. They are useful, for example, if you want to request data from a number of different tables and views that are not related. By nesting and joining all the relevant data in your `requestReply` statement, you create your own metadata for the Request Server, so it can then be used anywhere in the module.

### Syntax
Expand Down

0 comments on commit 5af9e8d

Please sign in to comment.