Skip to content

Commit

Permalink
fix: capitalizing bc registry names
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj committed Aug 23, 2023
1 parent 648e199 commit 62ca782
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import io.swagger.v3.oas.annotations.tags.Tag;
import java.time.LocalDate;
import lombok.RequiredArgsConstructor;
import org.apache.commons.text.WordUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
Expand Down Expand Up @@ -81,7 +82,8 @@ public Flux<ClientLookUpDto> findByClientName(
@PathVariable String name
) {
return clientService
.findByClientNameOrIncorporation(name);
.findByClientNameOrIncorporation(name)
.map(client -> client.withName(WordUtils.capitalize(client.name())));
}

@GetMapping(value = "/incorporation/{incorporationId}")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ca.bc.gov.app.dto.client;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.With;


@Schema(
Expand All @@ -14,6 +15,7 @@
"legalType": "SP"
}"""
)
@With
public record ClientLookUpDto(
@Schema(description = "The code for that specific object", example = "00000002")
String code,
Expand Down

0 comments on commit 62ca782

Please sign in to comment.