directory
Version:
v0.0.0-...-a784d27
Opens a new window with list of versions in this module.
Published: Jul 8, 2024
License: Apache-2.0
Opens a new window with license information.
README
¶
External types examples
The sample specification provided here demonstrates how to bind your generated API
with some externally defined types for schemas.
This swagger specification illustrates the following use cases:
- refer to an external type imported from some external package, as its own definition
- refer to an external type imported from some external package, as part of another type (object, slice, map or tuple)
- refer to an external type imported from the default location of models (i.e. besides generated models)
- embed external type to add the Validatable interface.
- use hints in annotations to solve nullable/struct vs interface issues
- use hints in annotations to skip the validation of external types
NOTE: due to the addition of the "additionalItems" clause to illustrate tuples, the spec is not formally
valid against the swagger 2.0 schema.
Reference documentation
Directories
¶
cmd
|
|
|
|
|
|
|
|
|
|
Package restapi external types imports: external anonymous types
|
Package restapi external types imports: external anonymous types |
|
|
Click to show internal directories.
Click to hide internal directories.