feat: Add CodeLess platform basic structure and API definition#35
feat: Add CodeLess platform basic structure and API definition#35topfunplusnew merged 4 commits intofront-devfrom
Conversation
Co-authored-by: ming10655 <ming10655@gmail.com>
Co-authored-by: ming10655 <ming10655@gmail.com>
Co-authored-by: ming10655 <ming10655@gmail.com>
…iguration management
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| if (!id) { | ||
| Message.error('更新失败:缺少ID'); | ||
| return false; | ||
| } |
There was a problem hiding this comment.
Falsy ID check incorrectly rejects zero as valid
Low Severity
The update and remove functions use !id to validate the ID parameter. Since the JSDoc explicitly documents id as string|number, passing the numeric value 0 would incorrectly trigger the "缺少ID" error because !0 evaluates to true. A stricter null check like id == null would properly allow 0 as a valid ID while still catching undefined and null.
Additional Locations (1)
| */ | ||
| export function apiSearchData(schemaKey, params) { | ||
| return getRequest()({ | ||
| url: `/codeless/data/${schemaKey}/search`, |
There was a problem hiding this comment.
API paths don't match OpenAPI specification prefix
High Severity
The API URL paths in data.js use /codeless/data/... but the OpenAPI specification defines the server base as /api/codeless, meaning the backend would expose endpoints at /api/codeless/data/.... Given the proxy configuration strips the /dev-api prefix and forwards the rest unchanged, requests would hit /codeless/data/... instead of the expected /api/codeless/data/..., resulting in 404 errors when the backend is implemented per the spec.
Note
Introduces a new low‑code platform and wires it into the app.
@code-less/platformpackage with:openapi.yaml) for schemas and generic data CRUDapi/request.js,api/data.js) and utilitycrudwrapper with Element UI messagesCodeLessEditor.vueand plugin entrysrc/index.jsthat registers global component,$codelessCrud, and dynamic route/codelessorder-system:@code-less/platformsrc/main.jsusing sharedservice(axios) androuterfor dynamic routesyarn.lock; adds an additional OpenAPI JSON file for default moduleWritten by Cursor Bugbot for commit 9a95587. This will update automatically on new commits. Configure here.