License

The go-swagger/examples repository is licensed under the Apache License, Version 2.0.

Tip

Full text: LICENSE in the repository, or the canonical apache.org/licenses/LICENSE-2.0.

SPDX headers

Every .go file in the repository — hand-written and generated — carries an SPDX header so the license is machine-verifiable per file:

// SPDX-FileCopyrightText: Copyright 2015-2026 go-swagger maintainers
// SPDX-License-Identifier: Apache-2.0

The header is part of the contribution rules and is checked in CI. Generated files carry it too, emitted by the templates, so a regeneration never strips it.

Using the examples

Apache-2.0 is a permissive license: you may use, modify, and redistribute the example code, including in commercial and closed-source work, provided you retain the license and copyright notices and state significant changes. The code is provided as-is, without warranty. See the full text for the authoritative terms.