@Test public void testSecuritySchemeComponent() throws URISyntaxException { Path file = Paths.get(SecuritySchemeComponentTest.class.getResource("/yaml/swagger_petstore.yaml").toURI()); Swagger2MarkupConverter converter = Swagger2MarkupConverter.from(file).build(); Swagger swagger = converter.getContext().getSchema(); List<SwaggerPathOperation> pathOperations = PathUtils.toPathOperationsList(swagger.getPaths(), "", "", converter.getContext().getConfig().getOperationOrdering()); Swagger2MarkupConverter.SwaggerContext context = converter.getContext(); MarkupDocBuilder markupDocBuilder = context.createMarkupDocBuilder(); markupDocBuilder = new SecuritySchemeComponent(context, new SecurityDocumentResolver(context)) .apply(markupDocBuilder, SecuritySchemeComponent.parameters(pathOperations.get(0), 3)); markupDocBuilder.writeToFileWithoutExtension(outputDirectory, StandardCharsets.UTF_8); Path expectedFile = getExpectedFile(COMPONENT_NAME); DiffUtils.assertThatFileIsEqual(expectedFile, outputDirectory, getReportName(COMPONENT_NAME)); }
public SecuritySchemeComponent(Swagger2MarkupConverter.SwaggerContext context, DocumentResolver securityDocumentResolver) { super(context); this.securityDefinitions = context.getSchema().getSecurityDefinitions(); this.securityDocumentResolver = Validate.notNull(securityDocumentResolver, "SecurityDocumentResolver must not be null"); this.tableComponent = new TableComponent(context); }
SecuritySchemeComponent extends MarkupComponent<SecuritySchemeComponent.Parameters> { public SecuritySchemeComponent(Swagger2MarkupConverter.SwaggerContext context, DocumentResolver securityDocumentResolver) { super(context); this.securityDefinitions = context.getSchema().getSecurityDefinitions(); this.securityDocumentResolver = Validate.notNull(securityDocumentResolver, "SecurityDocumentResolver must not be null"); this.tableComponent = new TableComponent(context); } }
SecuritySchemeComponent extends MarkupComponent<SecuritySchemeComponent.Parameters> { public SecuritySchemeComponent(Swagger2MarkupConverter.SwaggerContext context, DocumentResolver securityDocumentResolver) { super(context); this.securityDefinitions = context.getSchema().getSecurityDefinitions(); this.securityDocumentResolver = Validate.notNull(securityDocumentResolver, "SecurityDocumentResolver must not be null"); this.tableComponent = new TableComponent(context); } SecuritySchemeComponent(Swagger2MarkupConverter.SwaggerContext context,
                                   DocumentResolver securityDocumentResolver); }
SecuritySchemeComponent extends MarkupComponent<SecuritySchemeComponent.Parameters> { public SecuritySchemeComponent(Swagger2MarkupConverter.SwaggerContext context, DocumentResolver securityDocumentResolver) { super(context); this.securityDefinitions = context.getSchema().getSecurityDefinitions(); this.securityDocumentResolver = Validate.notNull(securityDocumentResolver, "SecurityDocumentResolver must not be null"); this.tableComponent = new TableComponent(context); } SecuritySchemeComponent(Swagger2MarkupConverter.SwaggerContext context,
                                   DocumentResolver securityDocumentResolver); static SecuritySchemeComponent.Parameters parameters(SwaggerPathOperation operation,
                                                                int titleLevel); @Override MarkupDocBuilder apply(MarkupDocBuilder markupDocBuilder, Parameters params); }
SecuritySchemeComponent extends MarkupComponent<SecuritySchemeComponent.Parameters> { public SecuritySchemeComponent(Swagger2MarkupConverter.SwaggerContext context, DocumentResolver securityDocumentResolver) { super(context); this.securityDefinitions = context.getSchema().getSecurityDefinitions(); this.securityDocumentResolver = Validate.notNull(securityDocumentResolver, "SecurityDocumentResolver must not be null"); this.tableComponent = new TableComponent(context); } SecuritySchemeComponent(Swagger2MarkupConverter.SwaggerContext context,
                                   DocumentResolver securityDocumentResolver); static SecuritySchemeComponent.Parameters parameters(SwaggerPathOperation operation,
                                                                int titleLevel); @Override MarkupDocBuilder apply(MarkupDocBuilder markupDocBuilder, Parameters params);  }