OSCAL icon indicating copy to clipboard operation
OSCAL copied to clipboard

Mix of dashes and underscore in json schema's file names

Open guyzyl opened this issue 3 years ago • 5 comments

Describe the bug

In json/schemas directory most schemas use underscores for file names (for example - oscal_component_schema.json). There are currently two files using a mix of underscores and dashes, they are:

  • oscal_assessment-plan_schema.json
  • oscal_assessment-results_schema.json

This causes file naming discrepancies between the different schema files, and should be changed for better uniformity.

Other Comments

I am more then willing to open a PR to solve this, just want to make sure I'm not the only one who sees this as an issue first.

guyzyl avatar Jan 17 '22 13:01 guyzyl

@guyzyl - The naming convention is consistent: oscal_[model name]_schema.json, where the model name follows the dash convention for composed names. All the other files do not present the dash structures because the model name is comprised of one word. Assessment Plan (aka assessment-plan) and Assessment Results (aka assessment-results) are the only model names that have 2 words. Similar naming conventions appear in the xml/schema subdirectory.

iMichaela avatar Jan 17 '22 19:01 iMichaela

@iMichaela I now see the consistency. Wouldn't it be better to have either all dashes or underscore for the file names? AFK it is uncommon for dev related files to have a mix of the two.

guyzyl avatar Jan 18 '22 12:01 guyzyl

I'll bring this up on the next Lunch with the Devs on 1/27 and get some broader opinions on a way forward. If we make this change, it will likely need to be made in a major/minor release with some warning to the community.

david-waltermire avatar Jan 18 '22 13:01 david-waltermire

At first, long before I was a team member ironically, I was like why underscored and dashes at the same time? I noticed others do this too, and I had personally preferred one or the other. Using underscores for file parts and logical model names have dashes makes it easy to Alt-Tab for file completion in terminal and code editors because the NIST OSCAL devs were consistent.

I can show on the call, but I actually appreciate this. I hope we don't change it! :-)

aj-stein-nist avatar Jan 18 '22 14:01 aj-stein-nist

@guyzyl We can discuss this on a lunch with the Devs to get community feedback on the desire to do this and any impacts this will cause.

If we make a change to do this, we should only change the naming pattern on a major/minor release boundary.

david-waltermire avatar Mar 08 '22 16:03 david-waltermire

Given our CI/CD changes in https://github.com/usnistgov/OSCAL/pull/1857 with substantial refactoring with little to no feedback on this particular issue as it would resurface, I am going to close this as WONTFIX unless someone in the community brings it back up with a compelling, near-term need.

aj-stein-nist avatar Aug 31 '23 13:08 aj-stein-nist