refactor(schema): simplify validation and OpenAPI generation (#2709)

This commit is contained in:
Hampus authored and GitHub committed 2026-09-11 23:24:26 +02:00
1 parent 4bc5593f9f
commit de1fd95a99
510 files changed
+29494 -36131

No files matched your search

@@ -7,7 +7,7 @@ import {
INITIAL_FORM_VALUES,
type State,
} from '@app/features/moderation/components/report/ReportTypes';
import {assign, getInitialSnapshot, type SnapshotFrom, setup, transition} from 'xstate';
import {assign, initialTransition, type SnapshotFrom, setup, transition} from 'xstate';
type ReportMachineContext = Omit<State, 'flowStep'>;
@@ -162,7 +162,7 @@ export const reportStateMachine = setup({
export type ReportMachineSnapshot = SnapshotFrom<typeof reportStateMachine>;
export function createReportSnapshot(): ReportMachineSnapshot {
return getInitialSnapshot(reportStateMachine);
return initialTransition(reportStateMachine)[0];
}
export function transitionReportSnapshot(snapshot: ReportMachineSnapshot, event: Action): ReportMachineSnapshot {