Umbraco-CMS: appsettings : ImageFileTypes Schema Vs Docs is wrong
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
10.5.0
Bug summary
I’m not sure if this has been raised before, but I think I’ve seen it somewhere and I have looked but could not find anything - so I apologise if it’s a duplicate.
I wasn’t sure if I should raise this here or in the Docs repo as they are both related and unsure which one is wrong (Docs Vs CMS).
It seems that the Imaging:ImageFileTypes is either using the wrong schema or the documentations may be wrong.
Specifics
Both Documentation for v10 and v11 outline an example as “ImageFileTypes”: [“jpeg”, “jpg”, “gif”, “bmp”, “png”, “tiff”, “tif”] which is an array.
When setting this configuration in appsettings.json as per the docs, intelliSense is returning a warning as “Value must be one of the following types: string”.
When inspecting appseetings-schema.json > line 923, you can see that the type for “ImageFileTypes” is set to string.
Steps to reproduce
- Using Visual Studio
- Make sure intelliSense is activated and properly setup
- Add the below configuration to appsettings.json.
"Umbraco": { "CMS": { "Content": { ... "Imaging": { "ImageFileTypes": ["jpeg", "jpg", "gif", "bmp", "png", "tiff", "tif"], ... }, ... } } }
- Notice that “ImageFileTypes” gets highlighted and check the warning message when you hover over it
UPDATE: The same goes for Plugins:properties:BrowsableFileExtensions
Expected result / actual result
either the schema and implementation or documentations need to be updated so we know what we should do.
This item has been added to our backlog AB#32240
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (14 by maintainers)
I just created the Pull request to the schemastore: https://github.com/SchemaStore/schemastore/pull/3162
Once this is merged, we need to test again but the issue should be gone after refreshing the schema definition in Visual Studio (code)