@RestController public class SchemaResource extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SCHEMA_DISCOVERY_MAPPING |
| Constructor and Description |
|---|
SchemaResource(org.springframework.core.io.Resource yamlResource,
boolean enableCors,
String baseUrl) |
| Modifier and Type | Method and Description |
|---|---|
SchemaDiscovery |
discover(String mapping,
String type,
String uiPath) |
org.springframework.http.ResponseEntity<String> |
jsonSchema() |
org.springframework.http.ResponseEntity<String> |
yamlSchema() |
public static final String SCHEMA_DISCOVERY_MAPPING
@Autowired
public SchemaResource(@Value(value="${twintip.yaml}")
org.springframework.core.io.Resource yamlResource,
@Value(value="${twintip.cors:true}")
boolean enableCors,
@Value(value="${twintip.baseUrl:}")
String baseUrl)
throws IOException
IOException@RequestMapping(method=GET,
value="/.well-known/schema-discovery",
produces="application/json")
@ResponseStatus(value=OK)
public SchemaDiscovery discover(@Value(value="${twintip.mapping}")
String mapping,
@Value(value="${twintip.type:swagger-2.0}")
String type,
@Value(value="${twintip.ui:}")
String uiPath)
@RequestMapping(method=GET,
value="${twintip.mapping}",
produces={"application/json","*/*"})
@ResponseStatus(value=OK)
public org.springframework.http.ResponseEntity<String> jsonSchema()
throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingException@RequestMapping(method=GET,
value="${twintip.mapping}",
produces={"application/yaml","application/x-yaml","text/yaml"})
@ResponseStatus(value=OK)
@ResponseBody
public org.springframework.http.ResponseEntity<String> yamlSchema()
throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionCopyright © 2015–2016 Zalando SE. All rights reserved.