Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jaxrs-dev] [External] : Re: @Status Annotation?
  • From: Jan Supol <jan.supol@xxxxxxxxxx>
  • Date: Thu, 2 Sep 2021 19:15:20 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8RvFY+vI5288gdxcjZwyrdc3i1hlg819cdl6p1L6x3o=; b=IN16x/NKKLgJ1FauhWk0kYrmYAqAfGVUotVZV9yrOm3Ut9ARP3DVGM/gkAGEcrPj69dg8+Eak9wfQFmLHtK5T9zMF7woLNs36imcBz8/1y6Ff4bO9Y33RKuefRln2hS3DdO1GznZ4vvjsi1WlbWE1NYawe03qLmvhyob70eJAsNrCThOhhLXymnXY856kVaZAlcQo+pyAvT2EqL1tK9kL0LNsTxqb+3TYsAVKVRPPGqzhKXol8YscAUlXGO4ehoDXVteLiAqjrm9KRRaE4NOrzuqJq8NKyOmCZflo8uv9KTpfO4+AH2DBu/ErvyZfM5GKK4JcfVFcCDNnZUR2nTvdA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EVVKtyvCxvP3zyqxYnaC91qj1D/y0eqQq49xbFdU84zYDDtgKp8k5AbEhd+qXAdgqagkCEk9wy2JZUUl06a99LKaD8yoZ1rc+VBEVwsj6eZfsFM1adxFsReyGocImWVVQu6NgUqTASSLBDUdxQlINhw4tiwbxhfKRADbBbY7NOUoDioyUX8PFvYe0zzix5Cgc4nkkoqhoGSQTQgIMMR12N9qA15+XNkXLChyN1//pko8a8rTfbcjqXejfn93HHjeD3JiAjbl8YKwROS2Q7FcVZyga80+E2Jwhfb13glaVfLTcJzhn8U9r291yUKoODPULQfLVUpBVCqjYuuY/caFuw==
  • Delivered-to: jaxrs-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/jaxrs-dev/>
  • List-help: <mailto:jaxrs-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/jaxrs-dev>, <mailto:jaxrs-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/jaxrs-dev>, <mailto:jaxrs-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHXoCg8L39jcpx+1kO/UNxh6BKhKauRERJi
  • Thread-topic: [jaxrs-dev] [External] : Re: @Status Annotation?

There are a couple of corner cases to be thought through:
  • If @Status is used and an exception occurs, should the @Status apply? (Possibly not, but doable with wrapping WebApplicationException with the status)
  • If both Response with status and @Status are present, who gets priority?
  • If null is returned, has @Status priority over 204?
  • In the case of sub-resource locators, should the annotation be on the locator or on the subresource method?
  • Is it applicable for SSE (as we just have seen with 201/200 TCK issue there)/AsyncResponse resources?

-- Jan



From: jaxrs-dev <jaxrs-dev-bounces@xxxxxxxxxxx> on behalf of Santiago Pericasgeertsen <santiago.pericasgeertsen@xxxxxxxxxx>
Sent: Thursday, September 2, 2021 8:27 PM
To: jaxrs developer discussions <jaxrs-dev@xxxxxxxxxxx>
Subject: Re: [jaxrs-dev] [External] : Re: @Status Annotation?
 


> On Sep 2, 2021, at 2:08 PM, Reza Rahman <reza_rahman@xxxxxxxxx> wrote:
>
> Seems like a nice usability enhancement, but probably not a very high priority. I would do it if it is easy.

 My thought exactly. Thanks for the feedback.

— Santiago

> Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.
>
>> On Sep 2, 2021, at 12:16 PM, Santiago Pericasgeertsen <santiago.pericasgeertsen@xxxxxxxxxx> wrote:
>>
>> Hi All,
>>
>> Trying to get some quick feedback before doing anything.
>>
>> There are some use cases in which the default status return for a resource method that does not return Response needs to be overridden. For example, a POST request that wants to return 201 instead of 200. Of course, you can fix this by returning a Response, but that may not be ideal in all cases (e.g., tools that do static analysis would prefer to see Foo over Response as return type). I believe some impls already support this.
>>
>> Shall we try to squeeze this in 3.1?
>>
>> — Santiago
>> _______________________________________________
>> jaxrs-dev mailing list
>> jaxrs-dev@xxxxxxxxxxx
>> To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jaxrs-dev__;!!ACWV5N9M2RV99hQ!bxuQ6WKrg_Yer0F_937K1JOXda8v2tzzTCm21Zi6tuNIYwBnQjzpYn3pqRN9Hrt4e1Jt28iHVg$
> _______________________________________________
> jaxrs-dev mailing list
> jaxrs-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jaxrs-dev__;!!ACWV5N9M2RV99hQ!bxuQ6WKrg_Yer0F_937K1JOXda8v2tzzTCm21Zi6tuNIYwBnQjzpYn3pqRN9Hrt4e1Jt28iHVg$

_______________________________________________
jaxrs-dev mailing list
jaxrs-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jaxrs-dev__;!!ACWV5N9M2RV99hQ!cXF-nGFgLwGvf9ByAQQQo3Qy2dutlrpslYr-2maxfJPrejOOOimNGQmzOqyRxoMc$

Back to the top