Skip to content
Get started

Retrieve decorated spec

client.Spec.GetDecoratedSpec(ctx, projectName, query) (*SpecGetDecoratedSpecResponse, error)
get/v0/spec/application/{clientId}/{projectName}
Retrieve the decorated spec for a given application and project.
ParametersExpand Collapse
projectName string
query SpecGetDecoratedSpecParams
ClientID param.Field[string]
ReturnsExpand Collapse
type SpecGetDecoratedSpecResponse interface{…}
Retrieve decorated spec
package main

import (
  "context"
  "fmt"

  "github.com/stainless-api/stainless-api-go"
  "github.com/stainless-api/stainless-api-go/option"
)

func main() {
  client := stainless.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Spec.GetDecoratedSpec(
    context.TODO(),
    "projectName",
    stainless.SpecGetDecoratedSpecParams{
      ClientID: "clientId",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
{}
Returns Examples
{}