(Suggest)
REST APIs for managing LLM OAS suggestions
- Suggest - Generate suggestions for improving an OpenAPI document.
- SuggestOpenAPI - (DEPRECATED) Generate suggestions for improving an OpenAPI document.
- SuggestOpenAPIRegistry - Generate suggestions for improving an OpenAPI document stored in the registry.
Get suggestions from an LLM model for improving an OpenAPI document.
using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;
using System.Collections.Generic;
var sdk = new SDK(security: new Security() {
APIKey = "<YOUR_API_KEY_HERE>",
});
SuggestRequest req = new SuggestRequest() {
SuggestRequestBody = new SuggestRequestBody() {
Diagnostics = new List<Diagnostic>() {
new Diagnostic() {
Message = "<value>",
Path = new List<string>() {
"/rescue",
},
Type = "<value>",
},
},
OasSummary = new OASSummary() {
Info = new OASInfo() {
Description = "Object-based multi-state pricing structure",
License = new License() {},
Summary = "<value>",
Title = "<value>",
Version = "<value>",
},
Operations = new List<OASOperation>() {
new OASOperation() {
Description = "Innovative tangible hierarchy",
Method = "<value>",
OperationId = "<value>",
Path = "/usr/include",
Tags = new List<string>() {
"<value>",
},
},
},
},
SuggestionType = SpeakeasySDK.Models.Shared.SuggestRequestBodySuggestionType.MethodNames,
},
XSessionId = "<value>",
};
var res = await sdk.Suggest.SuggestAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
SuggestRequest | ✔️ | The request object to use for the request. |
Error Object | Status Code | Content Type |
---|---|---|
SpeakeasySDK.Models.Errors.SDKException | 4xx-5xx | / |
Get suggestions from an LLM model for improving an OpenAPI document.
using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;
using System.Collections.Generic;
var sdk = new SDK(security: new Security() {
APIKey = "<YOUR_API_KEY_HERE>",
});
SuggestOpenAPIRequest req = new SuggestOpenAPIRequest() {
RequestBody = new SuggestOpenAPIRequestBody() {
Schema = new Models.Operations.Schema() {
Content = System.Text.Encoding.UTF8.GetBytes("0x0FbfeAEcc8"),
FileName = "example.file",
},
},
XSessionId = "<value>",
};
var res = await sdk.Suggest.SuggestOpenAPIAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
SuggestOpenAPIRequest | ✔️ | The request object to use for the request. |
Error Object | Status Code | Content Type |
---|---|---|
SpeakeasySDK.Models.Errors.SDKException | 4xx-5xx | / |
Get suggestions from an LLM model for improving an OpenAPI document stored in the registry.
using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;
using System.Collections.Generic;
var sdk = new SDK(security: new Security() {
APIKey = "<YOUR_API_KEY_HERE>",
});
SuggestOpenAPIRegistryRequest req = new SuggestOpenAPIRegistryRequest() {
NamespaceName = "<value>",
RevisionReference = "<value>",
XSessionId = "<value>",
};
var res = await sdk.Suggest.SuggestOpenAPIRegistryAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
SuggestOpenAPIRegistryRequest | ✔️ | The request object to use for the request. |
SuggestOpenAPIRegistryResponse
Error Object | Status Code | Content Type |
---|---|---|
SpeakeasySDK.Models.Errors.SDKException | 4xx-5xx | / |