Documentation
¶
Overview ¶
Package externaldocsobjects exercises externalDocs on non-meta OAIv2 objects: operations (swagger:route + swagger:operation) and full schemas (swagger:model). On a simple-schema parameter (in != body) externalDocs is rejected with a diagnostic — it is a full-Schema-only keyword.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// Name carries field-level externalDocs.
//
// externalDocs:
// description: name docs
// url: https://name.example.org
Name string `json:"name"`
// Ref is a $ref'd field carrying a sibling externalDocs.
//
// externalDocs:
// description: ref docs
// url: https://ref.example.org
Ref Nested `json:"ref"`
}
Model carries externalDocs at the schema level and on its fields: a plain primitive field and a $ref'd field (whose sibling externalDocs must lift onto the allOf compound).
externalDocs:
description: model docs url: https://model.example.org
swagger:model Model
type Nested ¶
type Nested struct {
ID string `json:"id"`
}
Nested is referenced by Model.Ref.
swagger:model Nested
type QueryParams ¶
type QueryParams struct {
// Filter query parameter.
//
// in: query
// externalDocs:
// description: nope
// url: https://nope.example.org
Filter string `json:"filter"`
}
QueryParams has a simple (query) parameter wrongly carrying externalDocs; it is dropped with an unsupported-in-simple-schema diagnostic.
swagger:parameters listThings