@@ -49,42 +49,42 @@ public PathItem getRefObject () {
4949 }
5050
5151 public @ Nullable Operation getGet () {
52- return getOperation (GET );
52+ return getOperationOrNull (GET );
5353 }
5454
5555 public @ Nullable Operation getPut () {
56- return getOperation (PUT );
56+ return getOperationOrNull (PUT );
5757 }
5858
5959 public @ Nullable Operation getPost () {
60- return getOperation (POST );
60+ return getOperationOrNull (POST );
6161 }
6262
6363 public @ Nullable Operation getDelete () {
64- return getOperation (DELETE );
64+ return getOperationOrNull (DELETE );
6565 }
6666
6767 public @ Nullable Operation getOptions () {
68- return getOperation (OPTIONS );
68+ return getOperationOrNull (OPTIONS );
6969 }
7070
7171 public @ Nullable Operation getHead () {
72- return getOperation (HEAD );
72+ return getOperationOrNull (HEAD );
7373 }
7474
7575 public @ Nullable Operation getPatch () {
76- return getOperation (PATCH );
76+ return getOperationOrNull (PATCH );
7777 }
7878
7979 public @ Nullable Operation getTrace () {
80- return getOperation (TRACE );
80+ return getOperationOrNull (TRACE );
8181 }
8282
8383 public Map <String , Operation > getOperations () {
8484 Map <String , Operation > operations = new LinkedHashMap <>();
8585 bucket .forEach ((operation , value ) -> {
8686 if (OPERATIONS .contains (operation )) {
87- operations .put (operation , getOperation (operation ));
87+ operations .put (operation , getOperation (operation ));
8888 }
8989 });
9090 return Collections .unmodifiableMap (operations );
@@ -98,7 +98,11 @@ public Collection<Parameter> getParameters () {
9898 return getObjectsOrEmpty (PARAMETERS , Parameter .class );
9999 }
100100
101- private @ Nullable Operation getOperation (String property ) {
101+ private Operation getOperation (String property ) {
102+ return getObjectOrThrow (property , Operation .class );
103+ }
104+
105+ private @ Nullable Operation getOperationOrNull (String property ) {
102106 return getObjectOrNull (property , Operation .class );
103107 }
104108
0 commit comments