openapi: 3.0.1
info:
title: api
version: "0.1.0"
paths:
/whatever:
post:
operationId: CreateWhatever
requestBody:
content:
application/json-patch+json:
schema:
$ref: "#/components/schemas/Whatever"
application/json:
schema:
$ref: "#/components/schemas/Whatever"
text/json:
schema:
$ref: "#/components/schemas/Whatever"
application/*+json:
schema:
$ref: "#/components/schemas/Whatever"
responses:
201:
description: Whatever created
content:
text/plain:
schema:
$ref: "#/components/schemas/Whatever"
application/json:
schema:
$ref: "#/components/schemas/Whatever"
text/json:
schema:
$ref: "#/components/schemas/Whatever"
components:
schemas:
Whatever:
type: object
properties:
someProperty:
type: string
Generated Client Boilerplate:
// CreateWhateverJSONRequestBody defines body for CreateWhatever for application/*+json ContentType.
type CreateWhateverJSONRequestBody = Whatever
// CreateWhateverJSONRequestBody defines body for CreateWhatever for application/json ContentType.
type CreateWhateverJSONRequestBody = Whatever
// CreateWhateverJSONRequestBody defines body for CreateWhatever for application/json-patch+json ContentType.
type CreateWhateverJSONRequestBody = Whatever
...
// The interface specification for the client above.
type ClientInterface interface {
// CreateWhatever request with any body
CreateWhateverWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateWhatever(ctx context.Context, body CreateWhateverJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateWhatever(ctx context.Context, body CreateWhateverJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateWhatever(ctx context.Context, body CreateWhateverJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
...
// ClientWithResponsesInterface is the interface specification for the client with responses above.
type ClientWithResponsesInterface interface {
// CreateWhatever request with any body
CreateWhateverWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateWhateverResponse, error)
CreateWhateverWithResponse(ctx context.Context, body CreateWhateverJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWhateverResponse, error)
CreateWhateverWithResponse(ctx context.Context, body CreateWhateverJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWhateverResponse, error)
CreateWhateverWithResponse(ctx context.Context, body CreateWhateverJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWhateverResponse, error)
}
}
Generated Client Boilerplate: