Skip to content

Configuration file modifiers ignored in 2.7.2 #195

@kuisathaverat

Description

@kuisathaverat

After the update from 2.7.1 to 2.7.2 the parameters we have annotated with [boolean,nullable] stop working. We have configured the modifier boolean

/readme-generator --values $PWD/config.yml  --readme $PWD/README.md --schema $PWD/schema.json --config $PWD/schema-config.json

YAML configuration file config.yml

---
## @section Configuration
## @param field [boolean,nullable] Description of the field
field: true

README.md file

# Test Documentation

foo

## Parameters

### Configuration

Readme generator config file schema-config.json

{
  "comments": {
    "format": "##"
  },
  "tags": {
    "param": "@param",
    "section": "@section",
    "descriptionStart": "@descriptionStart",
    "descriptionEnd": "@descriptionEnd",
    "skip": "@skip",
    "extra": "@extra"
  },
  "modifiers": {
    "array": "array",
    "object": "object",
    "string": "string",
    "nullable": "nullable",
    "number": "number",
    "boolean": "boolean",
    "integer": "integer",
    "default": "default"
  },
  "regexp": {
    "paramsSectionTitle": "Parameters"
  }
}

Error logs

Skipping check for field
INFO: Checking missing metadata...
INFO: Metadata is correct!
/Users/inifc/src/oblt-framework/build/readme-generator-for-helm/lib/builder.js:53
        throw new Error(`Unknown modifier: ${modifier} for parameter ${param.name}`);
        ^

Error: Unknown modifier: boolean for parameter field
    at /Users/inifc/src/oblt-framework/build/readme-generator-for-helm/lib/builder.js:53:15
    at Array.forEach (<anonymous>)
    at applyModifiers (/Users/inifc/src/oblt-framework/build/readme-generator-for-helm/lib/builder.js:22:19)
    at buildParamsToRenderList (/Users/inifc/src/oblt-framework/build/readme-generator-for-helm/lib/builder.js:109:7)
    at /Users/inifc/src/oblt-framework/build/readme-generator-for-helm/index.js:53:30
    at Array.forEach (<anonymous>)
    at runReadmeGenerator (/Users/inifc/src/oblt-framework/build/readme-generator-for-helm/index.js:52:31)
    at Object.<anonymous> (/Users/inifc/src/oblt-framework/build/readme-generator-for-helm/bin/index.js:22:1)
    at Module._compile (node:internal/modules/cjs/loader:1760:14)
    at Object..js (node:internal/modules/cjs/loader:1893:10)

Node.js v24.8.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions