Feat/output file case#41
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.