[{"id":"openapibeginner-001","courseId":"openapi-beginner","domain":"document-structure","topic":"OpenAPI version field","prompt":"A description starts with openapi: 3.1.2. A tool wants to know which feature set the file may use. Which part of that string answers it?","hint":"Not every number in the string has the same job.","explain":"A version string has parts that signal different kinds of change. Work out which parts a tool needs to know what a file may use, and which part only records corrections to the text.","source":"https://spec.openapis.org/oas/latest.html#openapi-object","interaction":{"type":"single"},"options":[{"id":"a","text":"The first two numbers, 3.1","why":"The major.minor portion designates the feature set the document is written against."},{"id":"b","text":"The last number, 2","whyNot":"The patch part only addresses errors and clarifications, so it does not change the feature set."},{"id":"c","text":"The whole string, 3.1.2","whyNot":"Tools should not treat the patch number as a separate feature set; 3.1.0 and 3.1.2 match the same one."},{"id":"d","text":"Only the first number, 3","whyNot":"The major number matters, but the minor number is also needed to name the feature set."}],"answer":"a","explanation":"The major.minor portion of the openapi version designates the OAS feature set. Patch versions address errors or clarifications, and tooling should not distinguish between them.","concept":"The major.minor portion of the openapi version designates the OAS feature set. Patch versions address errors or clarifications, and tooling should not distinguish between them.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","code":"openapi: 3.1.2\ninfo:\n  title: Pet Shop\n  version: 1.0.0","takeaways":["Read the first two parts of openapi for the feature set; the patch number is for fixes."]},{"id":"openapibeginner-002","courseId":"openapi-beginner","domain":"document-structure","topic":"Mandatory root fields","prompt":"A teammate asks which keys every root object of an OpenAPI description must contain. Which TWO are mandatory?","hint":"Think about the metadata a description must carry, and the least a parser needs to accept it.","explain":"The root of a description is a small object with a few keys every parser needs before it accepts the file. Other parts are optional or hang off that root, and some keys are only needed as a group.","source":"https://learn.openapis.org/specification/structure.html","interaction":{"type":"multiple","tellCount":true},"options":[{"id":"a","text":"openapi","why":"This is the version field the root must declare, so tools can check the document against the spec."},{"id":"b","text":"info","why":"This is the metadata object, which itself must hold a title and a version."},{"id":"c","text":"paths","whyNot":"Only one of paths, components or webhooks is required; paths is not mandatory by itself."},{"id":"d","text":"servers","whyNot":"Optional: when it is absent, endpoints are taken relative to where the document is served."},{"id":"e","text":"title","whyNot":"Mandatory, but inside the metadata object rather than at the root."},{"id":"f","text":"tags","whyNot":"An optional list for grouping operations; a description can leave it out entirely."}],"answer":"ab","explanation":"The root OpenAPI Object must contain openapi and info, plus at least one of paths, components or webhooks.","concept":"The root OpenAPI Object must contain openapi and info, plus at least one of paths, components or webhooks.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["A minimal description needs openapi, info, and one of paths, components or webhooks."]},{"id":"openapibeginner-003","courseId":"openapi-beginner","domain":"document-structure","topic":"Info version versus spec version","prompt":"A description declares openapi: 3.1.0 and info.version: 2.4.0. A reader sees both numbers. What does the 2.4.0 tell them?","hint":"Two version labels sit in one file; ask what each one versions.","explain":"Two numbers in one file can look alike, yet they measure different things. One is tied to the rules the file follows; the other is tied to the thing the file describes.","source":"https://spec.openapis.org/oas/latest.html#info-object","interaction":{"type":"single"},"options":[{"id":"a","text":"The version of the OpenAPI document itself","why":"info.version versions the description document itself; the openapi field names the OAS version, a separate number."},{"id":"b","text":"The OpenAPI Specification release the file was written against","whyNot":"That is the openapi field, which names the spec version; info.version is a separate number."},{"id":"c","text":"The version of the server software hosting the API","whyNot":"Hosting software is outside the description; no field in the file records it."},{"id":"d","text":"The revision of the YAML syntax used to write the file","whyNot":"The file can be JSON or YAML; the version field is about the API description, not the syntax."}],"answer":"a","explanation":"info.version is the version of the OpenAPI document itself, while openapi gives the OAS version the document follows. They are separate numbers.","concept":"info.version is the version of the OpenAPI document itself, while openapi gives the OAS version the document follows. They are separate numbers.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["openapi is the spec version; info.version versions the description document itself."]},{"id":"openapibeginner-004","courseId":"openapi-beginner","domain":"document-structure","topic":"JSON and YAML documents","prompt":"Statement: a description written in YAML 1.2 and the same description written in JSON carry the same meaning to a tool that reads them.","hint":"Think about what each syntax can represent, not how it looks on the page.","explain":"Both syntaxes can encode the same kinds of values: objects, arrays, strings, numbers, booleans and nulls. Consider whether a syntax can add meaning to the data or only changes how the same data is written.","source":"https://learn.openapis.org/specification/structure.html","interaction":{"type":"true-false"},"options":[{"id":"a","text":"True","why":"Both syntaxes express the same objects, arrays and scalar values, so the parsed document is the same."},{"id":"b","text":"False","whyNot":"Comments, indentation and quotes are syntax only; they do not change the data a tool reads."}],"answer":"a","explanation":"YAML and JSON are interchangeable ways to write the same object model, as long as YAML 1.2 is used.","concept":"YAML and JSON are interchangeable ways to write the same object model, as long as YAML 1.2 is used.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["The format changes how a description is written, not what it says."]},{"id":"openapibeginner-005","courseId":"openapi-beginner","domain":"document-structure","topic":"Paths start with a slash","prompt":"Statement: in the paths object, a key written as users/{id}, with no leading slash, is a valid path entry.","hint":"Think about how each path key is combined with the server address.","explain":"Each key in the paths map is joined onto a base address to form a full address. Consider what shape a key must have for that join to produce a well-formed address.","source":"https://learn.openapis.org/specification/paths.html","interaction":{"type":"true-false"},"options":[{"id":"a","text":"True","whyNot":"Keys are appended directly to the server URL, so a key with no leading slash breaks the join."},{"id":"b","text":"False","why":"Every path must start with a forward slash, because it is appended directly to the server URL."}],"answer":"b","explanation":"Path keys must begin with a forward slash because they are appended directly to the server URL to form endpoint URLs.","concept":"Path keys must begin with a forward slash because they are appended directly to the server URL to form endpoint URLs.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["Every path key starts with a slash, such as /users/{id}."]}]