Method Import
Import(string, string)
Reads the operations of an OpenAPI 3 document as HTTP tool definitions.
public static IReadOnlyList<HttpApiToolDefinition> Import(string document, string baseUrl = null)
Parameters
documentstringThe document, as JSON or YAML.
baseUrlstringThe server to call; null takes the document's first server.
Returns
- IReadOnlyList<HttpApiToolDefinition>
One definition per operation, in document order.
Exceptions
- ArgumentNullException
Thrown when
documentis null.- FormatException
Thrown when the text is not an OpenAPI 3 document, or names no server to call.