You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@gqcn Currently GoFrame are using tags for openapi doc generation, most functions are fully functional and very helpful. But when adding some tags like security, there always needs to add a serialized json string, which is large and would makes the structure less readable. And too many tags would also have the same problem. Therefore, would it possible to add an interface for xxxReq to add a HOOK in the openapi doc generation process? Like we could add some functions here before using the generated operation object:
ifenhancedRequest, ok:=outputObject.Interface().(ResponseStatusDef); ok {
enhancedRequest.someHooker(&operation)
}
This could also cover some existing features that tags offers, but users could change the operation object directly in the hook function and override some info without limitations, making modifying openapi doc much easier and have more flexibility with some special needs. Also it could help reduce the tags info in the structure design that are not related to the real business info. And as the original design, the goai pack would provide 80% usage case, users could have this interface to change the doc in some edge cases.
While indeed, this feature has some duplication with what tags offers, but since it could be a much higher level operation, may be it could be added? Hoping to get your opinion for the framework perspective.
Additional
No response
The text was updated successfully, but these errors were encountered:
Description
@gqcn Currently GoFrame are using tags for openapi doc generation, most functions are fully functional and very helpful. But when adding some tags like
security
, there always needs to add a serialized json string, which is large and would makes the structure less readable. And too many tags would also have the same problem. Therefore, would it possible to add an interface for xxxReq to add aHOOK
in the openapi doc generation process? Like we could add some functions here before using the generatedoperation
object:gf/net/goai/goai_path.go
Line 278 in e4c4fb5
This could also cover some existing features that tags offers, but users could change the
operation
object directly in the hook function and override some info without limitations, making modifying openapi doc much easier and have more flexibility with some special needs. Also it could help reduce the tags info in the structure design that are not related to the real business info. And as the original design, thegoai
pack would provide 80% usage case, users could have this interface to change the doc in some edge cases.While indeed, this feature has some duplication with what tags offers, but since it could be a much higher level operation, may be it could be added? Hoping to get your opinion for the framework perspective.
Additional
No response
The text was updated successfully, but these errors were encountered: