Repository navigation
Conversation
1d15b28 to
0ca6d76
Compare
c9cb8f9 to
2847720
Compare
d9eb88e to
2b0d7a5
Compare
2b0d7a5 to
0a677ab
Compare
| @POST | ||
| @Consumes(MediaType.APPLICATION_JSON) | ||
| public Response addNewsItem(NewsItem newsItem, @Context UriInfo uriInfo) throws IOException { | ||
| if(newsItem == null) { |
There was a problem hiding this comment.
Habe das ExceptionMapping zurück gedreht und nutze das bisherige nicht den RFC
| return Response.status(Response.Status.CREATED).entity(newsItem).build(); | ||
| } | ||
| catch(ConstraintViolationException exception) { | ||
| String detail = exception.getConstraintViolations().stream() |
There was a problem hiding this comment.
kannst du die validation nicht rausziehen? das hat bisschen was von Exception-Oriented-Programming :/
There was a problem hiding this comment.
Ich habe die RFC 9457 anpassungen wieder rausgenommen
| @Delegate | ||
| private NewsService newsService; | ||
|
|
||
| public ManagedNewsService(NewsConfiguration configuration, Validator validator) { |
|
|
||
| private final NewsService newsService; | ||
| @PathParam(DATASET) | ||
| DatasetId datasetId; |
| item.link(), | ||
| item.date() | ||
| ) | ||
| ).toList(); |
There was a problem hiding this comment.
glaube du musst die nicht toListen?
There was a problem hiding this comment.
Dann müsste ich einen Stream zurückgeben, der implizit zu einer Liste gemacht wird. Liste ist hier praktischer, da es dann später explizit auch zu einer OpenApi Spec gematched werden kann
| this.newsItemReader = om.readerFor(FileSystemNewsItem.class); | ||
| this.newsItemWriter = om.writerFor(FileSystemNewsItem.class); | ||
|
|
||
| Files.createDirectories(newsFolder); |
There was a problem hiding this comment.
knallt das wenn die schon existieren?
There was a problem hiding this comment.
Nope, das ist wie mkdir -pr ...
aac0822 to
b2ae18e
Compare
b2ae18e to
937cf6b
Compare
Co-authored-by: Codex GPT-6 <codex@openai.com>
Co-authored-by: Codex gpt-6 <codex@openai.com>
d185459 to
2987a05
Compare
No description provided.