Hi,
Swagger introduced a placeholder for the default value in 2.2.44.
That results in the weird default value ##default in the generated schema for all properties that don't have the value defined in the annotation.
Currently, the Swagger2Module checks for empty. This is fine until 2.2.43.
I'm happy to provide a PR. But I would like to clarify the best way to deal with such changes in a dependency which is defined as provided first.
I see two options:
- Check for empty or "##default". The easiest, but would not result in a desired empty String with 2.2.44.
- Use reflection to find
Schema#DEFAULT_SENTINEL. If it exists, use the value to compare, if not check for empty. This would respect both versions, but reflection may break on its own. Additionally, I have no idea, how this can be tested.
Do you have a preference or see a third option, @CarstenWickner?
Hi,
Swagger introduced a placeholder for the default value in 2.2.44.
That results in the weird default value
##defaultin the generated schema for all properties that don't have the value defined in the annotation.Currently, the Swagger2Module checks for empty. This is fine until 2.2.43.
I'm happy to provide a PR. But I would like to clarify the best way to deal with such changes in a dependency which is defined as provided first.
I see two options:
Schema#DEFAULT_SENTINEL. If it exists, use the value to compare, if not check for empty. This would respect both versions, but reflection may break on its own. Additionally, I have no idea, how this can be tested.Do you have a preference or see a third option, @CarstenWickner?