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.

Move Attributes to RestEase.Annotations

See original GitHub issue

I guess it would be nice if all attributes were moved to separate package, let’s say RestEase.Annotations so interface won’t have dependency on specific version of RestEase (RestEase.Annotations should not change that often).

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
canton7commented, Jun 11, 2017

Is this actually a scenario you face?

If not, let’s hold off until Amazon start releasing their apis as RestEase interfaces… I don’t think that’s a good usage of RestEase anyway: I think if the interfaces as implementation details of the comms layer, rather than as things which are exposed, in any semi-complex application anyway.

On 11 June 2017 19:41:16 BST, Milosz Krajewski notifications@github.com wrote:

Hi,

Let’s imagine two teams releasing interfaces to their services as RestEase interfaces. Let’s say Netflix and Amazon Prime. You are writing media player which stream from both. There is one problem, though, Netflix uses RestEase 1.4 while Amazon released them with dependency on RestEase 2.0. Version 2.0 contains braking changes so application does not compile or just does not work a s expected. The breaking changes are not on interfaces though (they are describing REST/HTTP, after all, and it does not change that fast) but somewhere “in the engine” (for example, different way RegestModifier needs to be implemented).

The solution is to release interfaces depending on thin abstraction: RestEase.Attributes (or RestEase.Annotations). It can be used with any version of RestEase (the “engine”), so the consumer (of the interface) makes the call.

Recently, with .NET core, you see a lot of this: Microsoft.Extensions.Logging.Abstractions vs Microsoft.Extensions.Logging, Microsoft.Extensions.DependencyInjection.Abstractions vs Microsoft.Extensions.DependencyInjection, System.Runtime.Serialization.Primitives vs System.Runtime.Serialization.

Well, it is just about “decoupling abstraction from implementation”.

I can imagine something like this: “We cannot use your interface assemblies as you use RestEase 2.0, and we are still deep in RestEase 1.4, and we are not planning to upgrade for a while”. “Don’t worry, it’s still based on RestEase.Annotations 1.0. You you can use them with RestEase 1.4 without any problem.”

– You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/canton7/RestEase/issues/47#issuecomment-307648233

0reactions
canton7commented, Jul 29, 2017

Closing as no response.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Looking forwards to RestEase 2 · Issue #150
I want to move all common types (attributes, RequestInfo , Requester , etc) to a RestEase.Core assembly. This is necessary to let source ......
Read more >
Writing REST Services with RESTEasy Reactive
Any class annotated with a @Path annotation can have its methods exposed as REST endpoints, provided they have an HTTP method annotation (see ......
Read more >
RESTEasy JAX-RS - JBoss.org
This client-side framework allows you to map outgoing HTTP requests to remote servers using JAX-RS annotations and interface proxies. JAX-RS implementation ...
Read more >
RESTEasy Client API
A quick guide to building out a client for the REST API using RESTEasy.
Read more >
RESTEasy Reference Guide JBoss Enterprise Application ...
The @Path annotation has an attribute called encode. This controls whether the literal part of the value supplied (that is, the characters that...
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