从Springboot REST ENDPOINT

问题描述 投票:0回答:1

这是linewithinrequestid对象:

@Getter
@Setter
@Data
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class LineWithinRequestID {

    @JsonProperty("id")
    private Long id;

    @JsonProperty("srid")
    private Integer srid;

    @JsonProperty("coordinates")
    private List<List<Double>> coordinateList;
}

这是我内部的polygonresponse对象:

@Getter
@Setter
@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class WithinPolygonResponse {

    @JsonProperty("status")
    private Boolean status;
}

这是我所提出的要求:

{
  "id": 2,
  "srid": 4326,
  "coordinates": [
    [
      [-77.292894, 38.392816, 0], [-77.169498, 38.468925, 0], [-77.204214, 38.568971, 0]
    ]
  ]
}

我做错了什么?我是Springboot和Swagger

的新手
	

我明白了,愚蠢的错字。

{ "id": 2, "srid": 4326, "coordinates": [ --->[ [-77.292894, 38.392816, 0], [-77.169498, 38.468925, 0], [-77.204214, 38.568971, 0] ]<--- ] }
spring-boot swagger
1个回答
0
投票
extra套装括号,所以它与linewithinrequestid的坐标主义者所期望的那样,这是一个不匹配的

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.