Skip to content

Feat/output file case#41

Merged
harry-2401 merged 3 commits into
mainfrom
feat/output-file-case
Jul 5, 2026
Merged

Feat/output file case#41
harry-2401 merged 3 commits into
mainfrom
feat/output-file-case

Conversation

@harry-2401

Copy link
Copy Markdown
Contributor

No description provided.

…ming

Names craftgo derives from DSL identifiers - the per-method handler/service
files, the per-service directory, and each middleware file - now follow the
case set by a new output.fileCase manifest option: snake (default), kebab, or
camel (create_user.go / user_service/, or create-user.go / createUser.go).

Affects on-disk names only: URL routes stay kebab, Go package names and
identifiers are unchanged, and @group directories keep their verbatim segment.
idents.FileName / FileNameWords own the rule; the empty/kebab case is
byte-identical to the old KebabCase, so callers that don't set fileCase are
unaffected. config.validate rejects unknown values.
Snake is now the default output.fileCase, so regenerate every example
mini-project and the e2e matrix fixture. Per-method files and per-service
directories are renamed (create-user.go -> create_user.go, user-service/ ->
user_service/, auth-middleware.go -> auth_middleware.go) with gen-once stub
content preserved; regenerated handlers/routes carry the matching snake import
paths.
Add a File and directory naming section to the configuration guide, switch the
project-structure / getting-started / codegen-output layouts and the
middleware/keywords/runtime-api references to snake, and add a commented
fileCase line to the craftgo init manifest template.
@harry-2401
harry-2401 merged commit b683b0c into main Jul 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant