public ApiParameterAttribute(string name, string type, string desc, ApiParameterLocation location, bool required, ApiParameterNeed needType) { this.Name = name; this.Type = type; this.Desc = desc; this.Location = location; this.Required = required; this.NeedType = needType; }
private ParameterLocation GetLocation(ApiParameterLocation apiParameterLocation) { ParameterLocation location = ParameterLocation.Query; switch (apiParameterLocation) { case ApiParameterLocation.Cookie: location = ParameterLocation.Cookie; break; case ApiParameterLocation.Path: location = ParameterLocation.Path; break; case ApiParameterLocation.Header: location = ParameterLocation.Header; break; case ApiParameterLocation.Query: location = ParameterLocation.Query; break; default: break; } return(location); }
public ApiParameter(string name, Type type, ApiParameterLocation location) { Name = name; Type = type; Location = location; }