typespec1-12 Exercise 1: Version 3 With an Optional Room Floor ========================================================================== The change (branch ex1-floor in the scratch repository), added to the Room model in main.tsp, plus 'v3: "3.0"' in the Versions enum: /** The floor, counting the ground floor as 0. Added in version 3. */ @added(Versions.v3) @minValue(0) @maxValue(100) floor?: int32; Regenerated and committed. The summary of the pull request: api/generated/json-schema/Room.json | 6 + api/generated/json-schema/Versions.json | 3 +- api/generated/openapi/openapi.3.0.yaml | 591 ++++++++++++++++++++++++++++++++ api/main.tsp | 7 + 4 files changed, 606 insertions(+), 1 deletion(-) ci.sh: PASS tsp format --check PASS tsp compile --warn-as-error PASS generated OpenAPI is committed PASS no breaking change vs main ALL CHECKS PASSED WHAT CHANGED The source: 7 lines (the version, the field and its comment). A new contract, openapi.3.0.yaml (591 lines), which contains everything in version 2 plus the new field. JSON Schema: Room.json gained the floor property (6 lines) and Versions.json gained the new version. The JSON Schema is not versioned, so it describes the latest Room. NO PUBLISHED FILE WAS TOUCHED: openapi.1.0.yaml and openapi.2.0.yaml are absent from the summary. That is because the project emits only reachable types (omit-unreachable-types), so the version enum does not appear in the old files. THE CHECK All four steps passed: formatting, compile with warnings as errors, generated files committed, no breaking change against main. Not done: the branch was not merged, and nothing was run on GitHub. WHY THIS WORKS AS AN ANSWER --------------------------- It is the minimal safe change: an optional field in a new version. The summary of files touched is the evidence that no published contract moved.