Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAPI.NET 1.2.0 broke OpenApiString #154

Closed
CumpsD opened this issue Jun 22, 2020 · 2 comments
Closed

OpenAPI.NET 1.2.0 broke OpenApiString #154

CumpsD opened this issue Jun 22, 2020 · 2 comments

Comments

@CumpsD
Copy link
Contributor

CumpsD commented Jun 22, 2020

microsoft/OpenAPI.NET#487

NuGet decided to install 1.2.0 in a project of mine which caused System.MissingMethodException: Method not found: 'Void Microsoft.OpenApi.Any.OpenApiString..ctor(System.String)'.

System.MissingMethodException: Method not found: 'Void Microsoft.OpenApi.Any.OpenApiString..ctor(System.String)'.
   at Swashbuckle.AspNetCore.Filters.ExamplesConverter.SerializeExampleXml(Object exampleValue)
   at Swashbuckle.AspNetCore.Filters.RequestExample.<>c__DisplayClass6_0.<SetSingleRequestExampleForOperation>b__1()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at Swashbuckle.AspNetCore.Filters.RequestExample.SetSingleRequestExampleForOperation(OpenApiOperation operation, Object example, ExamplesConverter examplesConverter)
   at Swashbuckle.AspNetCore.Filters.RequestExample.SetRequestExampleForOperation(OpenApiOperation operation, SchemaRepository schemaRepository, Type requestType, Object example, IContractResolver contractResolver, JsonConverter jsonConverter)
   at Swashbuckle.AspNetCore.Filters.ExamplesOperationFilter.SetRequestExamples(OpenApiOperation operation, OperationFilterContext context)
   at Swashbuckle.AspNetCore.Filters.ExamplesOperationFilter.Apply(OpenApiOperation operation, OperationFilterContext context)

We need to upgrade to 1.2.0 to fix this, I'll make a PR later today

@nixxholas
Copy link

+1 to this. My production web app failed..

@mattfrear
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants