ASF-ui
ASF-ui copied to clipboard
Only show valid config properties as options
What UI shows:
This setting on ASF wiki: https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Configuration#completetypestosend
Related: https://discord.com/channels/267292556709068800/332735075315744768/855995278385348629
Not sure if this issue is out of scope. I really do not want to parse wiki in order find out what are valid values for each property and I cant come up with a better approach right now.
I wonder what @Aareksio would do in such a situation.
Maybe @JustArchi or @Abrynos have a suggestion on how to handle this situation?
You don't, if swagger doesn't provide a way to further validate something, you shouldn't do anything extra.
Either you classify it as super important and we come to conclusion that we need to enhance our swagger schema to allow you to achieve that (as we did with flags
enum), or it's irrelevant. In this case I believe it's irrelevant, ASF accepts all the options for that property, just because other do not make sense doesn't mean user can't select them.
ASF accepts all the options for that property, just because other do not make sense doesn't mean user can't select them.
I get a 400 in response with this message: "Configured CompleteTypesToSend property is invalid: Sticker".
I get a 400 in response with this message: "Configured CompleteTypesToSend property is invalid: Sticker".
Show the message to the user and do nothing else. You're writing frontend, not backend.
Show the message to the user and do nothing else. You're writing frontend, not backend.
Yeah thats what we are doing currently.
Apparently swagger supports min and max for various properties: https://swagger.io/docs/specification/data-models/data-types/
I might be able to make use of it to better define what values are valid for each prop, I'll mention you in appropriate commit if I do that @MrBurrBurr
@MrBurrBurr https://github.com/JustArchiNET/ArchiSteamFarm/commit/874eb4d3a6db4b102b8b2a6bab9b5fcf57b2e385
https://ptb.discord.com/channels/267292556709068800/332735075315744768/859854787634004049