A Declarative Pipeline is one pipeline { } block; booknest-pipeline in Pipeline Jobs is a complete one. Inside it, agent and stages are required, while options (timeouts, build retention, timestamps()), environment, parameters, triggers, tools and post are optional. Each stage repeats a smaller set:

Because the structure is fixed, the controller can check a Jenkinsfile without running it. Its linter endpoint caught a file that put stage directly under pipeline:
curl -s -u "admin:$JENKINS_TOKEN" -X POST -F "jenkinsfile=<broken.groovy" \
http://localhost:32080/pipeline-model-converter/validateOutput
Errors encountered validating Jenkinsfile:
WorkflowScript: 3: Undefined section "stage" @ line 3, column 3.
stage('Inspect') {
^
WorkflowScript: 1: Missing required section "stages" @ line 1, column 1.
pipeline {
^The same check runs when a build starts, so a malformed Jenkinsfile fails in a second, not halfway through; call the endpoint from a pre-commit hook or an editor plugin to catch errors before you push.