JSON Pointer is a standard way to identify a value in a JSON or YAML document. In an OpenAPI document, a $ref can use a pointer to locate a reusable schema instead of repeating that schema in every operation. The same definition can then serve multiple responses, reducing duplication and unwanted differences. section 7.7.1
Share a product response schema
Both POST /products and GET /products/{productReference} can set their successful response schema to $ref: "#/components/schemas/Product". Here, # identifies the document root; each slash-separated segment names the next property. The pointer locates components.schemas.Product. Quote it in YAML because # otherwise starts a comment. section 7.7.1
Listing 7.12 References to reusable schemas
...
paths:
/products:
...
post:
...
responses:
"201":
...
content:
application/json:
schema:
$ref: "#/components/schemas/Product" #1
...
/products/{productReference}:
get:
...
responses:
"200":
...
content:
application/json:
schema:
$ref: "#/components/schemas/Product" #1
...
components:
schemas:
Product: ... #1
Compare the two response references with the single Product definition under components.schemas. section 7.7.1
Pointers are useful beyond response schemas. OpenAPI references can target reusable parameters, request bodies, headers, and responses; deeper references can target an inner schema without creating another small component. Reuse improves consistency, but optimize only where the benefit outweighs the added complexity. section 17.8
A pointer can also locate a problem rather than a reusable definition. A machine-readable API error may include an optional pointer to the offending place in a request body. In Spectral overrides, a pointer identifies where a lint rule should be ignored: #/paths/~1accounts/get/parameters identifies the parameters of GET /accounts, with ~1 standing for the slash in the path name. section 9.8.4 section 18.9.2

