es.davy.ai

Preguntas y respuestas de programación confiables

¿Tienes una pregunta?

Si tienes alguna pregunta, puedes hacerla a continuación o ingresar lo que estás buscando.

Tag: JSONSCHEMA2POJO

Cómo crear getters y setters para un enum.

public enum EventTypeName { MAIN_EVENT(new MainEvent()), MAIN_ADJUSTMENT_EVENT(new MainAdjustmentEvent()), CUSTOMER_EVENT(new CustomerEvent()), EventType eventType; private EventTypeName(EventType eventType) { this.eventType = eventType; } public EventType getEventType() { return eventType; } public void setEventType(EventType eventType) { this.eventType = eventType; } }

Objeto Fecha en el esquema JSON.

Tengo mi esquema JSON para createdAt como: { "title": "detalles", "definitions": { "dateTime": { "type": "string", "format": "date-time" }, "propiedades" : { "createdAt": { "$ref": "#/definitions/dateTime" } } } y cuando intento crear el objeto: Details detalles = ImmutableDetails.builder() .createdAt(new SimpleDateFormat("yyyy-MM-dd& #39;T & #39;HH: mm: ss.SSS 'Z '") .parse("2021-11-30T00:22:11.454Z")) .build(); . . . Read more

Cómo configurar los datos POJO en Swagger para ApiModelProperty.

Tengo el siguiente ApiModel para mi endpoint: public class CreateConfigRequest { @ApiModelProperty(example = "hive") String entityType; @ApiModelProperty(example = "imports") String entityNamespace; @ApiModelProperty(example = "hotel") String entityName; @ApiModelProperty(example = "{\"name\": \"hotel\", \"batch\": {\"type\": \"FullScan\"}}") JobConfig content; } Donde JobConfig es otra clase POJO. Código a continuación: @Data public class JobConfig { . . . Read more