Skip to content
FeedbackDashboard

Generate config suggestions

projects.configs.guess(**kwargs) -> ConfigGuessResponse { content }
POST/v0/projects/{project}/configs/guess
Generate suggestions for changes to config files based on an OpenAPI spec.
ParametersExpand Collapse
project: String
spec: String

OpenAPI spec

branch: String

Branch name

ReturnsExpand Collapse
Hash[Symbol, { content}]

Config files contents

content: String

The file content

Generate config suggestions

require "stainless_v0"

stainless = StainlessV0::Client.new(
  api_key: "My API Key",
  environment: "staging" # defaults to "production"
)

response = stainless.projects.configs.guess(project: "project", spec: "spec")

puts(response)
{
  "foo": {
    "content": "content"
  }
}
Returns Examples
{
  "foo": {
    "content": "content"
  }
}