Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
- uses: actions/checkout@v7.0.1
- uses: actions/setup-node@v7.0.0
with:
node-version: "24"
node-version: "26"
- name: pnpm
run: corepack enable && corepack prepare pnpm@12.8.1 --activate
run: npm install -g pnpm@12.8.1
- name: Dependencias
working-directory: frontend
run: pnpm install --frozen-lockfile
Expand All @@ -60,9 +60,9 @@ jobs:
- uses: actions/checkout@v7.0.1
- uses: actions/setup-node@v7.0.0
with:
node-version: "24"
node-version: "26"
- name: pnpm
run: corepack enable && corepack prepare pnpm@12.8.1 --activate
run: npm install -g pnpm@12.8.1
- name: Dependencias
working-directory: frontend
run: pnpm install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

FROM node:26-bookworm-slim AS frontend
WORKDIR /src
RUN corepack enable && corepack prepare pnpm@12.8.1 --activate
RUN npm install -g pnpm@12.8.1
COPY frontend/package.json frontend/pnpm-lock.yaml frontend/pnpm-workspace.yaml ./
COPY frontend/ ./
RUN pnpm install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ La SPA y la API comparten origen. No hay CORS. En desarrollo, Vite proxea `/api`

## Arranque local

Requisitos: JDK 25 (Gradle puede descargarlo con el resolver de Foojay), Node.js 24, pnpm 12, Docker.
Requisitos: JDK 25 (Gradle puede descargarlo con el resolver de Foojay), Node.js 26, pnpm 12, Docker.

```bash
cp .env.example .env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import jakarta.validation.Valid;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
Expand All @@ -14,6 +15,7 @@
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;

import cl.overrid3.boilerplate.notes.internal.NoteService;
Expand Down Expand Up @@ -46,6 +48,7 @@ public NoteResponse get(@PathVariable UUID id) {
}

@PostMapping
@ResponseStatus(HttpStatus.CREATED)
@Operation(operationId = "createNote")
public ResponseEntity<NoteResponse> create(@Valid @RequestBody CreateNoteRequest request) {
NoteResponse created = notes.create(request);
Expand All @@ -59,6 +62,7 @@ public NoteResponse update(@PathVariable UUID id, @Valid @RequestBody UpdateNote
}

@DeleteMapping("/{id}")
@ResponseStatus(HttpStatus.NO_CONTENT)
@Operation(operationId = "deleteNote")
public ResponseEntity<Void> delete(@PathVariable UUID id) {
notes.delete(id);
Expand Down
8 changes: 4 additions & 4 deletions frontend/openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
}
} ],
"responses" : {
"200" : {
"description" : "OK"
"204" : {
"description" : "No Content"
}
},
"security" : [ {
Expand Down Expand Up @@ -132,8 +132,8 @@
"required" : true
},
"responses" : {
"200" : {
"description" : "OK",
"201" : {
"description" : "Created",
"content" : {
"*/*" : {
"schema" : {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/client/@tanstack/react-query.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { type DefaultError, queryOptions, type UseMutationOptions } from '@tanst

import { client } from '../client.gen';
import { createNote, deleteNote, getCurrentPrincipal, getNote, getPublicConfig, listNotes, type Options, updateNote } from '../sdk.gen';
import type { CreateNoteData, CreateNoteResponse, DeleteNoteData, GetCurrentPrincipalData, GetCurrentPrincipalResponse, GetNoteData, GetNoteResponse, GetPublicConfigData, GetPublicConfigResponse, ListNotesData, ListNotesResponse, UpdateNoteData, UpdateNoteResponse } from '../types.gen';
import type { CreateNoteData, CreateNoteResponse, DeleteNoteData, DeleteNoteResponse, GetCurrentPrincipalData, GetCurrentPrincipalResponse, GetNoteData, GetNoteResponse, GetPublicConfigData, GetPublicConfigResponse, ListNotesData, ListNotesResponse, UpdateNoteData, UpdateNoteResponse } from '../types.gen';

export const deleteNoteMutation = (options?: Partial<Options<DeleteNoteData>>): UseMutationOptions<unknown, DefaultError, Options<DeleteNoteData>> => {
const mutationOptions: UseMutationOptions<unknown, DefaultError, Options<DeleteNoteData>> = {
export const deleteNoteMutation = (options?: Partial<Options<DeleteNoteData>>): UseMutationOptions<DeleteNoteResponse, DefaultError, Options<DeleteNoteData>> => {
const mutationOptions: UseMutationOptions<DeleteNoteResponse, DefaultError, Options<DeleteNoteData>> = {
mutationFn: async (fnOptions) => {
const { data } = await deleteNote({
...options,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/client/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file is auto-generated by @hey-api/openapi-ts

export { createNote, deleteNote, getCurrentPrincipal, getNote, getPublicConfig, listNotes, type Options, updateNote } from './sdk.gen';
export type { ClientOptions, CreateNoteData, CreateNoteRequest, CreateNoteResponse, CreateNoteResponses, DeleteNoteData, DeleteNoteResponses, GetCurrentPrincipalData, GetCurrentPrincipalResponse, GetCurrentPrincipalResponses, GetNoteData, GetNoteResponse, GetNoteResponses, GetPublicConfigData, GetPublicConfigResponse, GetPublicConfigResponses, ListNotesData, ListNotesResponse, ListNotesResponses, MeResponse, NoteResponse, PublicConfigResponse, UpdateNoteData, UpdateNoteRequest, UpdateNoteResponse, UpdateNoteResponses } from './types.gen';
export type { ClientOptions, CreateNoteData, CreateNoteRequest, CreateNoteResponse, CreateNoteResponses, DeleteNoteData, DeleteNoteResponse, DeleteNoteResponses, GetCurrentPrincipalData, GetCurrentPrincipalResponse, GetCurrentPrincipalResponses, GetNoteData, GetNoteResponse, GetNoteResponses, GetPublicConfigData, GetPublicConfigResponse, GetPublicConfigResponses, ListNotesData, ListNotesResponse, ListNotesResponses, MeResponse, NoteResponse, PublicConfigResponse, UpdateNoteData, UpdateNoteRequest, UpdateNoteResponse, UpdateNoteResponses } from './types.gen';
10 changes: 6 additions & 4 deletions frontend/src/client/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ export type DeleteNoteData = {

export type DeleteNoteResponses = {
/**
* OK
* No Content
*/
200: unknown;
204: void;
};

export type DeleteNoteResponse = DeleteNoteResponses[keyof DeleteNoteResponses];

export type GetNoteData = {
body?: never;
path: {
Expand Down Expand Up @@ -113,9 +115,9 @@ export type CreateNoteData = {

export type CreateNoteResponses = {
/**
* OK
* Created
*/
200: NoteResponse;
201: NoteResponse;
};

export type CreateNoteResponse = CreateNoteResponses[keyof CreateNoteResponses];
Expand Down
Loading