Class SchemaResource


  • @RestController
    public class SchemaResource
    extends Object
    • Constructor Detail

      • SchemaResource

        @Autowired
        public SchemaResource​(@Value("${twintip.yaml}")
                              org.springframework.core.io.Resource yamlResource,
                              @Value("${twintip.cors:true}")
                              boolean enableCors,
                              @Value("${twintip.baseUrl:}")
                              String baseUrl)
                       throws IOException
        Throws:
        IOException
    • Method Detail

      • discover

        @RequestMapping(method=GET,
                        value="/.well-known/schema-discovery",
                        produces="application/json")
        @ResponseStatus(OK)
        public SchemaDiscovery discover​(@Value("${twintip.mapping}")
                                        String mapping,
                                        @Value("${twintip.type:swagger-2.0}")
                                        String type,
                                        @Value("${twintip.ui:}")
                                        String uiPath)
      • jsonSchema

        @RequestMapping(method=GET,
                        value="${twintip.mapping}",
                        produces={"application/json","*/*"})
        @ResponseStatus(OK)
        public org.springframework.http.ResponseEntity<String> jsonSchema()
                                                                   throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
      • yamlSchema

        @RequestMapping(method=GET,
                        value="${twintip.mapping}",
                        produces={"application/yaml","application/x-yaml","text/yaml"})
        @ResponseStatus(OK)
        @ResponseBody
        public org.springframework.http.ResponseEntity<String> yamlSchema()
                                                                   throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException