The Number Formatter must use the Locale of the Swagger2MarkupConfig output language.
This commit is contained in:
@@ -31,6 +31,7 @@ import org.apache.commons.lang3.Validate;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
@@ -164,9 +165,8 @@ public class PropertiesTableComponent extends MarkupComponent<PropertiesTableCom
|
||||
descriptionContent.boldText(labels.getLabel(PATTERN_COLUMN)).text(COLON).literalText(Json.pretty(optionalPattern.get()));
|
||||
}
|
||||
|
||||
DecimalFormat numberFormatter = new DecimalFormat("#.##");
|
||||
//NumberFormat numberFormatter = DecimalFormat.getInstance(config.getOutputLanguage().toLocale());
|
||||
//numberFormatter.setMinimumFractionDigits(0);
|
||||
DecimalFormat numberFormatter = new DecimalFormat("#.##",
|
||||
DecimalFormatSymbols.getInstance(config.getOutputLanguage().toLocale()));
|
||||
|
||||
if (optionalMinValue.isPresent()) {
|
||||
if (isNotBlank(descriptionContent.toString())) {
|
||||
|
||||
@@ -11,23 +11,23 @@
|
||||
|**sampleDoubleComplete** +
|
||||
__optional__|sample double with range 0.0-10.5 +
|
||||
**Minimum value** : `0` +
|
||||
**Maximum value** : `10,5`|number (double)
|
||||
**Maximum value** : `10.5`|number (double)
|
||||
|**sampleDoubleExclusiveBoth** +
|
||||
__optional__|sample double with range 0.0-10.5 (both exclusive) +
|
||||
**Minimum value (exclusive)** : `0` +
|
||||
**Maximum value (exclusive)** : `10,5`|number (double)
|
||||
**Maximum value (exclusive)** : `10.5`|number (double)
|
||||
|**sampleDoubleExclusiveMaximum** +
|
||||
__optional__|sample double with range to 10.5 (exclusive) +
|
||||
**Maximum value (exclusive)** : `10,5`|number (double)
|
||||
**Maximum value (exclusive)** : `10.5`|number (double)
|
||||
|**sampleDoubleExclusiveMinimum** +
|
||||
__optional__|sample double with range from 0.0 (exclusive) +
|
||||
**Minimum value (exclusive)** : `0`|number (double)
|
||||
|**sampleDoubleNoDescription** +
|
||||
__optional__|**Minimum value** : `0` +
|
||||
**Maximum value** : `10,5`|number (double)
|
||||
**Maximum value** : `10.5`|number (double)
|
||||
|**sampleDoubleOnlyMaximum** +
|
||||
__optional__|sample double with range to 10.5 +
|
||||
**Maximum value** : `10,5`|number (double)
|
||||
**Maximum value** : `10.5`|number (double)
|
||||
|**sampleDoubleOnlyMinimum** +
|
||||
__optional__|sample double with range from 0.0 +
|
||||
**Minimum value** : `0`|number (double)
|
||||
|
||||
Reference in New Issue
Block a user