Latest Preview 1.0 - beta4 - Enum inferred type is int
See original GitHub issueDescription
https://swagger.io/docs/specification/data-models/enums/
{
"name": "target",
"in": "query",
"description": "Service to search. Leave blank or specify 'undefined' to search globally, specify any other target to search just that section of data.",
"required": false,
"type": "string",
"enum": [ "Undefined", "CustomerName", "CustomerAddress", "CustomerEmail", "OrderNumber", "CustomerPaymentProviderReference", "CustomerPaymentInternalReference", "FlightProductCheckinAddress", "Pnr", "TicketNumber", "CustomerCompany", "InsurancePolicyNumber", "SupplierReference" ]
}
and SwaggerProvider generated type instead is int, wheras should be string (or eventually an Enum with valid values, before it was string with the old “LTS” package
This causes new generate types not to be compatible with “old” ones.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
inferred type is String but Int was expected - kotlin
a new Kotlin learner Trying understand basics and been trying to add integers from a console input variable to a mutablelist but i...
Read more >SwiftUI | Apple Developer Forums
I'm attempting to implement a star rating view using a drag gesture. (eg user can press on star#1, then 'change their mind' and...
Read more >Compose Material | Jetpack
Write Jetpack Compose applications with ready to use building blocks and extend foundation to build your own design system pieces. compose.material, Build ...
Read more >Type mismatch : inferred type is Enum<*> but ...
So you can fix it either by introducing another type parameter E1: Enum<E1>, and cast clazz to Class<E>, or by using contravariance (cast...
Read more >apollo-ios/CHANGELOG.md at main
A strongly-typed, caching GraphQL client for iOS, written in Swift. - apollo-ios/CHANGELOG.md at main · apollographql/apollo-ios.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should be fixed in SwaggerProvider 2.0.0-beta2
Here is a random schema for SwaggerProvider that has the enum-issue: https://api.sandbox.repayonline.com/rgapi/v1/swagger https://api.sandbox.repayonline.com/rgapi/swagger/ui/index