Comments (4)
To help a bit: The problem is in OpenApiSchemaExtensions class, ToOpenApiSchema method.
type.GetGenericArguments()[0];
throws exception for regular array. To fix this you can use GetElementType()
.
working example.
if (typeof(IList).IsAssignableFrom(type))
{
schema.Type = "array";
var elementType = type.GetElementType() ?? type.GetGenericArguments()[0];
schema.Items = elementType.ToOpenApiSchema();
return schema;
}
from azurefunctions.extensions.
@AlexPirtea I've fixed to allow array, on top of List<T>
. This will be released soon. Thanks for waiting.
from azurefunctions.extensions.
@AlexPirtea Thanks for raising this issue!
Have you tried List<int>
instead? If that works, please use this in the meantime. I'll fix this is ASAP.
from azurefunctions.extensions.
@AlexPirtea Thanks for raising this issue!
Have you tried
List<int>
instead? If that works, please use this in the meantime. I'll fix this is ASAP.
Lists work
from azurefunctions.extensions.
Related Issues (20)
- Get EnumMember Value HOT 1
- Generic types makes yaml definition non-compliant
- Documentation stale - OpenApiResponseBody should be OpenApiResponseWithBodyAttribute HOT 1
- ReflectionTypeLoadException when running CLI HOT 2
- An item with the same key has already been added.
- StackOverflow Exception HOT 5
- Property description added to field? HOT 3
- Updating Authorization Level and Base URL HOT 5
- Generic delimiter selector
- Can we specify our own swagger.json file? HOT 1
- Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' HOT 2
- Mark an endpoint as deprecated HOT 2
- OpenApiHttpTriggerContext.cs generates a compiler warning when using C#8 nullable reference types HOT 2
- default "Code" query string on all functions HOT 1
- Missing list item type definition HOT 2
- authentication settings HOT 2
- Resolver error for dictionary properties in swagger UI OpenApi 3.1.1 HOT 1
- FileUpload support HOT 2
- Upgrade for dependencies packages
- Support for isolated function and HttpRequestData over HttpRequest? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azurefunctions.extensions.