Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 [v3 Proposal]: Improve more new features #2877

Open
3 tasks done
HHC26 opened this issue Feb 23, 2024 · 4 comments
Open
3 tasks done

📝 [v3 Proposal]: Improve more new features #2877

HHC26 opened this issue Feb 23, 2024 · 4 comments

Comments

@HHC26
Copy link

HHC26 commented Feb 23, 2024

Feature Proposal Description

You can refer to this https://github.com/gogf/gf
It has some practical features, but excessive encapsulation leads to bloating

I think these features are quite good:

  1. automatic codes generating for efficiency
  2. robust engineering design specifications
  3. convenient development CLI tool provide
  4. openAPIV3 documentation generating, automatically

I hope fiber can get better and better, and more people will use it

Alignment with Express API

n/a

HTTP RFC Standards Compliance

n/a

API Stability

n/a

Feature Examples

n/a

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have searched for existing issues that describe my proposal before opening this one.
  • I understand that a proposal that does not meet these guidelines may be closed without explanation.
Copy link

welcome bot commented Feb 23, 2024

Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@ReneWerner87
Copy link
Member

ReneWerner87 commented Feb 23, 2024

@HHC26
can you give concrete examples for every point (1-4) and show how the fiber api should look with these features

please also put it in relation to the expressjs api, so that we make sure that we don't design anything completely different from expressjs

we need to know exactly what the ideas are, otherwise we can never finalize this proposal
i.e. we need concrete use cases and api designs for the methodologies to be adapted

@HHC26
Copy link
Author

HHC26 commented Feb 23, 2024

@HHC26 can you give concrete examples for every point (1-4) and show how the fiber api should look with these features

please also put it in relation to the expressjs api, so that we make sure that we don't design anything completely different from expressjs

we need to know exactly what the ideas are, otherwise we can never finalize this proposal i.e. we need concrete use cases and api designs for the methodologies to be adapted

ok

  1. automatic codes generating for efficiency and 3. convenient development CLI tool provide
    fiber gen ctrl, fiber gen dao , fiber gen service ……
    eg:
    fiber gen COMMAND [OPTION]
    COMMAND
    ctrl parse api definitions to generate controller/sdk go files
    dao automatically generate go files for model/
    service parse struct and associated functions from packages to generate service go file

  2. robust engineering design specifications
    eg:
    image
    This is the directory of my project, which can be referenced

  3. openAPIV3 documentation generating, automatically
    type LoginReq struct {
    g.Meta path:"/login" method:"post" sm:"login"
    Name string json:"user_name" summary:""
    Password string json:"password" summary:""
    }
    type LoginRes struct {
    Token string json:"token"
    }
    link: https://redocly.com/redoc/
    image

@ReneWerner87
Copy link
Member

ReneWerner87 commented Feb 23, 2024

we had a fiber cli back then, for the quicksetup of the project
but this is no longer necessary and was not used much, as the setup is quite simple

in golang we do not specify any folder structures
https://go.dev/doc/modules/layout
every developer can decide for himself how to structure his order or follow an example of best practice from github
https://github.com/golang-standards/project-layout

there is also a boilderplate project https://github.com/gofiber/boilerplate and many example apps https://github.com/gofiber/recipes

the fiber framework does not provide an MVC pattern and therefore will not offer generation
however, we have best practice examples in our recipe respository
image
https://github.com/gofiber/recipes/tree/master/fiber-bootstrap

regarding openapi, we don't want to bloat the fiber core, but we do want to make it possible to create additional modules
for openai and code generation an extra module can be created in our other repositories or there are already possibilities -> maybe we should link them better in the documentation
https://github.com/deepmap/oapi-codegen
https://github.com/deepmap/oapi-codegen/pull/1022/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants