File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
jaxrs-2.0/jaxrs-2.0-common/testing/src/main/java/io/opentelemetry/instrumentation/jaxrs/v2_0/test
jaxrs-3.0/jaxrs-3.0-common/testing/src/main/java/io/opentelemetry/instrumentation/jaxrs/v3_0/test Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 55
66package io .opentelemetry .instrumentation .jaxrs .v2_0 .test ;
77
8+ import static javax .ws .rs .core .MediaType .TEXT_PLAIN ;
9+
810import javax .ws .rs .POST ;
911import javax .ws .rs .Path ;
1012import javax .ws .rs .PathParam ;
13+ import javax .ws .rs .Produces ;
1114
1215@ Path ("/ignored" )
1316public interface Resource {
@@ -24,6 +27,7 @@ interface SubResource extends Cloneable, Resource {
2427
2528 class Test1 implements SubResource {
2629 @ Override
30+ @ Produces (TEXT_PLAIN )
2731 public String hello (String name ) {
2832 return "Test1 " + name + "!" ;
2933 }
@@ -32,6 +36,7 @@ public String hello(String name) {
3236 @ Path ("/test2" )
3337 class Test2 implements SubResource {
3438 @ Override
39+ @ Produces (TEXT_PLAIN )
3540 public String hello (String name ) {
3641 return "Test2 " + name + "!" ;
3742 }
@@ -42,12 +47,14 @@ class Test3 implements SubResource {
4247 @ Override
4348 @ POST
4449 @ Path ("/hi/{name}" )
50+ @ Produces (TEXT_PLAIN )
4551 public String hello (@ PathParam ("name" ) String name ) {
4652 return "Test3 " + name + "!" ;
4753 }
4854
4955 @ POST
5056 @ Path ("/nested" )
57+ @ Produces (TEXT_PLAIN )
5158 public String nested () {
5259 return hello ("nested" );
5360 }
Original file line number Diff line number Diff line change 55
66package io .opentelemetry .instrumentation .jaxrs .v3_0 .test ;
77
8+ import static jakarta .ws .rs .core .MediaType .TEXT_PLAIN ;
9+
810import jakarta .ws .rs .POST ;
911import jakarta .ws .rs .Path ;
1012import jakarta .ws .rs .PathParam ;
13+ import jakarta .ws .rs .Produces ;
1114
1215@ Path ("/ignored" )
1316public interface Resource {
@@ -24,6 +27,7 @@ interface SubResource extends Cloneable, Resource {
2427
2528 class Test1 implements SubResource {
2629 @ Override
30+ @ Produces (TEXT_PLAIN )
2731 public String hello (String name ) {
2832 return "Test1 " + name + "!" ;
2933 }
@@ -32,6 +36,7 @@ public String hello(String name) {
3236 @ Path ("/test2" )
3337 class Test2 implements SubResource {
3438 @ Override
39+ @ Produces (TEXT_PLAIN )
3540 public String hello (String name ) {
3641 return "Test2 " + name + "!" ;
3742 }
@@ -42,12 +47,14 @@ class Test3 implements SubResource {
4247 @ Override
4348 @ POST
4449 @ Path ("/hi/{name}" )
50+ @ Produces (TEXT_PLAIN )
4551 public String hello (@ PathParam ("name" ) String name ) {
4652 return "Test3 " + name + "!" ;
4753 }
4854
4955 @ POST
5056 @ Path ("/nested" )
57+ @ Produces (TEXT_PLAIN )
5158 public String nested () {
5259 return hello ("nested" );
5360 }
You can’t perform that action at this time.
0 commit comments