Skip to content
FeedbackDashboard

Generate config suggestions

projects().configs().guess(ConfigGuessParamsparams, RequestOptionsrequestOptions = RequestOptions.none()) : ConfigGuessResponse
POST/v0/projects/{project}/configs/guess
Generate suggestions for changes to config files based on an OpenAPI spec.
ParametersExpand Collapse
params: ConfigGuessParams
project: Optional<String>
spec: String

OpenAPI spec

branch: Optional<String>

Branch name

ReturnsExpand Collapse
class ConfigGuessResponse:

Config files contents

content: String

The file content

Generate config suggestions

package com.configure_me_stainless_v0.api.example

import com.configure_me_stainless_v0.api.client.StainlessClient
import com.configure_me_stainless_v0.api.client.okhttp.StainlessOkHttpClient
import com.configure_me_stainless_v0.api.models.projects.configs.ConfigGuessParams
import com.configure_me_stainless_v0.api.models.projects.configs.ConfigGuessResponse

fun main() {
    val client: StainlessClient = StainlessOkHttpClient.builder()
        .fromEnv()
        .project("example-project")
        .build()

    val params: ConfigGuessParams = ConfigGuessParams.builder()
        .spec("spec")
        .build()
    val response: ConfigGuessResponse = client.projects().configs().guess(params)
}
{
  "foo": {
    "content": "content"
  }
}
Returns Examples
{
  "foo": {
    "content": "content"
  }
}