@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) |
| Modifier and Type | Method and Description |
|---|---|
static String |
consume(InputStream inputStream) |
SchemaDiscovery |
discover(String mapping,
String type,
String uiPath) |
org.springframework.http.ResponseEntity<String> |
schemaAsJson() |
org.springframework.http.ResponseEntity<String> |
schemaAsYaml() |
public static final String SCHEMA_DISCOVERY_MAPPING
@Autowired
public SchemaResource(@Value(value="${twintip.yaml}")
org.springframework.core.io.Resource yamlResource)
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> schemaAsJson()
@RequestMapping(method=GET,
value="${twintip.mapping}",
produces={"application/yaml","application/x-yaml","text/yaml"})
@ResponseStatus(value=OK)
@ResponseBody
public org.springframework.http.ResponseEntity<String> schemaAsYaml()
public static String consume(InputStream inputStream) throws IOException
IOExceptionCopyright © 2015 Zalando SE. All rights reserved.