guardrail-dev / guardrail-dev/guardrail
vendor extension inside "items"
- Dominant language
- Scala
- Stars
- 541
- Forks
- 138
- PR merge metrics
- No merged PRs in 30d
Description
Hey guardrail is a super great project and I love it but I'm here to report a bug:
Generating clients for akka-http. Using the maven plugin 0.59.0.
In my spec file I choose a `x-jvm-type` nested inside some request paramters on a Post. The generated client ends up taking `String` instead of the type I specified.
Example snippet:
```yaml
/v1/Services/{ServerlessServiceSid}/Builds:
post:
tags:
- "Builds"
x-jvm-package: "Serverless"
summary: "Create a build of the service"
operationId: "createBuild"
parameters:
- $ref: "#/components/parameters/ServerlessServiceSid"
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
required:
- AssetVersions
- FunctionVersions
- Dependencies
properties:
AssetVersions:
type: array
items:
x-jvm-type: ServerlessFileVersionSid # !
example: ZN00000000000000000000000000000000 # !
type: string # !
FunctionVersions:
type: array
items:
x-jvm-type: ServerlessFileVersionSid # !
example: ZN00000000000000000000000000000000 # !
type: string # !
Dependencies:
type: string
responses:
201:
description: "Created"
content:
application/json:
schema:
$ref: "#/components/schemas/ServerlessBuildResource"
400:
$ref: '#/components/responses/BadRequest'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
```
The generated client has this:
```
def createBuild(serverlessServiceSid: ServerlessServiceSid, assetVersions: Iterable[String], functionVersions: Iterable[String], dependencies: String, headers: List[HttpHeader] = Nil): EitherT[Future, ServiceClientError, CreateBuildResponse]
```
I expected the two `Iterable[String]` to be `Vector[ServerlessFileVersionSid]`
Have attempted a workaround of moving the `#!` lines above to a `$ref` but generated client didn't change.
Contributor guide
Assessment
This issue has not been assessed yet.