Annotation Type ExpectedResponses


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface ExpectedResponses
    Annotation to annotate list of HTTP status codes that are expected in response from a REST endpoint.

    Example:

     @ExpectedResponses({200, 201})
     @Post("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/"
         + "hubs/{hubName}/images/getEntityTypeImageUploadUrl")
     void getUploadUrlForEntityType(@PathParam("resourceGroupName") String resourceGroupName,
         @PathParam("hubName") String hubName,
         @PathParam("subscriptionId") String subscriptionId,
         @BodyParam("application/json") RequestBody parameters);
     
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      int[] value
      The status code that will trigger that an error of type errorType should be returned.
    • Element Detail

      • value

        int[] value
        The status code that will trigger that an error of type errorType should be returned.
        Returns:
        The status code that will trigger than an error of type errorType should be returned.