Adding query attributes

This commit is contained in:
Jan Stárek
2019-10-24 15:57:28 +02:00
parent 2b1d0675d2
commit 6cbb156a01
4 changed files with 37 additions and 15 deletions

View File

@@ -10,6 +10,7 @@ namespace Models
public string Type { get; set; }
public string Format { get; set; }
public string Location { get; set; }
public UriAttribute(string name, bool required)
{

View File

@@ -21,7 +21,8 @@ namespace Parser
ContentParser.GetSingleExample(parameter.Schema?.Example) ??
PrimitiveDataTypeExampleGenerator.GenerateExampleValueByType(parameter.Schema.Type, parameter.Schema.Format),
Type = parameter.Schema.Type,
Format = parameter.Schema.Format
Format = parameter.Schema.Format,
Location = parameter.In == ParameterLocation.Path ? "Path" : "Query"
};
return attribute;
}