Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b98e4cc
Update Package Version to 1.1.1
PerthCharern Oct 17, 2018
2553508
Add CultureInfo.InvariantCulture in the TryParse's in CreateAny.
PerthCharern Oct 17, 2018
328c380
Fix the numberstyles
PerthCharern Oct 17, 2018
235be5c
Merge pull request #335 from Microsoft/perthcharern/fixTryParseCulture
PerthCharern Oct 24, 2018
9537942
Merge branch 'master' into perthcharern/updateVersionOneOneOne
PerthCharern Oct 24, 2018
7ada65a
Merge pull request #333 from Microsoft/perthcharern/updateVersionOneO…
PerthCharern Oct 24, 2018
f6a3836
fixes#319 - V2Deserializer should handle invalid host value gracefully
senthilkumarmohan Oct 27, 2018
78c8e65
Merge branch 'master' into bugfix#319-V2Deserializer-should-handle-in…
senthilkumarmohan Oct 27, 2018
56339bd
fixes#330-Yield validation err when an invalid security req key found
senthilkumarmohan Oct 25, 2018
2ac0b8c
Merge pull request #341 from Microsoft/perthcharern/SecuritySchemeInt…
PerthCharern Oct 30, 2018
d2fb8ba
For value nodes, we first load OpenApiAny in as OpenApiString, then w…
PerthCharern Oct 31, 2018
03337b9
- add handling for V3
PerthCharern Oct 31, 2018
18babce
#319 - changes as per review comments
senthilkumarmohan Oct 31, 2018
1b353c6
Merge branch 'bugfix#319-V2Deserializer-should-handle-invalid-host-va…
senthilkumarmohan Oct 31, 2018
ad20894
Merge branch 'master' into bugfix#319-V2Deserializer-should-handle-in…
senthilkumarmohan Oct 31, 2018
090a819
#319 - removed unused namespace
senthilkumarmohan Oct 31, 2018
addd6e1
Merge branch 'bugfix#319-V2Deserializer-should-handle-invalid-host-va…
senthilkumarmohan Oct 31, 2018
f6e5f1d
Rename
PerthCharern Oct 31, 2018
bb960b3
Merge pull request #340 from senthilkumarmohan/bugfix#319-V2Deseriali…
PerthCharern Oct 31, 2018
463a3fc
Add unit tests
PerthCharern Oct 31, 2018
eee2f60
Merge branch 'master' into perthcharern/ParsingAnyShouldRespectFormat…
PerthCharern Oct 31, 2018
e9a146b
- Add comments.
PerthCharern Oct 31, 2018
8624f35
Styling
PerthCharern Oct 31, 2018
532fb65
- Add validation rules
PerthCharern Nov 1, 2018
afd19c9
Remove remaining throw statements
PerthCharern Nov 1, 2018
a095dbf
Handle "Examples" in media type and parameter
PerthCharern Nov 1, 2018
53c160c
add more unit tests
PerthCharern Nov 1, 2018
bb294d7
- Add rules for header (mirror parameter)
PerthCharern Nov 1, 2018
c60e954
remove extra newline
PerthCharern Nov 1, 2018
59e5d2c
Use constants for field names
PerthCharern Nov 7, 2018
366b8c6
Merge pull request #343 from Microsoft/perthcharern/ParsingAnyShouldR…
PerthCharern Nov 7, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net46; netstandard2.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand All @@ -10,7 +10,7 @@
<Company>Microsoft</Company>
<Title>Microsoft.OpenApi.Readers</Title>
<PackageId>Microsoft.OpenApi.Readers</PackageId>
<Version>1.1.0</Version>
<Version>1.1.1</Version>
<Description>OpenAPI.NET Readers for JSON and YAML documents</Description>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageTags>OpenAPI .NET</PackageTags>
Expand Down
11 changes: 11 additions & 0 deletions src/Microsoft.OpenApi.Readers/ParseNodes/AnyFieldMap.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

using System.Collections.Generic;

namespace Microsoft.OpenApi.Readers.ParseNodes
{
internal class AnyFieldMap<T> : Dictionary<string, AnyFieldMapParameter<T>>
{
}
}
40 changes: 40 additions & 0 deletions src/Microsoft.OpenApi.Readers/ParseNodes/AnyFieldMapParameter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

using System;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;

namespace Microsoft.OpenApi.Readers.ParseNodes
{
internal class AnyFieldMapParameter<T>
{
/// <summary>
/// Constructor.
/// </summary>
public AnyFieldMapParameter(
Func<T, IOpenApiAny> propertyGetter,
Action<T, IOpenApiAny> propertySetter,
Func<T, OpenApiSchema> schemaGetter)
{
this.PropertyGetter = propertyGetter;
this.PropertySetter = propertySetter;
this.SchemaGetter = schemaGetter;
}

/// <summary>
/// Function to retrieve the value of the property.
/// </summary>
public Func<T, IOpenApiAny> PropertyGetter { get; }

/// <summary>
/// Function to set the value of the property.
/// </summary>
public Action<T, IOpenApiAny> PropertySetter { get; }

/// <summary>
/// Function to get the schema to apply to the property.
/// </summary>
public Func<T, OpenApiSchema> SchemaGetter { get; }
}
}
12 changes: 12 additions & 0 deletions src/Microsoft.OpenApi.Readers/ParseNodes/AnyListFieldMap.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

using System.Collections.Generic;

namespace Microsoft.OpenApi.Readers.ParseNodes
{
internal class AnyListFieldMap<T> : Dictionary<string, AnyListFieldMapParameter<T>>
{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

using System;
using System.Collections.Generic;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;

namespace Microsoft.OpenApi.Readers.ParseNodes
{
internal class AnyListFieldMapParameter<T>
{
/// <summary>
/// Constructor
/// </summary>
public AnyListFieldMapParameter(
Func<T, IList<IOpenApiAny>> propertyGetter,
Action<T, IList<IOpenApiAny>> propertySetter,
Func<T, OpenApiSchema> schemaGetter)
{
this.PropertyGetter = propertyGetter;
this.PropertySetter = propertySetter;
this.SchemaGetter = schemaGetter;
}

/// <summary>
/// Function to retrieve the value of the property.
/// </summary>
public Func<T, IList<IOpenApiAny>> PropertyGetter { get; }

/// <summary>
/// Function to set the value of the property.
/// </summary>
public Action<T, IList<IOpenApiAny>> PropertySetter { get; }

/// <summary>
/// Function to get the schema to apply to the property.
/// </summary>
public Func<T, OpenApiSchema> SchemaGetter { get; }
}
}
12 changes: 12 additions & 0 deletions src/Microsoft.OpenApi.Readers/ParseNodes/AnyMapFieldMap.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

using System.Collections.Generic;

namespace Microsoft.OpenApi.Readers.ParseNodes
{
internal class AnyMapFieldMap<T, U> : Dictionary<string, AnyMapFieldMapParameter<T, U>>
{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

using System;
using System.Collections.Generic;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;

namespace Microsoft.OpenApi.Readers.ParseNodes
{
internal class AnyMapFieldMapParameter<T, U>
{
/// <summary>
/// Constructor
/// </summary>
public AnyMapFieldMapParameter(
Func<T, IDictionary<string, U>> propertyMapGetter,
Func<U, IOpenApiAny> propertyGetter,
Action<U, IOpenApiAny> propertySetter,
Func<T, OpenApiSchema> schemaGetter)
{
this.PropertyMapGetter = propertyMapGetter;
this.PropertyGetter = propertyGetter;
this.PropertySetter = propertySetter;
this.SchemaGetter = schemaGetter;
}

/// <summary>
/// Function to retrieve the property that is a map from string to an inner element containing IOpenApiAny.
/// </summary>
public Func<T, IDictionary<string, U>> PropertyMapGetter { get; }

/// <summary>
/// Function to retrieve the value of the property from an inner element.
/// </summary>
public Func<U, IOpenApiAny> PropertyGetter { get; }

/// <summary>
/// Function to set the value of the property.
/// </summary>
public Action<U, IOpenApiAny> PropertySetter { get; }

/// <summary>
/// Function to get the schema to apply to the property.
/// </summary>
public Func<T, OpenApiSchema> SchemaGetter { get; }
}
}
Loading