/// <summary> /// Create an API builder. The builder is used to build API and operations out of SwaggerDocument. /// </summary> /// <param name="reader"></param> /// <param name="setting"></param> /// <returns>API builder</returns> public static APIBuilder GetBuilder(AbstractSwaggerReader reader, APIBuilderSetting setting = null) { if (reader == null) { throw new SwaggerResourceException("SwaggerReader cannot be null"); } if (reader.GetSwaggerObject() == null) { throw new SwaggerResourceException("SwaggerDocument cannot be null"); } APIBuilder builder = new APIBuilder() { _swagger = reader.GetSwaggerObject(), _setting = (setting == null) ? new APIBuilderSetting() : setting, }; return(builder); }
public APIMetatDataBuilder(APIBuilder builder) { this._builder = builder; }
public OperationBuilder(APIBuilder builder) { this._builder = builder; }