-
Notifications
You must be signed in to change notification settings - Fork 2
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
add __deweb_info endpoint to server #256
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few comments
Also, I'm wondering if that should be merged before or after #250
server/.gitignore
Outdated
api/read/models/ | ||
api/read/restapi/operations/ | ||
api/read/restapi/embedded_spec.go | ||
api/read/restapi/server.go | ||
api/read/restapi/doc.go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to put those files here
If the issue is that the format is not the same and so, it wants to be updated, simply generate and then run task fmt
There should only be the files that were modified because of the changes in the spec
type: string | ||
version: | ||
type: string | ||
misc: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry but I still don't understand the point of this misc thing 🤷♂️
could you explain me what it will be used for ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use additionalProperties: true
to allow properties not explicitely defined here to be present in the returned object. (maybe its even the default behaviour)
server/int/api/middlewares.go
Outdated
Cors := cors.New(cors.Options{ | ||
AllowedMethods: []string{"GET"}, | ||
AllowOriginVaryRequestFunc: allowCorsOriginFunc, | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need that ?
If that's only for the dewebInfoPath, can't we move that in the handler directly ?
server/int/api/config/config.go
Outdated
NetworkInfos msConfig.NetworkInfos | ||
AllowList []string | ||
BlockList []string | ||
MiscPubliInfoJson string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MiscPubliInfoJson string | |
MiscPublicInfoJson string |
server/int/api/config/config.go
Outdated
APIPort int `yaml:"api_port"` | ||
AllowList []string `yaml:"allow_list"` | ||
BlockList []string `yaml:"block_list"` | ||
MiscPublicInfoJson string `yaml:"misc_public_info"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, requesting for json inside of a yaml doesn't look like a good idea as the IDE's won't recognise the json inside of the yaml files and so won't be able to help users avoid errors
Users might make mistakes by using single or double quotes instead of single or double quotes etc, like, mixing formats in the same file is not a good idea
I would either make that a separate (and optional) json file, or parse as yaml and then make it to json
No description provided.