Currently the configsuite.docs.generate function will not reflect defaults in the schema:
Small example:
import configsuite
schema = {
configsuite.MetaKeys.Type: configsuite.types.NamedDict,
configsuite.MetaKeys.Content: {
"threshold": {
configsuite.MetaKeys.Type: configsuite.types.Number,
configsuite.MetaKeys.Default: 0.95,
},
},
}
configsuite.docs.generate(schema)
returns:
'\n\n**threshold:**\n \n\n :type: number
would expect:
'\n\n**threshold:**\n \n\n :type: number\n \n\n :default: 0.95
A second (perhaps unrelated issue), is that if there are more levels to this, the top level will be marked as required, even though it can be omitted in the configuration.
Example:
import configsuite
schema = {
configsuite.MetaKeys.Type: configsuite.types.NamedDict,
configsuite.MetaKeys.Content: {
"content": {
configsuite.MetaKeys.Type: configsuite.types.NamedDict,
configsuite.MetaKeys.Content: {
"threshold": {
configsuite.MetaKeys.Type: configsuite.types.Number,
configsuite.MetaKeys.Default: 0.95,
},
},
},
},
}
configsuite.docs.generate(schema)
gives:
'\n\n**content*:**\n \n\n **threshold:**\n \n\n :type: number'
would expect:
'\n\n**content:**\n \n\n **threshold:**\n \n\n :type: number\n \n\n :default: 0.95
Currently the configsuite.docs.generate function will not reflect
defaultsin the schema:Small example:
returns:
'\n\n**threshold:**\n \n\n :type: numberwould expect:
'\n\n**threshold:**\n \n\n :type: number\n \n\n :default: 0.95A second (perhaps unrelated issue), is that if there are more levels to this, the top level will be marked as required, even though it can be omitted in the configuration.
Example:
gives:
'\n\n**content*:**\n \n\n **threshold:**\n \n\n :type: number'would expect:
'\n\n**content:**\n \n\n **threshold:**\n \n\n :type: number\n \n\n :default: 0.95