refactor(api)!: align client with canonical HTTP contract
Route all feature requests through business API modules, sync generated DTOs, and add communication tests and architecture documentation. BREAKING CHANGE: migrate the client to plural resource paths, canonical snake_case fields, ISO timestamps, and explicit paginated responses.
This commit is contained in:
+23
-1
@@ -43,11 +43,33 @@ export default defineConfig([
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['*.{js,mjs,cjs,ts,mts,cts}', 'scripts/**/*.{js,mjs,cjs,ts,mts,cts}'],
|
||||
files: [
|
||||
'*.{js,mjs,cjs,ts,mts,cts}',
|
||||
'scripts/**/*.{js,mjs,cjs,ts,mts,cts}',
|
||||
'tests/**/*.mjs',
|
||||
],
|
||||
languageOptions: {
|
||||
globals: globals.node,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['src/features/**/*.{ts,vue}'],
|
||||
ignores: ['src/features/*/api.ts', 'src/features/auth/authClient.ts'],
|
||||
rules: {
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
{
|
||||
paths: [
|
||||
{
|
||||
name: '@/lib/api',
|
||||
importNames: ['apiRequest'],
|
||||
message: '请通过所属业务的 api.ts 调用接口。',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
// Keep formatting in Prettier; this must follow the rule presets.
|
||||
prettier,
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user