fern icon indicating copy to clipboard operation
fern copied to clipboard

feat: allow users to reference another file with code samples

Open armandobelardo opened this issue 7 months ago • 2 comments

This now allows the code block in x-readme.code-samples and x-fern-examples.code-samples to specify a $ref to a file:

x-readme:
  code-samples:
     - language: go
        name: Documents
        install: go get github.com/cohere-ai/cohere-go/v2
        code:
          $ref: ./snippets/go/chat-post/documents/main.go

in addition to the original behavior

x-readme:
  code-samples:
     - language: go
        name: Documents
        install: go get github.com/cohere-ai/cohere-go/v2
        code: "client.doSomething(someParameters: ...)"

armandobelardo avatar Jul 16 '24 13:07 armandobelardo