File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
java/org/springframework/samples/petclinic/rest/controller Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 2323import org .springframework .samples .petclinic .model .Visit ;
2424import org .springframework .samples .petclinic .rest .api .VisitsApi ;
2525import org .springframework .samples .petclinic .rest .dto .VisitDto ;
26+ import org .springframework .samples .petclinic .rest .dto .VisitFieldsDto ;
2627import org .springframework .samples .petclinic .service .ClinicService ;
2728import org .springframework .security .access .prepost .PreAuthorize ;
2829import org .springframework .web .bind .annotation .*;
@@ -84,7 +85,7 @@ public ResponseEntity<VisitDto> addVisit(VisitDto visitDto) {
8485
8586 @ PreAuthorize ("hasRole(@roles.OWNER_ADMIN)" )
8687 @ Override
87- public ResponseEntity <VisitDto > updateVisit (Integer visitId , VisitDto visitDto ) {
88+ public ResponseEntity <VisitDto > updateVisit (Integer visitId , VisitFieldsDto visitDto ) {
8889 Visit currentVisit = this .clinicService .findVisitById (visitId );
8990 if (currentVisit == null ) {
9091 return new ResponseEntity <>(HttpStatus .NOT_FOUND );
Original file line number Diff line number Diff line change @@ -1124,7 +1124,7 @@ paths:
11241124 content :
11251125 application/json :
11261126 schema :
1127- $ref : ' #/components/schemas/Visit '
1127+ $ref : ' #/components/schemas/VisitFields '
11281128 required : true
11291129 responses :
11301130 200 :
@@ -2086,9 +2086,9 @@ components:
20862086 format : int32
20872087 minimum : 0
20882088 example : 1
2089- readOnly : true
20902089 required :
20912090 - id
2091+ - petId
20922092 PetTypeFields :
20932093 title : PetType fields
20942094 description : Editable fields of a pet type.
You can’t perform that action at this time.
0 commit comments