public virtual void Parse(OpenApiObject data, IEndpointsParser parser) { Description = data.GetString("description"); Uri = data.GetString("uri"); if (data.TryGetValue("children", out var anyData) && anyData is OpenApiObject objData) { Children.Parse(objData, parser); } }
public IEndpoint Parse(OpenApiObject data, string defaultKind = "") { var endpoint = _endpointRegistry.OfKind(data.GetString("kind") ?? defaultKind); endpoint.Parse(data, this); return(endpoint); }
public override void Parse(OpenApiObject data, IEndpointParser parser) { base.Parse(data, parser); Schema = data.GetSchema("schema"); Separator = data.GetString("separator"); }
public IEndpoint Parse(OpenApiObject data, string defaultType = "") { string type = data.GetString("type") ?? defaultType; if (!_endpointFactories.TryGetValue(type, out var factory)) { throw new FormatException($"Unknown endpoint type '{type}'."); } var endpoint = factory(); endpoint.Parse(data, this); return(endpoint); }
public override void Parse(OpenApiObject data, IEndpointParser parser) { base.Parse(data, parser); FormField = data.GetString("form-field"); }