NASA-AMMOS / NASA-AMMOS/MMGIS

[Bug]: Configure API - Adding Header layer does not include sublayers array

Open Beginner friendly
#442 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.