eikek / eikek/sbt-openapi-schema
Unable to parse a contract with a raw object
- Dominant language
- Scala
- Stars
- 27
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
In a DTO modeling an error, we have parameters in it, used to format error message to user for instance.
As this parameter can be a number, a string or whatever, we have something like this in our contract :
```
components:
schemas:
Problem:
type: object
properties:
title:
type: string
params:
type: object
additionalProperties:
type: object
```
But the generator is unable to narrow a Type for params values. A workaround has been to add a `format: json` on `additionalProperties` in our contract but it is not a viable solution on the long term. It eventually allows to generate correctly our other clients, but this is not what we want to see here.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.