question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Latest Preview 1.0 - beta4 - Enum inferred type is int

See original GitHub issue

Description

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.

image

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sergey-tihoncommented, Aug 14, 2022

Should be fixed in SwaggerProvider 2.0.0-beta2

1reaction
Thoriumcommented, Jun 25, 2022
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found