Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you embed markdown in OpenAPI?

I presently have

openapi: 3.1.0
info:
  title: My API
  version:
    $ref: package.json#/version
  description: |
    practically the same content as README.md

Is there a way with JSON Pointers to embed text rather than JSON object? Something along the lines of

openapi: 3.1.0
info:
  title: My API
  version:
    $ref: package.json#/version
  description: |
    $ref: README.md
like image 552
Archimedes Trajano Avatar asked Mar 04 '26 12:03

Archimedes Trajano


1 Answers

Actually I was close and it did work. I didn't expect it to

openapi: 3.1.0
info:
  title:
    $ref: package.json#/description
  version:
    $ref: package.json#/version
  description:
    $ref: README.md

So now I basically avoided repeating myself for the title, version and the description.

like image 132
Archimedes Trajano Avatar answered Mar 08 '26 19:03

Archimedes Trajano



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!