File tree Expand file tree Collapse file tree
src/test/java/com/retailsvc/http Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -437,6 +437,8 @@ void postShapeUnknownKindReturns400() {
437437 assertThat (response .headers ().firstValue ("Content-Type" ).orElse ("" ))
438438 .contains ("application/problem+json" );
439439 assertThat (response .body ()).contains ("oneOf" );
440+ // Both branches fail at distinct leaves -> two entries, in the errors[] array.
441+ assertThat (response .body ()).contains ("\" errors\" " ).contains ("#/radius" ).contains ("#/kind" );
440442 } catch (IOException e ) {
441443 fail (e );
442444 } catch (InterruptedException e ) {
@@ -459,6 +461,9 @@ void postShapeMissingDiscriminatorReturns400() {
459461 assertThat (response .headers ().firstValue ("Content-Type" ).orElse ("" ))
460462 .contains ("application/problem+json" );
461463 assertThat (response .body ()).contains ("oneOf" );
464+ // Both branches fail identically at /kind required -> de-duplicated to one entry.
465+ assertThat (response .body ()).contains ("\" errors\" " ).contains ("#/kind" );
466+ assertThat (response .body ().split ("#/kind" , -1 )).hasSize (2 ); // exactly one occurrence
462467 } catch (IOException e ) {
463468 fail (e );
464469 } catch (InterruptedException e ) {
You can’t perform that action at this time.
0 commit comments