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

Possible discrepancy between documented REST operations and actual serialization/deserialization? #1563

Open
ljnelson opened this issue Nov 26, 2024 · 0 comments

Comments

@ljnelson
Copy link

The Wiki describes REST operations here: https://github.com/Netflix/eureka/wiki/Eureka-REST-operations

Considering the logical "register" operation, accomplished via HTTP POST, the logical schema of its payload, represented in XSD but also applicable to JSON, is also in the Wiki citation above.

However, it seems to diverge widely from the way in which, for example, an InstanceInfo, representing a desired registration, is actually serialized over the wire during a register operation: https://github.com/Netflix/eureka/blob/v2.0.3/eureka-client/src/main/java/com/netflix/discovery/converters/EurekaJacksonCodec.java#L343-L422

A minimal example would be LeaseInfo. The schema says that leaseInfo is an optional element consisting of exactly one field, evictionDurationInSecs, which must be a positive integer. Taking Jackson annotations and conventions into account, I see no such analogous property in LeaseInfo. Because in fact LeaseInfo is serialized entirely by Jackson, what would be serialized is its (potentially many) properties instead, such as durationInSecs, renewalIntervalInSecs, and so on.

Does this mean the XML schema is out of date? Is there another API resource instead I should be looking at if I were trying to do things via, say, curl?

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

1 participant