Java Code Examples for io.swagger.models.Scheme#HTTP

The following examples show how to use io.swagger.models.Scheme#HTTP . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SwaggerDefinitionProcessor.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
private Scheme convertScheme(io.swagger.annotations.SwaggerDefinition.Scheme annotationScheme) {
  if (SwaggerDefinition.Scheme.DEFAULT.equals(annotationScheme)) {
    return Scheme.HTTP;
  }
  return Scheme.forValue(annotationScheme.name());
}
 
Example 2
Source File: SwaggerGenerator.java    From endpoints-java with Apache License 2.0 4 votes vote down vote up
public SwaggerContext setScheme(String scheme) {
  this.scheme = "http".equals(scheme) ? Scheme.HTTP : Scheme.HTTPS;
  return this;
}