public void Should_AbleToSetExternalDocumentationWithBuilder() { var edBuilder = new ExternalDocumentationBuilder().Url("url"); var swaggerRoot = GetBasicSwaggerRootBuilder().ExternalDocumentation(edBuilder).Build(); Assert.Equal(edBuilder.Build().Url, swaggerRoot.ExternalDocumentation.Url); }
public void ExternalDocumentationWithBuilder_ShouldBeSettable() { var exBuilder = new ExternalDocumentationBuilder().Url("url"); var result = GetInt32SchemaBuilder().ExternalDocumentation(exBuilder).Build(); Assert.Equal(exBuilder.Build().Url, result.ExternalDocumentation.Url); }
public void Should_AbleToSetExternalDocumentationWithBuilder() { var externalDocumentationBuilder = new ExternalDocumentationBuilder().Url("https://github.com/yahehe/Nancy.Swagger"); var operation = GetBasicBuilderWithResponse().ExternalDocumentation(externalDocumentationBuilder).Build(); Assert.NotNull(operation.ExternalDocumentation); Assert.Equal(externalDocumentationBuilder.Build().Url, operation.ExternalDocumentation.Url); }
public SchemaBuilder <TModel> ExternalDocumentation(ExternalDocumentationBuilder documentation) { this.documentation = documentation.Build(); return(this); }
public void Should_ThrowRequiredFieldException_WhenUrlIsNotSet() { Assert.Throws <RequiredFieldException>(() => builder.Build()); Assert.Throws <RequiredFieldException>(() => builder.Description("desc").Build()); }
/// <summary> /// Additional external documentation /// </summary> /// <param name="documentation"> /// The documentation. /// </param> /// <returns> /// The <see cref="SwaggerRootBuilder"/>. /// </returns> public SwaggerRootBuilder ExternalDocumentation(ExternalDocumentationBuilder documentation) { this.documentation = documentation.Build(); return(this); }
/// <summary> /// The external documentation. /// </summary> /// <param name="externalDocumentation"> /// The external documentation. /// </param> /// <returns> /// The <see cref="TagBuilder"/>. /// </returns> public TagBuilder ExternalDocumentation(ExternalDocumentationBuilder externalDocumentation) { this.documentation = externalDocumentation.Build(); return this; }
/// <summary> /// Additional external documentation /// </summary> /// <param name="documentation"> /// The documentation. /// </param> /// <returns> /// The <see cref="OperationBuilder"/>. /// </returns> public OperationBuilder ExternalDocumentation(ExternalDocumentationBuilder documentation) { this.documentation = documentation.Build(); return(this); }
/// <summary> /// The external documentation. /// </summary> /// <param name="externalDocumentation"> /// The external documentation. /// </param> /// <returns> /// The <see cref="TagBuilder"/>. /// </returns> public TagBuilder ExternalDocumentation(ExternalDocumentationBuilder externalDocumentation) { this.documentation = externalDocumentation.Build(); return(this); }
/// <summary> /// Additional external documentation /// </summary> /// <param name="documentation"> /// The documentation. /// </param> /// <returns> /// The <see cref="OperationBuilder"/>. /// </returns> public OperationBuilder ExternalDocumentation(ExternalDocumentationBuilder documentation) { this.documentation = documentation.Build(); return this; }