APISonar


io.swagger.models.Scheme.HTTP

> io > swagger > models > Scheme > HTTP
io APIs swagger APIs models APIs Scheme APIs HTTP APIs

Example 1
static Stream<Arguments> schemeVariations() {
        final Scheme[] none = new Scheme[0];

        return Stream.of(//
            arguments(null, none), //
            arguments("", none), //
            arguments(",", none), //
            arguments(" , ", none), //
            arguments("HTTPS,http", new Scheme[] {Scheme.HTTPS, Scheme.HTTP}), //
            arguments(" HTTPS,  http ", new Scheme[] {Scheme.HTTPS, Scheme.HTTP}), //
            arguments(",http,", new Scheme[] {Scheme.HTTP}), //
            arguments("hTtpS", new Scheme[] {Scheme.HTTPS})//
        );
    }
Example 2
private Scheme convertScheme(io.swagger.annotations.SwaggerDefinition.Scheme annotationScheme) {
    if (SwaggerDefinition.Scheme.DEFAULT.equals(annotationScheme)) {
      return Scheme.HTTP;
    }
    return Scheme.forValue(annotationScheme.name());
  }