Skip to content

Data storage content: Base64 validity is not expressed by the schema (error 202 trigger) #223

Description

@lorandmolnar

Context

POST /masters/{masterNumber}/ports/{portNumber}/datastorage declares
error 202 (JSON data value invalid), and a genuine trigger exists: a
content string of valid length that is not decodable Base64 cannot
encode any DataStorageObject. The schema currently expresses only

type: string
minLength: 16
maxLength: 2748

so the Base64 requirement lives in prose only, and the invalid-value
case cannot be derived from the schema.

The JSON Test Specification already generates the corresponding
conformance test case
(TCJ_ERRS_CONTENT_POST_PORT_DS_202_NOT_BASE64, defined via a
supplement trigger constraint) on the assumption that the expected
answer is 400 with error code 202. Tracking: register entry ISS-25
(doc/open_issues.md).

Request

  1. Confirm that a non-Base64 content value shall be rejected with
    error 202.
  2. Add the Base64 constraint to the schema so the case becomes
    schema-derivable, e.g.
pattern: '^[A-Za-z0-9+/]*={0,2}$'

(or format: byte).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions