-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
The client parameter type's names occur wrong when multipart is include. #231
Comments
@safakkesikci thanks for taking the time to report this I'm unfortunately not at all experienced in working with Do you know what should the HTTP request look like for this? "requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"Name": {
"type": "string"
},
"AnimalClassFile": {
"type": "string",
"format": "binary"
},
"AnimalCrowdFile": {
"type": "string",
"format": "binary"
}
}
},
"encoding": {
"Name": {
"style": "form"
},
"AnimalClassFile": {
"style": "form"
},
"AnimalCrowdFile": {
"style": "form"
}
}
}
}
} and what should the Refit method look like? |
Hello. When I try to generate client csharp and csharp-dotnet2 via editor.swagger.io, it occurs as follows. csharp-client-generated (1).zip csharp-dotnet2-client-generated (1).zip |
@safakkesikci is this a client for an API you developed yourself? If so, if it's an ASP.NET API, what does the code look like for accepting |
@safakkesikci one thing is generating the Refit client, but I also want to make sure that it also works 😄 |
Hello, I tried to go the reverse way :) I created a helloworld webapi project and created a client from the controller with the GenerateAspNetCoreClient package using Refit and examined the document. example project https://github.com/safakkesikci/refitclienttest I hope it's helpful. |
@safakkesikci Yes this is really helpful! I'll see what I can do! |
sample openapi:
animal.json
sample refitter config file:
Animal.refitter
{
"openApiPath": "./animal.json",
"namespace": "Animal",
"naming": {
"useOpenApiTitle": false
},
"multipleInterfaces": "ByTag",
"operationNameTemplate": "{operationName}Async",
"outputFolder": "../Clients",
"outputFilename": "Animal.cs",
"codeGeneratorSettings": {
"requiredPropertiesMustBeDefined": true,
"generateDataAnnotations": true,
"anyType": "object",
"dateType": "System.DateTimeOffset",
"dateTimeType": "System.DateTimeOffset",
"timeType": "System.TimeSpan",
"timeSpanType": "System.TimeSpan",
"arrayType": "System.Collections.Generic.ICollection",
"dictionaryType": "System.Collections.Generic.IDictionary",
"arrayInstanceType": "System.Collections.ObjectModel.Collection",
"dictionaryInstanceType": "System.Collections.Generic.Dictionary",
"arrayBaseType": "System.Collections.ObjectModel.Collection",
"dictionaryBaseType": "System.Collections.Generic.Dictionary",
"propertySetterAccessModifier": "",
"generateImmutableArrayProperties": false,
"generateImmutableDictionaryProperties": false,
"handleReferences": false,
"jsonSerializerSettingsTransformationMethod": null,
"generateJsonMethods": false,
"enforceFlagEnums": false,
"inlineNamedDictionaries": false,
"inlineNamedTuples": true,
"inlineNamedArrays": false,
"generateOptionalPropertiesAsNullable": false,
"generateNullableReferenceTypes": false,
"generateNativeRecords": false,
"generateDefaultValues": true,
"inlineNamedAny": false,
"excludedTypeNames": []
}
}
The text was updated successfully, but these errors were encountered: