#482 - Add support for Collection+JSON mediatype.

Introduce support for media type application/vnd.collection+json. Collection+JSON doesn't allow metadata at the top, so paging data can't be covered, however, everything else fits.

Also moved a little bit more into Affordance and SpringMvcAffordance to avoid using Spring MVC annotations directly in a given mediatype's AffordanceModel.

Refactored bits of HAL-FORMS to reuse the new PropertyUtils, ensuring Jackson ignore annotations are taken into consideration. Also added MockMVC tests to show HAL-FORMS and Collection+JSON working together, against the same controller.
This commit is contained in:
Greg Turnquist
2015-08-26 15:09:22 -05:00
committed by Oliver Gierke
parent 3af698d928
commit d6e02857f1
74 changed files with 4632 additions and 204 deletions

View File

@@ -0,0 +1,33 @@
/*
* Copyright 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.hateoas;
import lombok.Data;
import lombok.RequiredArgsConstructor;
/**
* Web framework-neutral representation of a web request's query parameter (http://example.com?name=foo).
*
* @author Greg Turnquist
*/
@Data
@RequiredArgsConstructor
public class QueryParameter {
private final String name;
private final boolean required;
private final String value;
}