guardrail-dev / guardrail-dev/guardrail

proper comments in generated code

Open
#569 1 comment 1 reaction 0 assignees View on GitHub
core help wanted java scala
Dominant language
Scala
Stars
541
Forks
138
PR merge metrics
No merged PRs in 30d

Description

first of all, kudos to the great package/tool for code gen. it fits our stack of akka-http/circe perfectly.

small suggestion in readability of the generated code. some comments for the functions would be helpful, especially those the require mandatory implementation. For example, I have a use case of handling file uploads with `multipart/form-data`. I set `operationId: getUpload` and ended up with function I need to implement

```
getUpload(respond: UploadResource.getUploadResponse.type)(front: (File, Option[String], ContentType), back: (File, Option[String], ContentType)): scala.concurrent.Future[UploadResource.getUploadResponse]
```

```
getUploadMapFileField(fieldName: String, fileName: Option[String], contentType: ContentType): File
```

the first one is standard, but the second one took me a while to figure out. Some comments in the meaning of this function would be very helpful.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.