[Bug]: Configure API - Adding Header layer does not include sublayers array
Open
Beginner friendly
Nobody has claimed this yet.
bug
- Dominant language
- JavaScript
- Stars
- 232
- Forks
- 77
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 17
Description
Checked for duplicates
Yes - I've already checked
Describe the bug
When using the addLayer endpoint to add a header layer like:
curl -XPOST -H "Authorization:Bearer {token}" -H "Content-Type: application/json" -d '{"placement": {"path": "Features.CAMP.DeepHeader.child35", "index": 0}, "layer": {"type": "header", "name": "child351", "sublayers": [], "description": "c"}, "mission": "MSL", "forceClientUpdate": false}' http://localhost:8889/api/configure/addLayer
"sublayers": [] should be automatically included if it wasn't. Otherwise, subsequent layer adds under that header will not work,
What did you expect?
Adding header layers does should include a 0sublayers array
Reproducible steps
No response
Environment
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the JavaScript implementation of the /api/configure/addLayer endpoint and trace how a new header layer is stored. Reproduce the supplied curl request, verify that a missing sublayers array is included in the result, and confirm that a subsequent layer can be added beneath the header.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100