Skip to content

Swagger UI TS Group Schema uses camelCase #1592

@krowvin

Description

@krowvin

Describe the bug
Swagger UI shows schema on POST example as camelCase but CDA enforces kebab-case on the backend.

Expected behavior
Ensure schema matches what the backend expects. UI returns a 500 which requires you to go to the log to then realize you should have provided "office-id" and not "officeId" the schema had shown.

To Reproduce

Attempt a POST request on timeseries group with

{
  "office-id": "SWT",
  "id": "test",
  "time-series-category": {
    "office-id": "SWT",
    "id": "KEYS",
    "description": "Keystone Lake"
  },
  "description": "List of ID's ordered in columns by their attribute integer",
  "assigned-time-series": [
    {
      "officeId": "SWT",
      "timeseriesId": "KEYS.Elev.Inst.1Hour.0.Ccp-Rev",
      "attribute": 0
    }
  ]
}

Logs/Incident Identifier

Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "officeId" (class cwms.cda.data.dto.AssignedTimeSeries), not marked as ignorable (5 known properties: "alias-id", "office-id", "ref-ts-id", "timeseries-id", "attribute"])
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 206] (through reference chain: cwms.cda.data.dto.TimeSeriesGroup["assigned-time-series"]->java.util.ArrayList[0]->cwms.cda.data.dto.AssignedTimeSeries["officeId"])
		at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
		at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:1153)
		at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:2241)
		at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1793)
		at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1771)
		at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:316)
		at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
		at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:361)
		at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:246)
		at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:30)
		at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138)
		at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:310)
		at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
		at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:342)
		at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4905)
		at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3848)
		at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3816)
		at cwms.cda.formatters.json.JsonV1.parseContent(JsonV1.java:85)
		... 67 more

CDA Version (please complete the following information):
At the top of any instance of CDA you will see a version. Please provide that version.

  • Version 2026.02.18-develop

Additional context

Thought I saw a PR that would check the schema in PR to prevent things like this

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions