micronaut-projects / micronaut-json-schema

Micronaut integration with JSON schema
Apache License 2.0
2 stars 0 forks source link

java.lang.Number generates type `object` it should generate type `number` #24

Closed sdelamo closed 4 months ago

sdelamo commented 5 months ago

A java lang Number type generates a type object. I think it should be type number.

@JsonSchema(description = "A product from Acme's catalog")
public record Product(
                      @NotNull @Positive Number price) {

it generates a JSON such as:

  "price": {
      "title": "Number",
      "description": "The price of the product",
      "type": [
        "object"
      ],
      "exclusiveMinimum": 0
    },