pax_global_header00006660000000000000000000000064145731275000014516gustar00rootroot0000000000000052 comment=afe2925deba39cdca4adbb938a250b41d362fa28 validate-0.24.0/000077500000000000000000000000001457312750000133725ustar00rootroot00000000000000validate-0.24.0/.editorconfig000066400000000000000000000010331457312750000160440ustar00rootroot00000000000000# top-most EditorConfig file root = true # Unix-style newlines with a newline ending every file [*] end_of_line = lf insert_final_newline = true indent_style = space indent_size = 2 trim_trailing_whitespace = true # Set default charset [*.{js,py,go,scala,rb,java,html,css,less,sass,md}] charset = utf-8 # Tab indentation (no size specified) [*.go] indent_style = tab [*.md] trim_trailing_whitespace = false # Matches the exact files either package.json or .travis.yml [{package.json,.travis.yml}] indent_style = space indent_size = 2 validate-0.24.0/.gitattributes000066400000000000000000000001131457312750000162600ustar00rootroot00000000000000# gofmt always uses LF, whereas Git uses CRLF on Windows. *.go text eol=lf validate-0.24.0/.github/000077500000000000000000000000001457312750000147325ustar00rootroot00000000000000validate-0.24.0/.github/CONTRIBUTING.md000066400000000000000000000114601457312750000171650ustar00rootroot00000000000000## Contribution Guidelines ### Pull requests are always welcome We are always thrilled to receive pull requests, and do our best to process them as fast as possible. Not sure if that typo is worth a pull request? Do it! We will appreciate it. If your pull request is not accepted on the first try, don't be discouraged! If there's a problem with the implementation, hopefully you received feedback on what to improve. We're trying very hard to keep go-swagger lean and focused. We don't want it to do everything for everybody. This means that we might decide against incorporating a new feature. However, there might be a way to implement that feature *on top of* go-swagger. ### Conventions Fork the repo and make changes on your fork in a feature branch: - If it's a bugfix branch, name it XXX-something where XXX is the number of the issue - If it's a feature branch, create an enhancement issue to announce your intentions, and name it XXX-something where XXX is the number of the issue. Submit unit tests for your changes. Go has a great test framework built in; use it! Take a look at existing tests for inspiration. Run the full test suite on your branch before submitting a pull request. Update the documentation when creating or modifying features. Test your documentation changes for clarity, concision, and correctness, as well as a clean documentation build. See ``docs/README.md`` for more information on building the docs and how docs get released. Write clean code. Universally formatted code promotes ease of writing, reading, and maintenance. Always run `gofmt -s -w file.go` on each changed file before committing your changes. Most editors have plugins that do this automatically. Pull requests descriptions should be as clear as possible and include a reference to all the issues that they address. Pull requests must not contain commits from other users or branches. Commit messages must start with a capitalized and short summary (max. 50 chars) written in the imperative, followed by an optional, more detailed explanatory text which is separated from the summary by an empty line. Code review comments may be added to your pull request. Discuss, then make the suggested modifications and push additional commits to your feature branch. Be sure to post a comment after pushing. The new commits will show up in the pull request automatically, but the reviewers will not be notified unless you comment. Before the pull request is merged, make sure that you squash your commits into logical units of work using `git rebase -i` and `git push -f`. After every commit the test suite should be passing. Include documentation changes in the same commit so that a revert would remove all traces of the feature or fix. Commits that fix or close an issue should include a reference like `Closes #XXX` or `Fixes #XXX`, which will automatically close the issue when merged. ### Sign your work The sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below (from [developercertificate.org](http://developercertificate.org/)): ``` Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 660 York Street, Suite 102, San Francisco, CA 94110 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. ``` then you just add a line to every git commit message: Signed-off-by: Joe Smith using your real name (sorry, no pseudonyms or anonymous contributions.) You can add the sign off when creating the git commit via `git commit -s`. validate-0.24.0/.github/dependabot.yaml000066400000000000000000000032001457312750000177160ustar00rootroot00000000000000version: 2 updates: - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" day: "friday" open-pull-requests-limit: 2 # <- default is 5 groups: # <- group all github actions updates in a single PR # 1. development-dependencies are auto-merged development-dependencies: patterns: - '*' - package-ecosystem: "gomod" # We define 4 groups of dependencies to regroup update pull requests: # - development (e.g. test dependencies) # - go-openapi updates # - golang.org (e.g. golang.org/x/... packages) # - other dependencies (direct or indirect) # # * All groups are checked once a week and each produce at most 1 PR. # * All dependabot PRs are auto-approved # # Auto-merging policy, when requirements are met: # 1. development-dependencies are auto-merged # 2. golang.org-dependencies are auto-merged # 3. go-openapi patch updates are auto-merged. Minor/major version updates require a manual merge. # 4. other dependencies require a manual merge directory: "/" schedule: interval: "weekly" day: "friday" open-pull-requests-limit: 4 groups: development-dependencies: patterns: - "github.com/stretchr/testify" golang.org-dependencies: patterns: - "golang.org/*" go-openapi-dependencies: patterns: - "github.com/go-openapi/*" other-dependencies: exclude-patterns: - "github.com/go-openapi/*" - "github.com/stretchr/testify" - "golang.org/*" validate-0.24.0/.github/workflows/000077500000000000000000000000001457312750000167675ustar00rootroot00000000000000validate-0.24.0/.github/workflows/auto-merge.yml000066400000000000000000000031301457312750000215540ustar00rootroot00000000000000name: Dependabot auto-merge on: pull_request permissions: contents: write pull-requests: write jobs: dependabot: runs-on: ubuntu-latest if: github.actor == 'dependabot[bot]' steps: - name: Dependabot metadata id: metadata uses: dependabot/fetch-metadata@v1 - name: Auto-approve all dependabot PRs run: gh pr review --approve "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GH_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Auto-merge dependabot PRs for development dependencies if: contains(steps.metadata.outputs.dependency-group, 'development-dependencies') run: gh pr merge --auto --rebase "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GH_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Auto-merge dependabot PRs for go-openapi patches if: contains(steps.metadata.outputs.dependency-group, 'go-openapi-dependencies') && (steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch') run: gh pr merge --auto --rebase "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GH_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Auto-merge dependabot PRs for golang.org updates if: contains(steps.metadata.outputs.dependency-group, 'golang.org-dependencies') run: gh pr merge --auto --rebase "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GH_TOKEN: ${{secrets.GITHUB_TOKEN}} validate-0.24.0/.github/workflows/go-test.yml000066400000000000000000000025131457312750000210750ustar00rootroot00000000000000name: go test on: push: tags: - v* branches: - master pull_request: jobs: lint: name: Lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: stable check-latest: true cache: true - name: golangci-lint uses: golangci/golangci-lint-action@v4 with: version: latest only-new-issues: true skip-cache: true test: name: Unit tests runs-on: ${{ matrix.os }} strategy: matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] go_version: ['oldstable', 'stable' ] steps: - name: Run unit tests uses: actions/setup-go@v5 with: go-version: '${{ matrix.go_version }}' check-latest: true cache: true - uses: actions/checkout@v4 - run: go test -v -race -timeout 20m -coverprofile="coverage-${{ matrix.os }}.${{ matrix.go_version }}.out" -covermode=atomic -coverpkg=$(go list)/... ./... - name: Upload coverage to codecov uses: codecov/codecov-action@v4 with: files: './coverage-${{ matrix.os }}.${{ matrix.go_version }}.out' flags: '${{ matrix.go_version }}' os: '${{ matrix.os }}' fail_ci_if_error: false verbose: true validate-0.24.0/.gitignore000066400000000000000000000000601457312750000153560ustar00rootroot00000000000000secrets.yml coverage.out *.cov *.out playground validate-0.24.0/.golangci.yml000066400000000000000000000016701457312750000157620ustar00rootroot00000000000000linters-settings: govet: check-shadowing: true golint: min-confidence: 0 gocyclo: min-complexity: 45 maligned: suggest-new: true dupl: threshold: 200 goconst: min-len: 2 min-occurrences: 3 linters: enable-all: true disable: - maligned - unparam - lll - gochecknoinits - gochecknoglobals - funlen - godox - gocognit - whitespace - wsl - wrapcheck - testpackage - nlreturn - gomnd - exhaustivestruct - goerr113 - errorlint - nestif - godot - gofumpt - paralleltest - tparallel - thelper - ifshort - exhaustruct - varnamelen - gci - depguard - errchkjson - inamedparam - nonamedreturns - musttag - ireturn - forcetypeassert - cyclop # deprecated linters - deadcode - interfacer - scopelint - varcheck - structcheck - golint - nosnakecase validate-0.24.0/BENCHMARK.md000066400000000000000000000016551457312750000152150ustar00rootroot00000000000000# Benchmark Validating the Kubernetes Swagger API ## v0.22.6: 60,000,000 allocs ``` goos: linux goarch: amd64 pkg: github.com/go-openapi/validate cpu: AMD Ryzen 7 5800X 8-Core Processor Benchmark_KubernetesSpec/validating_kubernetes_API-16 1 8549863982 ns/op 7067424936 B/op 59583275 allocs/op ``` ## After refact PR: minor but noticable improvements: 25,000,000 allocs ``` go test -bench Spec goos: linux goarch: amd64 pkg: github.com/go-openapi/validate cpu: AMD Ryzen 7 5800X 8-Core Processor Benchmark_KubernetesSpec/validating_kubernetes_API-16 1 4064535557 ns/op 3379715592 B/op 25320330 allocs/op ``` ## After reduce GC pressure PR: 17,000,000 allocs ``` goos: linux goarch: amd64 pkg: github.com/go-openapi/validate cpu: AMD Ryzen 7 5800X 8-Core Processor Benchmark_KubernetesSpec/validating_kubernetes_API-16 1 3758414145 ns/op 2593881496 B/op 17111373 allocs/op ``` validate-0.24.0/CODE_OF_CONDUCT.md000066400000000000000000000062411457312750000161740ustar00rootroot00000000000000# Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at ivan+abuse@flanders.co.nz. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ validate-0.24.0/LICENSE000066400000000000000000000261361457312750000144070ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. validate-0.24.0/README.md000066400000000000000000000035601457312750000146550ustar00rootroot00000000000000# Validation helpers [![Build Status](https://github.com/go-openapi/validate/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/validate/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/validate/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/validate) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/validate/master/LICENSE) [![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/validate.svg)](https://pkg.go.dev/github.com/go-openapi/validate) [![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/validate)](https://goreportcard.com/report/github.com/go-openapi/validate) This package provides helpers to validate Swagger 2.0. specification (aka OpenAPI 2.0). Reference can be found here: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md. ## What's inside? * A validator for Swagger specifications * A validator for JSON schemas draft4 * Helper functions to validate individual values (used by code generated by [go-swagger](https://github.com/go-swagger/go-swagger)). * Required, RequiredNumber, RequiredString * ReadOnly * UniqueItems, MaxItems, MinItems * Enum, EnumCase * Pattern, MinLength, MaxLength * Minimum, Maximum, MultipleOf * FormatOf [Documentation](https://pkg.go.dev/github.com/go-openapi/validate) ## FAQ * Does this library support OpenAPI 3? > No. > This package currently only supports OpenAPI 2.0 (aka Swagger 2.0). > There is no plan to make it evolve toward supporting OpenAPI 3.x. > This [discussion thread](https://github.com/go-openapi/spec/issues/21) relates the full story. > > An early attempt to support Swagger 3 may be found at: https://github.com/go-openapi/spec3 validate-0.24.0/benchmark_test.go000066400000000000000000000013061457312750000167120ustar00rootroot00000000000000package validate import ( "path/filepath" "testing" "github.com/go-openapi/loads" "github.com/go-openapi/strfmt" "github.com/stretchr/testify/require" ) func Benchmark_KubernetesSpec(b *testing.B) { fp := filepath.Join("fixtures", "go-swagger", "canary", "kubernetes", "swagger.json") doc, err := loads.Spec(fp) require.NoError(b, err) require.NotNil(b, doc) b.Run("validating kubernetes API", func(b *testing.B) { b.ResetTimer() b.ReportAllocs() for i := 0; i < b.N; i++ { validator := NewSpecValidator(doc.Schema(), strfmt.Default) validator.Options.SkipSchemataResult = true res, _ := validator.Validate(doc) if res == nil || !res.IsValid() { b.FailNow() } } }) } validate-0.24.0/context.go000066400000000000000000000026201457312750000154050ustar00rootroot00000000000000package validate import ( "context" ) // validateCtxKey is the key type of context key in this pkg type validateCtxKey string const ( operationTypeKey validateCtxKey = "operationTypeKey" ) type operationType string const ( request operationType = "request" response operationType = "response" none operationType = "none" // not specified in ctx ) var operationTypeEnum = []operationType{request, response, none} // WithOperationRequest returns a new context with operationType request // in context value func WithOperationRequest(ctx context.Context) context.Context { return withOperation(ctx, request) } // WithOperationRequest returns a new context with operationType response // in context value func WithOperationResponse(ctx context.Context) context.Context { return withOperation(ctx, response) } func withOperation(ctx context.Context, operation operationType) context.Context { return context.WithValue(ctx, operationTypeKey, operation) } // extractOperationType extracts the operation type from ctx // if not specified or of unknown value, return none operation type func extractOperationType(ctx context.Context) operationType { v := ctx.Value(operationTypeKey) if v == nil { return none } res, ok := v.(operationType) if !ok { return none } // validate the value is in operation enum if err := Enum("", "", res, operationTypeEnum); err != nil { return none } return res } validate-0.24.0/context_test.go000066400000000000000000000022231457312750000164430ustar00rootroot00000000000000package validate import ( "context" "fmt" "testing" "github.com/stretchr/testify/assert" ) func TestContext_ExtractOperationType(t *testing.T) { var testCases = []struct { Ctx context.Context //nolint: containedctx ExpectedOpType operationType }{ { Ctx: WithOperationRequest(context.Background()), ExpectedOpType: request, }, { Ctx: WithOperationResponse(context.Background()), ExpectedOpType: response, }, { Ctx: context.Background(), ExpectedOpType: none, }, { Ctx: context.WithValue(context.Background(), validateCtxKey("dummy"), "dummy val"), ExpectedOpType: none, }, { Ctx: context.WithValue(context.Background(), operationTypeKey, "dummy val"), ExpectedOpType: none, }, { Ctx: context.WithValue(context.Background(), operationTypeKey, operationType("dummy val")), ExpectedOpType: none, }, } for idx, toPin := range testCases { tc := toPin t.Run(fmt.Sprintf("TestCase #%d", idx), func(t *testing.T) { t.Parallel() op := extractOperationType(tc.Ctx) assert.Equal(t, tc.ExpectedOpType, op) }) } } validate-0.24.0/debug.go000066400000000000000000000024651457312750000150160ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "fmt" "log" "os" "path/filepath" "runtime" ) var ( // Debug is true when the SWAGGER_DEBUG env var is not empty. // It enables a more verbose logging of validators. Debug = os.Getenv("SWAGGER_DEBUG") != "" // validateLogger is a debug logger for this package validateLogger *log.Logger ) func init() { debugOptions() } func debugOptions() { validateLogger = log.New(os.Stdout, "validate:", log.LstdFlags) } func debugLog(msg string, args ...interface{}) { // A private, trivial trace logger, based on go-openapi/spec/expander.go:debugLog() if Debug { _, file1, pos1, _ := runtime.Caller(1) validateLogger.Printf("%s:%d: %s", filepath.Base(file1), pos1, fmt.Sprintf(msg, args...)) } } validate-0.24.0/debug_test.go000066400000000000000000000025351457312750000160530ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "os" "sync" "testing" "github.com/stretchr/testify/assert" ) var ( logMutex = &sync.Mutex{} ) func TestDebug(t *testing.T) { if !enableLongTests { skipNotify(t) t.SkipNow() } tmpFile, _ := os.CreateTemp("", "debug-test") tmpName := tmpFile.Name() defer func() { Debug = false // mutex for -race logMutex.Unlock() os.Remove(tmpName) }() // mutex for -race logMutex.Lock() Debug = true debugOptions() defer func() { validateLogger.SetOutput(os.Stdout) }() validateLogger.SetOutput(tmpFile) debugLog("A debug") Debug = false tmpFile.Close() flushed, _ := os.Open(tmpName) buf := make([]byte, 500) _, _ = flushed.Read(buf) validateLogger.SetOutput(os.Stdout) assert.Contains(t, string(buf), "A debug") } validate-0.24.0/default_validator.go000066400000000000000000000237571457312750000174300ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "fmt" "strings" "github.com/go-openapi/spec" ) // defaultValidator validates default values in a spec. // According to Swagger spec, default values MUST validate their schema. type defaultValidator struct { SpecValidator *SpecValidator visitedSchemas map[string]struct{} schemaOptions *SchemaValidatorOptions } // resetVisited resets the internal state of visited schemas func (d *defaultValidator) resetVisited() { if d.visitedSchemas == nil { d.visitedSchemas = make(map[string]struct{}) return } // TODO(go1.21): clear(ex.visitedSchemas) for k := range d.visitedSchemas { delete(d.visitedSchemas, k) } } func isVisited(path string, visitedSchemas map[string]struct{}) bool { _, found := visitedSchemas[path] if found { return true } // search for overlapping paths var ( parent string suffix string ) for i := len(path) - 2; i >= 0; i-- { r := path[i] if r != '.' { continue } parent = path[0:i] suffix = path[i+1:] if strings.HasSuffix(parent, suffix) { return true } } return false } // beingVisited asserts a schema is being visited func (d *defaultValidator) beingVisited(path string) { d.visitedSchemas[path] = struct{}{} } // isVisited tells if a path has already been visited func (d *defaultValidator) isVisited(path string) bool { return isVisited(path, d.visitedSchemas) } // Validate validates the default values declared in the swagger spec func (d *defaultValidator) Validate() *Result { errs := pools.poolOfResults.BorrowResult() // will redeem when merged if d == nil || d.SpecValidator == nil { return errs } d.resetVisited() errs.Merge(d.validateDefaultValueValidAgainstSchema()) // error - return errs } func (d *defaultValidator) validateDefaultValueValidAgainstSchema() *Result { // every default value that is specified must validate against the schema for that property // headers, items, parameters, schema res := pools.poolOfResults.BorrowResult() // will redeem when merged s := d.SpecValidator for method, pathItem := range s.expandedAnalyzer().Operations() { for path, op := range pathItem { // parameters for _, param := range paramHelp.safeExpandedParamsFor(path, method, op.ID, res, s) { if param.Default != nil && param.Required { res.AddWarnings(requiredHasDefaultMsg(param.Name, param.In)) } // reset explored schemas to get depth-first recursive-proof exploration d.resetVisited() // Check simple parameters first // default values provided must validate against their inline definition (no explicit schema) if param.Default != nil && param.Schema == nil { // check param default value is valid red := newParamValidator(¶m, s.KnownFormats, d.schemaOptions).Validate(param.Default) //#nosec if red.HasErrorsOrWarnings() { res.AddErrors(defaultValueDoesNotValidateMsg(param.Name, param.In)) res.Merge(red) } else if red.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(red) } } // Recursively follows Items and Schemas if param.Items != nil { red := d.validateDefaultValueItemsAgainstSchema(param.Name, param.In, ¶m, param.Items) //#nosec if red.HasErrorsOrWarnings() { res.AddErrors(defaultValueItemsDoesNotValidateMsg(param.Name, param.In)) res.Merge(red) } else if red.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(red) } } if param.Schema != nil { // Validate default value against schema red := d.validateDefaultValueSchemaAgainstSchema(param.Name, param.In, param.Schema) if red.HasErrorsOrWarnings() { res.AddErrors(defaultValueDoesNotValidateMsg(param.Name, param.In)) res.Merge(red) } else if red.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(red) } } } if op.Responses != nil { if op.Responses.Default != nil { // Same constraint on default Response res.Merge(d.validateDefaultInResponse(op.Responses.Default, jsonDefault, path, 0, op.ID)) } // Same constraint on regular Responses if op.Responses.StatusCodeResponses != nil { // Safeguard for code, r := range op.Responses.StatusCodeResponses { res.Merge(d.validateDefaultInResponse(&r, "response", path, code, op.ID)) //#nosec } } } else if op.ID != "" { // Empty op.ID means there is no meaningful operation: no need to report a specific message res.AddErrors(noValidResponseMsg(op.ID)) } } } if s.spec.Spec().Definitions != nil { // Safeguard // reset explored schemas to get depth-first recursive-proof exploration d.resetVisited() for nm, sch := range s.spec.Spec().Definitions { res.Merge(d.validateDefaultValueSchemaAgainstSchema("definitions."+nm, "body", &sch)) //#nosec } } return res } func (d *defaultValidator) validateDefaultInResponse(resp *spec.Response, responseType, path string, responseCode int, operationID string) *Result { s := d.SpecValidator response, res := responseHelp.expandResponseRef(resp, path, s) if !res.IsValid() { return res } responseName, responseCodeAsStr := responseHelp.responseMsgVariants(responseType, responseCode) if response.Headers != nil { // Safeguard for nm, h := range response.Headers { // reset explored schemas to get depth-first recursive-proof exploration d.resetVisited() if h.Default != nil { red := newHeaderValidator(nm, &h, s.KnownFormats, d.schemaOptions).Validate(h.Default) //#nosec if red.HasErrorsOrWarnings() { res.AddErrors(defaultValueHeaderDoesNotValidateMsg(operationID, nm, responseName)) res.Merge(red) } else if red.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(red) } } // Headers have inline definition, like params if h.Items != nil { red := d.validateDefaultValueItemsAgainstSchema(nm, "header", &h, h.Items) //#nosec if red.HasErrorsOrWarnings() { res.AddErrors(defaultValueHeaderItemsDoesNotValidateMsg(operationID, nm, responseName)) res.Merge(red) } else if red.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(red) } } if _, err := compileRegexp(h.Pattern); err != nil { res.AddErrors(invalidPatternInHeaderMsg(operationID, nm, responseName, h.Pattern, err)) } // Headers don't have schema } } if response.Schema != nil { // reset explored schemas to get depth-first recursive-proof exploration d.resetVisited() red := d.validateDefaultValueSchemaAgainstSchema(responseCodeAsStr, "response", response.Schema) if red.HasErrorsOrWarnings() { // Additional message to make sure the context of the error is not lost res.AddErrors(defaultValueInDoesNotValidateMsg(operationID, responseName)) res.Merge(red) } else if red.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(red) } } return res } func (d *defaultValidator) validateDefaultValueSchemaAgainstSchema(path, in string, schema *spec.Schema) *Result { if schema == nil || d.isVisited(path) { // Avoids recursing if we are already done with that check return nil } d.beingVisited(path) res := pools.poolOfResults.BorrowResult() s := d.SpecValidator if schema.Default != nil { res.Merge( newSchemaValidator(schema, s.spec.Spec(), path+".default", s.KnownFormats, d.schemaOptions).Validate(schema.Default), ) } if schema.Items != nil { if schema.Items.Schema != nil { res.Merge(d.validateDefaultValueSchemaAgainstSchema(path+".items.default", in, schema.Items.Schema)) } // Multiple schemas in items if schema.Items.Schemas != nil { // Safeguard for i, sch := range schema.Items.Schemas { res.Merge(d.validateDefaultValueSchemaAgainstSchema(fmt.Sprintf("%s.items[%d].default", path, i), in, &sch)) //#nosec } } } if _, err := compileRegexp(schema.Pattern); err != nil { res.AddErrors(invalidPatternInMsg(path, in, schema.Pattern)) } if schema.AdditionalItems != nil && schema.AdditionalItems.Schema != nil { // NOTE: we keep validating values, even though additionalItems is not supported by Swagger 2.0 (and 3.0 as well) res.Merge(d.validateDefaultValueSchemaAgainstSchema(path+".additionalItems", in, schema.AdditionalItems.Schema)) } for propName, prop := range schema.Properties { res.Merge(d.validateDefaultValueSchemaAgainstSchema(path+"."+propName, in, &prop)) //#nosec } for propName, prop := range schema.PatternProperties { res.Merge(d.validateDefaultValueSchemaAgainstSchema(path+"."+propName, in, &prop)) //#nosec } if schema.AdditionalProperties != nil && schema.AdditionalProperties.Schema != nil { res.Merge(d.validateDefaultValueSchemaAgainstSchema(path+".additionalProperties", in, schema.AdditionalProperties.Schema)) } if schema.AllOf != nil { for i, aoSch := range schema.AllOf { res.Merge(d.validateDefaultValueSchemaAgainstSchema(fmt.Sprintf("%s.allOf[%d]", path, i), in, &aoSch)) //#nosec } } return res } // TODO: Temporary duplicated code. Need to refactor with examples func (d *defaultValidator) validateDefaultValueItemsAgainstSchema(path, in string, root interface{}, items *spec.Items) *Result { res := pools.poolOfResults.BorrowResult() s := d.SpecValidator if items != nil { if items.Default != nil { res.Merge( newItemsValidator(path, in, items, root, s.KnownFormats, d.schemaOptions).Validate(0, items.Default), ) } if items.Items != nil { res.Merge(d.validateDefaultValueItemsAgainstSchema(path+"[0].default", in, root, items.Items)) } if _, err := compileRegexp(items.Pattern); err != nil { res.AddErrors(invalidPatternInMsg(path, in, items.Pattern)) } } return res } validate-0.24.0/default_validator_test.go000066400000000000000000000073051457312750000204560ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "path/filepath" "testing" "github.com/go-openapi/analysis" "github.com/go-openapi/loads" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) const ( jsonExt = ".json" hasErrorMsg = " should have errors" noErrorMsg = " should not have errors" hasWarningMsg = " should have warnings" ) func TestDefault_ValidatePetStore(t *testing.T) { doc, _ := loads.Analyzed(PetStoreJSONMessage, "") validator := NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc validator.analyzer = analysis.New(doc.Spec()) myDefaultValidator := &defaultValidator{SpecValidator: validator} res := myDefaultValidator.Validate() assert.Empty(t, res.Errors) } func makeSpecValidator(t *testing.T, fp string) *SpecValidator { doc, err := loads.Spec(fp) require.NoError(t, err) validator := NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc validator.analyzer = analysis.New(doc.Spec()) return validator } func TestDefault_ValidateDefaults(t *testing.T) { tests := []string{ "parameter", "parameter-required", "parameter-ref", "parameter-items", "header", "header-items", "schema", "schema-ref", "schema-additionalProperties", "schema-patternProperties", "schema-items", "schema-allOf", "parameter-schema", "default-response", "header-response", "header-items-default-response", "header-items-response", "header-pattern", "header-badpattern", "schema-items-allOf", "response-ref", } for _, tt := range tests { path := filepath.Join("fixtures", "validation", "default", "valid-default-value-"+tt+jsonExt) if DebugTest { t.Logf("Testing valid default values for: %s", path) } validator := makeSpecValidator(t, path) myDefaultValidator := &defaultValidator{SpecValidator: validator} res := myDefaultValidator.Validate() assert.Empty(t, res.Errors, tt+noErrorMsg) // Special case: warning only if tt == "parameter-required" { warns := verifiedTestWarnings(res) assert.Contains(t, warns, "limit in query has a default value and is required as parameter") } path = filepath.Join("fixtures", "validation", "default", "invalid-default-value-"+tt+jsonExt) if DebugTest { t.Logf("Testing invalid default values for: %s", path) } validator = makeSpecValidator(t, path) myDefaultValidator = &defaultValidator{SpecValidator: validator} res = myDefaultValidator.Validate() assert.NotEmpty(t, res.Errors, tt+hasErrorMsg) // Update: now we have an additional message to explain it's all about a default value // Example: // - default value for limit in query does not validate its Schema // - limit in query must be of type integer: "string"] assert.NotEmptyf(t, res.Errors, tt+" should have at least 1 error") } } func TestDefault_EdgeCase(t *testing.T) { // Testing guards var myDefaultvalidator *defaultValidator res := myDefaultvalidator.Validate() assert.True(t, res.IsValid()) myDefaultvalidator = &defaultValidator{} res = myDefaultvalidator.Validate() assert.True(t, res.IsValid()) } validate-0.24.0/doc.go000066400000000000000000000075401457312750000144740ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /* Package validate provides methods to validate a swagger specification, as well as tools to validate data against their schema. This package follows Swagger 2.0. specification (aka OpenAPI 2.0). Reference can be found here: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md. # Validating a specification Validates a spec document (from JSON or YAML) against the JSON schema for swagger, then checks a number of extra rules that can't be expressed in JSON schema. Entry points: - Spec() - NewSpecValidator() - SpecValidator.Validate() Reported as errors: [x] definition can't declare a property that's already defined by one of its ancestors [x] definition's ancestor can't be a descendant of the same model [x] path uniqueness: each api path should be non-verbatim (account for path param names) unique per method. Validation can be laxed by disabling StrictPathParamUniqueness. [x] each security reference should contain only unique scopes [x] each security scope in a security definition should be unique [x] parameters in path must be unique [x] each path parameter must correspond to a parameter placeholder and vice versa [x] each referenceable definition must have references [x] each definition property listed in the required array must be defined in the properties of the model [x] each parameter should have a unique `name` and `type` combination [x] each operation should have only 1 parameter of type body [x] each reference must point to a valid object [x] every default value that is specified must validate against the schema for that property [x] items property is required for all schemas/definitions of type `array` [x] path parameters must be declared a required [x] headers must not contain $ref [x] schema and property examples provided must validate against their respective object's schema [x] examples provided must validate their schema Reported as warnings: [x] path parameters should not contain any of [{,},\w] [x] empty path [x] unused definitions [x] unsupported validation of examples on non-JSON media types [x] examples in response without schema [x] readOnly properties should not be required # Validating a schema The schema validation toolkit validates data against JSON-schema-draft 04 schema. It is tested against the full json-schema-testing-suite (https://github.com/json-schema-org/JSON-Schema-Test-Suite), except for the optional part (bignum, ECMA regexp, ...). It supports the complete JSON-schema vocabulary, including keywords not supported by Swagger (e.g. additionalItems, ...) Entry points: - AgainstSchema() - ... # Known limitations With the current version of this package, the following aspects of swagger are not yet supported: [ ] errors and warnings are not reported with key/line number in spec [ ] default values and examples on responses only support application/json producer type [ ] invalid numeric constraints (such as Minimum, etc..) are not checked except for default and example values [ ] rules for collectionFormat are not implemented [ ] no validation rule for polymorphism support (discriminator) [not done here] [ ] valid js ECMA regexp not supported by Go regexp engine are considered invalid [ ] arbitrary large numbers are not supported: max is math.MaxFloat64 */ package validate validate-0.24.0/doc_test.go000066400000000000000000000140551457312750000155320ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate_test import ( "encoding/json" "fmt" "os" "path/filepath" "testing" "github.com/go-openapi/loads" // Spec loading "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" // OpenAPI format extensions "github.com/go-openapi/validate" // This package "github.com/stretchr/testify/require" ) func ExampleSpec() { // Example with high level spec validation call, without showing warnings // Example with spec file in this repo: path := "fixtures/validation/valid-ref.json" doc, err := loads.Spec(path) if err == nil { validate.SetContinueOnErrors(true) // Set global options errs := validate.Spec(doc, strfmt.Default) // Validates spec with default Swagger 2.0 format definitions if errs == nil { fmt.Println("This spec is valid") } else { fmt.Printf("This spec has some validation errors: %v\n", errs) } } else { fmt.Println("Could not load this spec") } // Output: This spec is valid } func ExampleSpec_second() { // Example with high level spec validation call, without showing warnings // Example with online spec URL: url := "http://petstore.swagger.io/v2/swagger.json" doc, err := loads.JSONSpec(url) if err == nil { validate.SetContinueOnErrors(true) // Set global options errs := validate.Spec(doc, strfmt.Default) // Validates spec with default Swagger 2.0 format definitions if errs == nil { fmt.Println("This spec is valid") } else { fmt.Printf("This spec has some validation errors: %v\n", errs) } } else { fmt.Println("Could not load this spec:", err) } // Output: // This spec is valid } func ExampleSpecValidator_Validate() { // Example of spec validation call with full result // Example with online spec URL: // url := "http://petstore.swagger.io/v2/swagger.json" // doc, err := loads.JSONSpec(url) // Example with spec file in this repo: path := "fixtures/validation/valid-ref.json" doc, err := loads.Spec(path) if err == nil { validator := validate.NewSpecValidator(doc.Schema(), strfmt.Default) validator.SetContinueOnErrors(true) // Set option for this validator result, _ := validator.Validate(doc) // Validates spec with default Swagger 2.0 format definitions if result.IsValid() { fmt.Println("This spec is valid") } else { fmt.Println("This spec has some validation errors") } if result.HasWarnings() { fmt.Println("This spec has some validation warnings") } } // Output: // This spec is valid // This spec has some validation warnings } func ExampleSpecValidator_Validate_url() { // Example of spec validation call with full result // Example with online spec URL: url := "http://petstore.swagger.io/v2/swagger.json" doc, err := loads.JSONSpec(url) if err == nil { validator := validate.NewSpecValidator(doc.Schema(), strfmt.Default) validator.SetContinueOnErrors(true) // Set option for this validator result, _ := validator.Validate(doc) // Validates spec with default Swagger 2.0 format definitions if result.IsValid() { fmt.Println("This spec is valid") } else { fmt.Println("This spec has some validation errors") } if result.HasWarnings() { fmt.Println("This spec has some validation warnings") } } // Output: // This spec is valid } func ExampleAgainstSchema() { // Example using encoding/json as unmarshaller var schemaJSON = ` { "properties": { "name": { "type": "string", "pattern": "^[A-Za-z]+$", "minLength": 1 } }, "patternProperties": { "address-[0-9]+": { "type": "string", "pattern": "^[\\s|a-z]+$" } }, "required": [ "name" ], "additionalProperties": false }` schema := new(spec.Schema) _ = json.Unmarshal([]byte(schemaJSON), schema) input := map[string]interface{}{} // JSON data to validate inputJSON := `{"name": "Ivan","address-1": "sesame street"}` _ = json.Unmarshal([]byte(inputJSON), &input) // strfmt.Default is the registry of recognized formats err := validate.AgainstSchema(schema, input, strfmt.Default) if err != nil { fmt.Printf("JSON does not validate against schema: %v", err) } else { fmt.Printf("OK") } // Output: // OK } func TestValidate_Issue112(t *testing.T) { t.Run("returns no error on body includes `items` key", func(t *testing.T) { body := map[string]interface{}{"items1": nil} err := validate.AgainstSchema(getSimpleSchema(), body, strfmt.Default) require.NoError(t, err) }) t.Run("returns no error when body includes `items` key", func(t *testing.T) { body := map[string]interface{}{"items": nil} err := validate.AgainstSchema(getSimpleSchema(), body, strfmt.Default) require.NoError(t, err) }) } func getSimpleSchema() *spec.Schema { return &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: spec.StringOrArray{"object"}, }, } } func Test_Issue102_Circular(t *testing.T) { // assert that the issue is fixed in go-openapi/spec for _, fixture := range []string{ filepath.Join("fixtures", "bugs", "102", "fixture-102.json"), filepath.Join("fixtures", "bugs", "123-validate", "fixture-123.json"), } { t.Run(fixture, func(t *testing.T) { filebytes, err := os.ReadFile(fixture) require.NoError(t, err) openAPIv2Doc := json.RawMessage(filebytes) doc, err := loads.Analyzed(openAPIv2Doc, "") require.NoError(t, err) validator := validate.NewSpecValidator(doc.Schema(), strfmt.Default) validator.SetContinueOnErrors(true) res, _ := validator.Validate(doc) require.Emptyf(t, res.Errors, "unexpected validation erorrs: %v", res.Errors) }) } } validate-0.24.0/example_validator.go000066400000000000000000000244421457312750000174270ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "fmt" "github.com/go-openapi/spec" ) // ExampleValidator validates example values defined in a spec type exampleValidator struct { SpecValidator *SpecValidator visitedSchemas map[string]struct{} schemaOptions *SchemaValidatorOptions } // resetVisited resets the internal state of visited schemas func (ex *exampleValidator) resetVisited() { if ex.visitedSchemas == nil { ex.visitedSchemas = make(map[string]struct{}) return } // TODO(go1.21): clear(ex.visitedSchemas) for k := range ex.visitedSchemas { delete(ex.visitedSchemas, k) } } // beingVisited asserts a schema is being visited func (ex *exampleValidator) beingVisited(path string) { ex.visitedSchemas[path] = struct{}{} } // isVisited tells if a path has already been visited func (ex *exampleValidator) isVisited(path string) bool { return isVisited(path, ex.visitedSchemas) } // Validate validates the example values declared in the swagger spec // Example values MUST conform to their schema. // // With Swagger 2.0, examples are supported in: // - schemas // - individual property // - responses func (ex *exampleValidator) Validate() *Result { errs := pools.poolOfResults.BorrowResult() if ex == nil || ex.SpecValidator == nil { return errs } ex.resetVisited() errs.Merge(ex.validateExampleValueValidAgainstSchema()) // error - return errs } func (ex *exampleValidator) validateExampleValueValidAgainstSchema() *Result { // every example value that is specified must validate against the schema for that property // in: schemas, properties, object, items // not in: headers, parameters without schema res := pools.poolOfResults.BorrowResult() s := ex.SpecValidator for method, pathItem := range s.expandedAnalyzer().Operations() { for path, op := range pathItem { // parameters for _, param := range paramHelp.safeExpandedParamsFor(path, method, op.ID, res, s) { // As of swagger 2.0, Examples are not supported in simple parameters // However, it looks like it is supported by go-openapi // reset explored schemas to get depth-first recursive-proof exploration ex.resetVisited() // Check simple parameters first // default values provided must validate against their inline definition (no explicit schema) if param.Example != nil && param.Schema == nil { // check param default value is valid red := newParamValidator(¶m, s.KnownFormats, ex.schemaOptions).Validate(param.Example) //#nosec if red.HasErrorsOrWarnings() { res.AddWarnings(exampleValueDoesNotValidateMsg(param.Name, param.In)) res.MergeAsWarnings(red) } else if red.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(red) } } // Recursively follows Items and Schemas if param.Items != nil { red := ex.validateExampleValueItemsAgainstSchema(param.Name, param.In, ¶m, param.Items) //#nosec if red.HasErrorsOrWarnings() { res.AddWarnings(exampleValueItemsDoesNotValidateMsg(param.Name, param.In)) res.Merge(red) } else if red.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(red) } } if param.Schema != nil { // Validate example value against schema red := ex.validateExampleValueSchemaAgainstSchema(param.Name, param.In, param.Schema) if red.HasErrorsOrWarnings() { res.AddWarnings(exampleValueDoesNotValidateMsg(param.Name, param.In)) res.Merge(red) } else if red.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(red) } } } if op.Responses != nil { if op.Responses.Default != nil { // Same constraint on default Response res.Merge(ex.validateExampleInResponse(op.Responses.Default, jsonDefault, path, 0, op.ID)) } // Same constraint on regular Responses if op.Responses.StatusCodeResponses != nil { // Safeguard for code, r := range op.Responses.StatusCodeResponses { res.Merge(ex.validateExampleInResponse(&r, "response", path, code, op.ID)) //#nosec } } } else if op.ID != "" { // Empty op.ID means there is no meaningful operation: no need to report a specific message res.AddErrors(noValidResponseMsg(op.ID)) } } } if s.spec.Spec().Definitions != nil { // Safeguard // reset explored schemas to get depth-first recursive-proof exploration ex.resetVisited() for nm, sch := range s.spec.Spec().Definitions { res.Merge(ex.validateExampleValueSchemaAgainstSchema("definitions."+nm, "body", &sch)) //#nosec } } return res } func (ex *exampleValidator) validateExampleInResponse(resp *spec.Response, responseType, path string, responseCode int, operationID string) *Result { s := ex.SpecValidator response, res := responseHelp.expandResponseRef(resp, path, s) if !res.IsValid() { // Safeguard return res } responseName, responseCodeAsStr := responseHelp.responseMsgVariants(responseType, responseCode) if response.Headers != nil { // Safeguard for nm, h := range response.Headers { // reset explored schemas to get depth-first recursive-proof exploration ex.resetVisited() if h.Example != nil { red := newHeaderValidator(nm, &h, s.KnownFormats, ex.schemaOptions).Validate(h.Example) //#nosec if red.HasErrorsOrWarnings() { res.AddWarnings(exampleValueHeaderDoesNotValidateMsg(operationID, nm, responseName)) res.MergeAsWarnings(red) } else if red.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(red) } } // Headers have inline definition, like params if h.Items != nil { red := ex.validateExampleValueItemsAgainstSchema(nm, "header", &h, h.Items) //#nosec if red.HasErrorsOrWarnings() { res.AddWarnings(exampleValueHeaderItemsDoesNotValidateMsg(operationID, nm, responseName)) res.MergeAsWarnings(red) } else if red.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(red) } } if _, err := compileRegexp(h.Pattern); err != nil { res.AddErrors(invalidPatternInHeaderMsg(operationID, nm, responseName, h.Pattern, err)) } // Headers don't have schema } } if response.Schema != nil { // reset explored schemas to get depth-first recursive-proof exploration ex.resetVisited() red := ex.validateExampleValueSchemaAgainstSchema(responseCodeAsStr, "response", response.Schema) if red.HasErrorsOrWarnings() { // Additional message to make sure the context of the error is not lost res.AddWarnings(exampleValueInDoesNotValidateMsg(operationID, responseName)) res.Merge(red) } else if red.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(red) } } if response.Examples != nil { if response.Schema != nil { if example, ok := response.Examples["application/json"]; ok { res.MergeAsWarnings( newSchemaValidator(response.Schema, s.spec.Spec(), path+".examples", s.KnownFormats, s.schemaOptions).Validate(example), ) } else { // TODO: validate other media types too res.AddWarnings(examplesMimeNotSupportedMsg(operationID, responseName)) } } else { res.AddWarnings(examplesWithoutSchemaMsg(operationID, responseName)) } } return res } func (ex *exampleValidator) validateExampleValueSchemaAgainstSchema(path, in string, schema *spec.Schema) *Result { if schema == nil || ex.isVisited(path) { // Avoids recursing if we are already done with that check return nil } ex.beingVisited(path) s := ex.SpecValidator res := pools.poolOfResults.BorrowResult() if schema.Example != nil { res.MergeAsWarnings( newSchemaValidator(schema, s.spec.Spec(), path+".example", s.KnownFormats, ex.schemaOptions).Validate(schema.Example), ) } if schema.Items != nil { if schema.Items.Schema != nil { res.Merge(ex.validateExampleValueSchemaAgainstSchema(path+".items.example", in, schema.Items.Schema)) } // Multiple schemas in items if schema.Items.Schemas != nil { // Safeguard for i, sch := range schema.Items.Schemas { res.Merge(ex.validateExampleValueSchemaAgainstSchema(fmt.Sprintf("%s.items[%d].example", path, i), in, &sch)) //#nosec } } } if _, err := compileRegexp(schema.Pattern); err != nil { res.AddErrors(invalidPatternInMsg(path, in, schema.Pattern)) } if schema.AdditionalItems != nil && schema.AdditionalItems.Schema != nil { // NOTE: we keep validating values, even though additionalItems is unsupported in Swagger 2.0 (and 3.0 as well) res.Merge(ex.validateExampleValueSchemaAgainstSchema(path+".additionalItems", in, schema.AdditionalItems.Schema)) } for propName, prop := range schema.Properties { res.Merge(ex.validateExampleValueSchemaAgainstSchema(path+"."+propName, in, &prop)) //#nosec } for propName, prop := range schema.PatternProperties { res.Merge(ex.validateExampleValueSchemaAgainstSchema(path+"."+propName, in, &prop)) //#nosec } if schema.AdditionalProperties != nil && schema.AdditionalProperties.Schema != nil { res.Merge(ex.validateExampleValueSchemaAgainstSchema(path+".additionalProperties", in, schema.AdditionalProperties.Schema)) } if schema.AllOf != nil { for i, aoSch := range schema.AllOf { res.Merge(ex.validateExampleValueSchemaAgainstSchema(fmt.Sprintf("%s.allOf[%d]", path, i), in, &aoSch)) //#nosec } } return res } // TODO: Temporary duplicated code. Need to refactor with examples // func (ex *exampleValidator) validateExampleValueItemsAgainstSchema(path, in string, root interface{}, items *spec.Items) *Result { res := pools.poolOfResults.BorrowResult() s := ex.SpecValidator if items != nil { if items.Example != nil { res.MergeAsWarnings( newItemsValidator(path, in, items, root, s.KnownFormats, ex.schemaOptions).Validate(0, items.Example), ) } if items.Items != nil { res.Merge(ex.validateExampleValueItemsAgainstSchema(path+"[0].example", in, root, items.Items)) } if _, err := compileRegexp(items.Pattern); err != nil { res.AddErrors(invalidPatternInMsg(path, in, items.Pattern)) } } return res } validate-0.24.0/example_validator_test.go000066400000000000000000000071001457312750000204560ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "path/filepath" "testing" "github.com/go-openapi/analysis" "github.com/go-openapi/loads" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/stretchr/testify/assert" ) func TestExample_ValidateExamples(t *testing.T) { doc, _ := loads.Analyzed(PetStoreJSONMessage, "") validator := NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc validator.analyzer = analysis.New(doc.Spec()) myDefaultValidator := &defaultValidator{SpecValidator: validator} res := myDefaultValidator.Validate() assert.Empty(t, res.Errors) tests := []string{ // - $ref in response "response", "response-ref", "parameter", "parameter-required", "parameter-ref", "parameter-items", "header", "header-items", "schema", "schema-ref", "schema-additionalProperties", "schema-patternProperties", "schema-items", "schema-allOf", "parameter-schema", "default-response", "header-response", "header-items-default-response", "header-items-response", "header-pattern", "header-badpattern", "schema-items-allOf", } for _, tt := range tests { path := filepath.Join("fixtures", "validation", "example", "valid-example-"+tt+".json") if DebugTest { t.Logf("Testing valid example values for: %s", path) } validator := makeSpecValidator(t, path) myExampleValidator := &exampleValidator{SpecValidator: validator} res := myExampleValidator.Validate() assert.Empty(t, res.Errors, tt+noErrorMsg) /* // Special case: warning only if tt == "parameter-required" { assert.Contains(t, verifiedTestWarnings(res), "limit in query has an example value and is required as parameter") } */ debugTest(t, path, res) path = filepath.Join("fixtures", "validation", "example", "invalid-example-"+tt+".json") if DebugTest { t.Logf("Testing invalid example values for: %s", path) } validator = makeSpecValidator(t, path) myExampleValidator = &exampleValidator{SpecValidator: validator} res = myExampleValidator.Validate() switch tt { case "header-badpattern": // This fixture exhibits real errors besides example values assert.NotEmpty(t, res.Errors, tt+hasErrorMsg) assert.NotEmpty(t, res.Warnings, tt+hasWarningMsg) default: assert.Empty(t, res.Errors, tt+noErrorMsg) assert.NotEmpty(t, res.Warnings, tt+hasWarningMsg) } // Update: now we have an additional message to explain it's all about a default value // Example: // - default value for limit in query does not validate its Schema // - limit in query must be of type integer: "string"] assert.NotEmptyf(t, res.Warnings, tt+" should have at least 1 warning") debugTest(t, path, res) if DebugTest && t.Failed() { t.FailNow() } } } func TestExample_EdgeCase(t *testing.T) { // Testing guards var myExampleValidator *exampleValidator res := myExampleValidator.Validate() assert.True(t, res.IsValid()) myExampleValidator = &exampleValidator{} res = myExampleValidator.Validate() assert.True(t, res.IsValid()) } validate-0.24.0/fixtures/000077500000000000000000000000001457312750000152435ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/000077500000000000000000000000001457312750000162035ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/102/000077500000000000000000000000001457312750000165055ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/102/fixture-102.json000066400000000000000000000025031457312750000213660ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "My API", "version": "1.0.0", "title": "my api", "contact": { "email": "me@myorg.com" }, "license": { "name": "my org" } }, "host": "127.0.0.1", "basePath": "/", "tags": [], "schemes": [ "https" ], "paths": { "/api/v1/endpoint": { "post": { "summary": "my endpoint", "description": "Accessible to . ", "operationId": "ep1", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ ], "responses": { "200": { "description": "Operation successful", "schema": { "$ref": "#/definitions/Error" } } }, "security": [] } } }, "definitions": { "Error": { "type": "object", "properties": { "errorCode": { "type": "string", "format": "string" }, "errorMessage": { "type": "string", "format": "string" }, "warning": { "type": "string" }, "child-errors": { "type": "array", "items": { "$ref": "#/definitions/Error" } } } } } } validate-0.24.0/fixtures/bugs/123-validate/000077500000000000000000000000001457312750000202775ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/123-validate/fixture-123.json000066400000000000000000000016471457312750000231730ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "TestSwagger", "version": "1.0", "title": "Test" }, "host": "127.0.0.1:8443", "basePath": "/", "schemes": [ "https" ], "paths": { "/api/v1/getx": { "post": { "operationId": "getx", "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "200": { "description": "Operation successful", "schema": { "$ref": "#/definitions/MyObj" } } }, "security": [] } } }, "definitions": { "MyObj": { "type": "object", "properties": { "name": { "type": "string" }, "child-objects": { "type": "array", "items": { "$ref": "#/definitions/MyObj" } } } } } } validate-0.24.0/fixtures/bugs/123/000077500000000000000000000000001457312750000165105ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/123/swagger.yml000066400000000000000000000106561457312750000207020ustar00rootroot00000000000000--- swagger: '2.0' info: version: 0.1.0 title: 'AttendList' description: | AttendList service. contact: name: API Support url: http://attendlist.co/support email: contact@evecon.co consumes: - application/json produces: - application/json definitions: Service: description: Service information type: object properties: Name: type: string readOnly: true Build: type: string readOnly: true Versions: description: Representation of Version information type: object properties: Id: type: integer format: int64 readOnly: true Version: type: integer format: int64 readOnly: true Created: type: integer format: int64 readOnly: true Updated: type: integer format: int64 readOnly: true Deleted: type: boolean readOnly: true Dates: description: Representation of Date interval type: object properties: StartDate: type: string format: date-time EndDate: type: string format: date-time Location: description: Representation of lat-lon Location type: object properties: Latitude: type: number format: float Longitude: type: number format: float Event: description: Representation of an Event allOf: - $ref: '#/definitions/Versions' - $ref: '#/definitions/Dates' - $ref: '#/definitions/Location' - type: object properties: Name: type: string URL: type: string Notes: type: string Autosearch: type: boolean example: StartDate: "2015-11-01T12:00:00Z" EndDate: "2015-11-05T12:00:00Z" Latitude: 59.842609 Longitude: 30.319087 Name: "Bikers meeting" URL: "http://attendlist.co" Notes: "Yet another bikers meeting" Autosearch: false paths: /services: get: description: Get services information. tags: - services operationId: getServices responses: '200': description: Successful response schema: title: ArrayOfServices type: array items: $ref: '#/definitions/Service' default: description: Generic Error /events: get: description: Get events. tags: - events operationId: getEvents responses: '200': description: Successful response schema: title: ArrayOfEvents type: array items: $ref: '#/definitions/Event' default: description: Generic Error post: description: Create new event. tags: - events operationId: postEvent parameters: - name: Event in: body description: New events required: true schema: $ref: '#/definitions/Event' responses: '201': description: | Successful response. headers: 'Location': description: Contains link to the new Event resource type: string default: description: Generic Error /events/{id}: parameters: - name: id in: path description: Existing event id. required: true type: integer format: int64 get: description: Get event by id. tags: - events operationId: getEventById responses: '200': description: Successful response schema: title: Newly created event $ref: '#/definitions/Event' default: description: Generic Error put: description: Update existing event. tags: - events operationId: putEventById parameters: - name: Event in: body description: Existing event required: true schema: $ref: '#/definitions/Event' responses: '204': description: Successful response default: description: Generic Error delete: description: Delete event by id. tags: - events operationId: deleteEventById responses: '204': description: Successful response default: description: Generic Error validate-0.24.0/fixtures/bugs/1341/000077500000000000000000000000001457312750000165735ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/1341/fixture-1341-2.yaml000066400000000000000000000020201457312750000216640ustar00rootroot00000000000000swagger: '2.0' info: title: Title description: some description contact: name: John Doe url: https://www.acme.com/support email: support@acme.com version: "1.0.0" paths: /: get: responses: 200: description: Example path schema: $ref: '#/definitions/ExecuteValues' default: description: generic error schema: type: string definitions: ExecuteValues: type: object properties: Value: $ref: "#/definitions/ExecuteValue" Array: type: array items: $ref: "#/definitions/ExecuteValues" example: Array: - Array: - Value: Value: value ValueType: ExecuteValueString - Value: Value: true ValueType: ExecuteValueBoolean ExecuteValue: type: object discriminator: ValueType required: - ValueType #- Test properties: ValueType: type: string Test: type: string validate-0.24.0/fixtures/bugs/1341/fixture-1341-3.yaml000066400000000000000000000020511457312750000216710ustar00rootroot00000000000000swagger: '2.0' info: title: Title description: some description contact: name: John Doe url: https://www.acme.com/support email: support@acme.com version: "1.0.0" paths: /: get: responses: 200: description: Example path schema: # $ref: '#/definitions/ExecuteValues' type: string default: description: generic error schema: type: string definitions: ExecuteValues: type: object properties: Value: $ref: "#/definitions/ExecuteValue" Array: type: array items: $ref: "#/definitions/ExecuteValues" example: Array: - Array: - Value: Value: value ValueType: ExecuteValueString - Value: Value: true ValueType: ExecuteValueBoolean ExecuteValue: type: object discriminator: ValueType required: - ValueType - Test properties: ValueType: type: string Test: type: string validate-0.24.0/fixtures/bugs/1341/fixture-1341-4.yaml000066400000000000000000000020201457312750000216660ustar00rootroot00000000000000swagger: '2.0' info: title: Title description: some description contact: name: John Doe url: https://www.acme.com/support email: support@acme.com version: "1.0.0" paths: /: get: responses: 200: description: Example path schema: $ref: '#/definitions/ExecuteValues' default: description: generic error schema: type: string definitions: ExecuteValues: type: object properties: Value: $ref: "#/definitions/ExecuteValue" Array: type: array items: $ref: "#/definitions/ExecuteValues" default: Array: - Array: - Value: Value: value ValueType: ExecuteValueString - Value: Value: true ValueType: ExecuteValueBoolean ExecuteValue: type: object discriminator: ValueType required: - ValueType #- Test properties: ValueType: type: string Test: type: string validate-0.24.0/fixtures/bugs/1341/fixture-1341-5.yaml000066400000000000000000000023461457312750000217020ustar00rootroot00000000000000swagger: '2.0' info: title: Title description: some description contact: name: John Doe url: https://www.acme.com/support email: support@acme.com version: "1.0.0" paths: /: get: responses: 200: description: Example path schema: #$ref: '#/definitions/ExecuteValues' type: string default: description: generic error schema: type: string definitions: ExecuteValues: description: recursive definition type: object properties: Value: $ref: "#/definitions/ExecuteValue" Array: description: array definition type: array items: $ref: "#/definitions/ExecuteValues" default: Array: - Array: - Value: Value: value ValueType: ExecuteValueString - Value: Value: true ValueType: ExecuteValueBoolean ExecuteValue: description: non-recursive definition type: object discriminator: ValueType required: - ValueType - Test properties: ValueType: description: the type of the value type: string Test: description: a test type: string validate-0.24.0/fixtures/bugs/1341/fixture-1341-good.yaml000066400000000000000000000016771457312750000224740ustar00rootroot00000000000000swagger: '2.0' info: title: Title description: some description contact: name: John Doe url: https://www.acme.com/support email: support@acme.com version: "1.0.0" paths: /: get: responses: 200: description: Example path schema: type: string default: description: generic error schema: type: string definitions: ExecuteValues: type: object properties: Value: $ref: "#/definitions/ExecuteValue" Array: type: array items: $ref: "#/definitions/ExecuteValues" ExecuteValue: type: object discriminator: ValueType required: - ValueType properties: ValueType: type: string Test: type: string ExecutableValueString: allOf: - $ref: '#/definitions/ExecuteValue' - type: object properties: something: type: string validate-0.24.0/fixtures/bugs/1341/fixture-1341.yaml000066400000000000000000000020521457312750000215320ustar00rootroot00000000000000swagger: '2.0' info: title: Title description: some description contact: name: John Doe url: https://www.acme.com/support email: support@acme.com version: "1.0.0" paths: /: get: responses: 200: description: Example path schema: # $ref: '#/definitions/ExecuteValues' type: string default: description: generic error schema: type: string definitions: ExecuteValues: type: object properties: Value: $ref: "#/definitions/ExecuteValue" Array: type: array items: $ref: "#/definitions/ExecuteValues" example: Array: - Array: - Value: Value: value ValueType: ExecuteValueString - Value: Value: true ValueType: ExecuteValueBoolean ExecuteValue: type: object discriminator: ValueType required: - ValueType #- Test properties: ValueType: type: string Test: type: string validate-0.24.0/fixtures/bugs/1429/000077500000000000000000000000001457312750000166025ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/1429/expand-1429.yaml000066400000000000000000000017761457312750000213550ustar00rootroot00000000000000swagger: "2.0" info: title: Object version: 0.1.0 paths: /: get: summary: GET operationId: getAll responses: "200": description: Ok "400": description: Bad request schema: description: | Contains all the properties any error response from the API will contain. Some properties are optional so might be empty most of the time type: object required: - code - message properties: code: description: the error code, this is not necessarily the http status code type: integer format: int32 helpUrl: description: an optional url for getting more help about this error type: string format: uri message: description: a human readable version of the error type: string validate-0.24.0/fixtures/bugs/1429/flatten-1429.yaml000066400000000000000000000004361457312750000215230ustar00rootroot00000000000000swagger: "2.0" info: title: Object version: 0.1.0 paths: /: get: summary: GET operationId: getAll responses: "200": description: Ok "400": description: Bad request schema: $ref: '#/definitions/Error' validate-0.24.0/fixtures/bugs/1429/responses.yaml000066400000000000000000000016201457312750000215060ustar00rootroot00000000000000swagger: '2.0' info: title: Responses version: 0.1.0 definitions: Error: type: object description: | Contains all the properties any error response from the API will contain. Some properties are optional so might be empty most of the time required: - code - message properties: code: description: the error code, this is not necessarily the http status code type: integer format: int32 message: description: a human readable version of the error type: string helpUrl: description: an optional url for getting more help about this error type: string format: uri responses: BadRequest: description: Bad request schema: $ref: '#/definitions/Error' paths: /: get: summary: GET operationId: getAll responses: 200: description: Okvalidate-0.24.0/fixtures/bugs/1429/swagger.yaml000066400000000000000000000003661457312750000211320ustar00rootroot00000000000000swagger: '2.0' info: title: Object version: 0.1.0 paths: /: get: summary: GET operationId: getAll responses: 200: description: Ok 400: $ref: './responses.yaml#/responses/BadRequest'validate-0.24.0/fixtures/bugs/1614/000077500000000000000000000000001457312750000165765ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/1614/gitea-expanded.json000066400000000000000000023223731457312750000223640ustar00rootroot00000000000000{ "consumes": [ "application/json", "text/plain" ], "produces": [ "application/json", "text/html" ], "schemes": [ "http", "https" ], "swagger": "2.0", "info": { "description": "This documentation describes the Gitea API.", "title": "Gitea API.", "license": { "name": "MIT", "url": "http://opensource.org/licenses/MIT" }, "version": "1.1.1" }, "basePath": "/api/v1", "paths": { "/admin/users": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Create a user", "operationId": "adminCreateUser", "parameters": [ { "name": "body", "in": "body", "schema": { "description": "CreateUserOption create user options", "type": "object", "required": [ "username", "email", "password" ], "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "login_name": { "type": "string", "x-go-name": "LoginName" }, "password": { "type": "string", "x-go-name": "Password" }, "send_notify": { "type": "boolean", "x-go-name": "SendNotify" }, "source_id": { "type": "integer", "format": "int64", "x-go-name": "SourceID" }, "username": { "type": "string", "x-go-name": "Username" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "User", "schema": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "403": { "description": "APIForbiddenError is a forbidden error response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } }, "422": { "description": "APIValidationError is error format response related to input validation", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } } } }, "/admin/users/{username}": { "delete": { "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Delete a user", "operationId": "adminDeleteUser", "parameters": [ { "type": "string", "description": "username of user to delete", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" }, "403": { "description": "APIForbiddenError is a forbidden error response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } }, "422": { "description": "APIValidationError is error format response related to input validation", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Edit an existing user", "operationId": "adminEditUser", "parameters": [ { "type": "string", "description": "username of user to edit", "name": "username", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "EditUserOption edit user options", "type": "object", "required": [ "email" ], "properties": { "active": { "type": "boolean", "x-go-name": "Active" }, "admin": { "type": "boolean", "x-go-name": "Admin" }, "allow_git_hook": { "type": "boolean", "x-go-name": "AllowGitHook" }, "allow_import_local": { "type": "boolean", "x-go-name": "AllowImportLocal" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "location": { "type": "string", "x-go-name": "Location" }, "login_name": { "type": "string", "x-go-name": "LoginName" }, "max_repo_creation": { "type": "integer", "format": "int64", "x-go-name": "MaxRepoCreation" }, "password": { "type": "string", "x-go-name": "Password" }, "source_id": { "type": "integer", "format": "int64", "x-go-name": "SourceID" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "200": { "description": "User", "schema": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "403": { "description": "APIForbiddenError is a forbidden error response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } }, "422": { "description": "APIValidationError is error format response related to input validation", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } } } }, "/admin/users/{username}/keys": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Add a public key on behalf of a user", "operationId": "adminCreatePublicKey", "parameters": [ { "type": "string", "description": "username of the user", "name": "username", "in": "path", "required": true } ], "responses": { "201": { "description": "PublicKey", "schema": { "description": "PublicKey publickey is a user key to push code to repository", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "fingerprint": { "type": "string", "x-go-name": "Fingerprint" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "403": { "description": "APIForbiddenError is a forbidden error response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } }, "422": { "description": "APIValidationError is error format response related to input validation", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } } } }, "/admin/users/{username}/keys/{id}": { "delete": { "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Delete a user's public key", "operationId": "adminDeleteUserPublicKey", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true }, { "type": "integer", "description": "id of the key to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" }, "403": { "description": "APIForbiddenError is a forbidden error response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } }, "404": { "description": "APINotFound is a not found empty response" } } } }, "/admin/users/{username}/orgs": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Create an organization", "operationId": "adminCreateOrg", "parameters": [ { "type": "string", "description": "username of the user that will own the created organization", "name": "username", "in": "path", "required": true } ], "responses": { "201": { "description": "Organization", "schema": { "description": "Organization represents an organization", "type": "object", "properties": { "avatar_url": { "type": "string", "x-go-name": "AvatarURL" }, "description": { "type": "string", "x-go-name": "Description" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "location": { "type": "string", "x-go-name": "Location" }, "username": { "type": "string", "x-go-name": "UserName" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "403": { "description": "APIForbiddenError is a forbidden error response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } }, "422": { "description": "APIValidationError is error format response related to input validation", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } } } }, "/admin/users/{username}/repos": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Create a repository on behalf a user", "operationId": "adminCreateRepo", "parameters": [ { "type": "string", "description": "username of the user. This user will own the created repository", "name": "username", "in": "path", "required": true } ], "responses": { "201": { "description": "Repository", "schema": { "$ref": "#/definitions/Repository" } }, "403": { "description": "APIForbiddenError is a forbidden error response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } }, "422": { "description": "APIValidationError is error format response related to input validation", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } } } }, "/markdown": { "post": { "consumes": [ "application/json" ], "produces": [ "text/html" ], "tags": [ "miscellaneous" ], "summary": "Render a markdown document as HTML", "operationId": "renderMarkdown", "parameters": [ { "name": "body", "in": "body", "schema": { "description": "MarkdownOption markdown options", "type": "object", "properties": { "Context": { "description": "Context to render\n\nin: body", "type": "string" }, "Mode": { "description": "Mode to render\n\nin: body", "type": "string" }, "Text": { "description": "Text markdown to render\n\nin: body", "type": "string" }, "Wiki": { "description": "Is it a wiki page ?\n\nin: body", "type": "boolean" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "200": { "description": "MarkdownRender is a rendered markdown document" }, "422": { "description": "APIValidationError is error format response related to input validation", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } } } }, "/markdown/raw": { "post": { "consumes": [ "text/plain" ], "produces": [ "text/html" ], "tags": [ "miscellaneous" ], "summary": "Render raw markdown as HTML", "operationId": "renderMarkdownRaw", "parameters": [ { "description": "Request body to render", "name": "body", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "MarkdownRender is a rendered markdown document" }, "422": { "description": "APIValidationError is error format response related to input validation", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } } } }, "/org/{org}/repos": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Create a repository in an organization", "operationId": "createOrgRepo", "parameters": [ { "type": "string", "description": "name of organization", "name": "org", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "CreateRepoOption options when creating repository", "type": "object", "required": [ "name" ], "properties": { "auto_init": { "description": "Whether the repository should be auto-intialized?", "type": "boolean", "x-go-name": "AutoInit" }, "description": { "description": "Description of the repository to create", "type": "string", "x-go-name": "Description" }, "gitignores": { "description": "Gitignores to use", "type": "string", "x-go-name": "Gitignores" }, "license": { "description": "License to use", "type": "string", "x-go-name": "License" }, "name": { "description": "Name of the repository to create", "type": "string", "uniqueItems": true, "x-go-name": "Name" }, "private": { "description": "Whether the repository is private", "type": "boolean", "x-go-name": "Private" }, "readme": { "description": "Readme of the repository to create", "type": "string", "x-go-name": "Readme" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "Repository", "schema": { "$ref": "#/definitions/Repository" } }, "403": { "description": "APIForbiddenError is a forbidden error response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } }, "422": { "description": "APIValidationError is error format response related to input validation", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } } } }, "/orgs/{org}": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Get an organization", "operationId": "orgGet", "parameters": [ { "type": "string", "description": "name of the organization to get", "name": "org", "in": "path", "required": true } ], "responses": { "200": { "description": "Organization", "schema": { "description": "Organization represents an organization", "type": "object", "properties": { "avatar_url": { "type": "string", "x-go-name": "AvatarURL" }, "description": { "type": "string", "x-go-name": "Description" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "location": { "type": "string", "x-go-name": "Location" }, "username": { "type": "string", "x-go-name": "UserName" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Edit an organization", "operationId": "orgEdit", "parameters": [ { "type": "string", "description": "name of the organization to edit", "name": "org", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "EditOrgOption options for editing an organization", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "location": { "type": "string", "x-go-name": "Location" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "200": { "description": "Organization", "schema": { "description": "Organization represents an organization", "type": "object", "properties": { "avatar_url": { "type": "string", "x-go-name": "AvatarURL" }, "description": { "type": "string", "x-go-name": "Description" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "location": { "type": "string", "x-go-name": "Location" }, "username": { "type": "string", "x-go-name": "UserName" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/orgs/{org}/hooks": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List an organization's webhooks", "operationId": "orgListHooks", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true } ], "responses": { "200": { "description": "HookList", "schema": { "type": "array", "items": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/orgs/{org}/hooks/": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Create a hook", "operationId": "orgCreateHook", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true } ], "responses": { "201": { "description": "Hook", "schema": { "type": "array", "items": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/orgs/{org}/hooks/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Get a hook", "operationId": "orgGetHook", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "integer", "description": "id of the hook to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Hook", "schema": { "type": "array", "items": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Delete a hook", "operationId": "orgDeleteHook", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "integer", "description": "id of the hook to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Update a hook", "operationId": "orgEditHook", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "integer", "description": "id of the hook to update", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Hook", "schema": { "type": "array", "items": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/orgs/{org}/members": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List an organization's members", "operationId": "orgListMembers", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true } ], "responses": { "200": { "description": "UserList", "schema": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/orgs/{org}/members/{username}": { "get": { "tags": [ "organization" ], "summary": "Check if a user is a member of an organization", "operationId": "orgIsMember", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "string", "description": "username of the user", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "description": "user is a member", "schema": { "description": "APIEmpty is an empty response" } }, "404": { "description": "user is not a member", "schema": { "description": "APIEmpty is an empty response" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Remove a member from an organization", "operationId": "orgDeleteMember", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "string", "description": "username of the user", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "description": "member removed", "schema": { "description": "APIEmpty is an empty response" } } } } }, "/orgs/{org}/public_members": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List an organization's public members", "operationId": "orgListPublicMembers", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true } ], "responses": { "200": { "description": "UserList", "schema": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/orgs/{org}/public_members/{username}": { "get": { "tags": [ "organization" ], "summary": "Check if a user is a public member of an organization", "operationId": "orgIsPublicMember", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "string", "description": "username of the user", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "description": "user is a public member", "schema": { "description": "APIEmpty is an empty response" } }, "404": { "description": "user is not a public member", "schema": { "description": "APIEmpty is an empty response" } } } }, "put": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Publicize a user's membership", "operationId": "orgPublicizeMember", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "string", "description": "username of the user", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "description": "membership publicized", "schema": { "description": "APIEmpty is an empty response" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Conceal a user's membership", "operationId": "orgConcealMember", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "string", "description": "username of the user", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } } }, "/orgs/{org}/repos": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List an organization's repos", "operationId": "orgListRepos", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true } ], "responses": { "200": { "description": "RepositoryList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Repository" } } } } } }, "/orgs/{org}/teams": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List an organization's teams", "operationId": "orgListTeams", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true } ], "responses": { "200": { "description": "TeamList", "schema": { "type": "array", "items": { "description": "Team represents a team in an organization", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "permission": { "type": "string", "enum": [ "none", "read", "write", "admin", "owner" ], "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Create a team", "operationId": "orgCreateTeam", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "CreateTeamOption options for creating a team", "type": "object", "required": [ "name" ], "properties": { "description": { "type": "string", "x-go-name": "Description" }, "name": { "type": "string", "x-go-name": "Name" }, "permission": { "type": "string", "enum": [ "read", "write", "admin" ], "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "Team", "schema": { "description": "Team represents a team in an organization", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "permission": { "type": "string", "enum": [ "none", "read", "write", "admin", "owner" ], "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/migrate": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Migrate a remote git repository", "operationId": "repoMigrate", "parameters": [ { "name": "body", "in": "body", "schema": { "description": "MigrateRepoForm form for migrating repository", "type": "object", "required": [ "clone_addr", "uid", "repo_name" ], "properties": { "auth_password": { "type": "string", "x-go-name": "AuthPassword" }, "auth_username": { "type": "string", "x-go-name": "AuthUsername" }, "clone_addr": { "type": "string", "x-go-name": "CloneAddr" }, "description": { "type": "string", "x-go-name": "Description" }, "mirror": { "type": "boolean", "x-go-name": "Mirror" }, "private": { "type": "boolean", "x-go-name": "Private" }, "repo_name": { "type": "string", "x-go-name": "RepoName" }, "uid": { "type": "integer", "format": "int64", "x-go-name": "UID" } }, "x-go-package": "code.gitea.io/gitea/modules/auth" } } ], "responses": { "201": { "description": "Repository", "schema": { "$ref": "#/definitions/Repository" } } } } }, "/repos/search": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Search for repositories", "operationId": "repoSearch", "parameters": [ { "type": "string", "description": "keyword", "name": "q", "in": "query" }, { "type": "integer", "description": "search only for repos that the user with the given id owns or contributes to", "name": "uid", "in": "query" }, { "type": "integer", "description": "page number of results to return (1-based)", "name": "page", "in": "query" }, { "type": "integer", "description": "page size of results, maximum page size is 50", "name": "limit", "in": "query" }, { "type": "string", "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"", "name": "mode", "in": "query" }, { "type": "boolean", "description": "if `uid` is given, search only for repos that the user owns", "name": "exclusive", "in": "query" } ], "responses": { "200": { "description": "SearchResults", "schema": { "description": "SearchResults results of a successful search", "type": "object", "properties": { "data": { "type": "array", "items": { "description": "Repository represents a repository", "type": "object", "properties": { "clone_url": { "type": "string", "x-go-name": "CloneURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "default_branch": { "type": "string", "x-go-name": "DefaultBranch" }, "description": { "type": "string", "x-go-name": "Description" }, "empty": { "type": "boolean", "x-go-name": "Empty" }, "fork": { "type": "boolean", "x-go-name": "Fork" }, "forks_count": { "type": "integer", "format": "int64", "x-go-name": "Forks" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "mirror": { "type": "boolean", "x-go-name": "Mirror" }, "name": { "type": "string", "x-go-name": "Name" }, "open_issues_count": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "owner": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "parent": { "$ref": "#/definitions/Repository" }, "permissions": { "description": "Permission represents a set of permissions", "type": "object", "properties": { "admin": { "type": "boolean", "x-go-name": "Admin" }, "pull": { "type": "boolean", "x-go-name": "Pull" }, "push": { "type": "boolean", "x-go-name": "Push" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "private": { "type": "boolean", "x-go-name": "Private" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "ssh_url": { "type": "string", "x-go-name": "SSHURL" }, "stars_count": { "type": "integer", "format": "int64", "x-go-name": "Stars" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "watchers_count": { "type": "integer", "format": "int64", "x-go-name": "Watchers" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Data" }, "ok": { "type": "boolean", "x-go-name": "OK" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "422": { "description": "APIValidationError is error format response related to input validation", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } } } }, "/repos/{owner}/{repo}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a repository", "operationId": "repoGet", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "Repository", "schema": { "$ref": "#/definitions/Repository" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Delete a repository", "operationId": "repoDelete", "parameters": [ { "type": "string", "description": "owner of the repo to delete", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo to delete", "name": "repo", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" }, "403": { "description": "APIForbiddenError is a forbidden error response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } } } }, "/repos/{owner}/{repo}/archive/{archive}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get an archive of a repository", "operationId": "repoGetArchive", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "archive to download, consisting of a git reference and archive", "name": "archive", "in": "path", "required": true } ], "responses": { "200": { "description": "success" } } } }, "/repos/{owner}/{repo}/branches": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repository's branches", "operationId": "repoListBranches", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "BranchList", "schema": { "type": "array", "items": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/repos/{owner}/{repo}/branches/{branch}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repository's branches", "operationId": "repoGetBranch", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "branch to get", "name": "branch", "in": "path", "required": true } ], "responses": { "200": { "description": "Branch", "schema": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/collaborators": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repository's collaborators", "operationId": "repoListCollaborators", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "UserList", "schema": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/repos/{owner}/{repo}/collaborators/{collaborator}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Check if a user is a collaborator of a repository", "operationId": "repoCheckCollaborator", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "username of the collaborator", "name": "collaborator", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" }, "404": { "description": "APIEmpty is an empty response" } } }, "put": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Add a collaborator to a repository", "operationId": "repoAddCollaborator", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "username of the collaborator to add", "name": "collaborator", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository", "type": "object", "properties": { "permission": { "type": "string", "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } }, "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Delete a collaborator from a repository", "operationId": "repoDeleteCollaborator", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "username of the collaborator to delete", "name": "collaborator", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } } }, "/repos/{owner}/{repo}/commits/{ref}/statuses": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a commit's combined status, by branch/tag/commit reference", "operationId": "repoGetCombinedStatusByRef", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "name of branch/tag/commit", "name": "ref", "in": "path", "required": true } ], "responses": { "200": { "description": "Status", "schema": { "description": "Status holds a single Status of a single Commit", "type": "object", "properties": { "context": { "type": "string", "x-go-name": "Context" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "creator": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "description": { "type": "string", "x-go-name": "Description" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "status": { "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "target_url": { "type": "string", "x-go-name": "TargetURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/editorconfig/{filepath}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get the EditorConfig definitions of a file in a repository", "operationId": "repoGetEditorConfig", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "filepath of file to get", "name": "filepath", "in": "path", "required": true } ], "responses": { "200": { "description": "success" } } } }, "/repos/{owner}/{repo}/forks": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repository's forks", "operationId": "listForks", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "RepositoryList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Repository" } } } } }, "post": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Fork a repository", "operationId": "createFork", "parameters": [ { "type": "string", "description": "owner of the repo to fork", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo to fork", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "CreateForkOption options for creating a fork", "type": "object", "properties": { "organization": { "description": "organization name, if forking into an organization", "type": "string", "x-go-name": "Organization" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "202": { "description": "Repository", "schema": { "$ref": "#/definitions/Repository" } } } } }, "/repos/{owner}/{repo}/hooks": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List the hooks in a repository", "operationId": "repoListHooks", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "HookList", "schema": { "type": "array", "items": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Create a hook", "operationId": "repoCreateHook", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "CreateHookOption options when create a hook", "type": "object", "required": [ "type", "config" ], "properties": { "active": { "type": "boolean", "default": false, "x-go-name": "Active" }, "config": { "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "Config" }, "events": { "type": "array", "items": { "type": "string" }, "x-go-name": "Events" }, "type": { "type": "string", "enum": [ "gitea", "gogs", "slack", "discord" ], "x-go-name": "Type" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "Hook", "schema": { "type": "array", "items": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/repos/{owner}/{repo}/hooks/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a hook", "operationId": "repoGetHook", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the hook to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Hook", "schema": { "type": "array", "items": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Delete a hook in a repository", "operationId": "repoDeleteHook", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the hook to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" }, "404": { "description": "APINotFound is a not found empty response" } } }, "patch": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Edit a hook in a repository", "operationId": "repoEditHook", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the hook", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "EditHookOption options when modify one hook", "type": "object", "properties": { "active": { "type": "boolean", "x-go-name": "Active" }, "config": { "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "Config" }, "events": { "type": "array", "items": { "type": "string" }, "x-go-name": "Events" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "200": { "description": "Hook", "schema": { "type": "array", "items": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/repos/{owner}/{repo}/hooks/{id}/tests": { "post": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Test a push webhook", "operationId": "repoTestHook", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the hook to test", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } } }, "/repos/{owner}/{repo}/issues": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "List a repository's issues", "operationId": "issueListIssues", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "whether issue is open or closed", "name": "state", "in": "query" }, { "type": "integer", "description": "page number of requested issues", "name": "page", "in": "query" }, { "type": "string", "description": "search string", "name": "q", "in": "query" } ], "responses": { "200": { "description": "IssueList", "schema": { "type": "array", "items": { "description": "Issue represents an issue in a repository", "type": "object", "properties": { "assignee": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "assignees": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Labels" }, "milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "pull_request": { "description": "PullRequestMeta PR info if an issue is a PR", "type": "object", "properties": { "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Create an issue", "operationId": "issueCreateIssue", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "CreateIssueOption options to create one issue", "type": "object", "required": [ "title" ], "properties": { "assignee": { "description": "username of assignee", "type": "string", "x-go-name": "Assignee" }, "assignees": { "type": "array", "items": { "type": "string" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "closed": { "type": "boolean", "x-go-name": "Closed" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "labels": { "description": "list of label ids", "type": "array", "items": { "type": "integer", "format": "int64" }, "x-go-name": "Labels" }, "milestone": { "description": "milestone id", "type": "integer", "format": "int64", "x-go-name": "Milestone" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "Issue", "schema": { "description": "Issue represents an issue in a repository", "type": "object", "properties": { "assignee": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "assignees": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Labels" }, "milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "pull_request": { "description": "PullRequestMeta PR info if an issue is a PR", "type": "object", "properties": { "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/issues/comments": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "List all comments in a repository", "operationId": "issueGetRepoComments", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "if provided, only comments updated since the provided time are returned.", "name": "string", "in": "query" } ], "responses": { "200": { "description": "CommentList", "schema": { "type": "array", "items": { "description": "Comment represents a comment on a commit or issue", "type": "object", "properties": { "body": { "type": "string", "x-go-name": "Body" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_url": { "type": "string", "x-go-name": "IssueURL" }, "pull_request_url": { "type": "string", "x-go-name": "PRURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/repos/{owner}/{repo}/issues/comments/{id}": { "delete": { "tags": [ "issue" ], "summary": "Delete a comment", "operationId": "issueDeleteComment", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of comment to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Edit a comment", "operationId": "issueEditComment", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the comment to edit", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "EditIssueCommentOption options for editing a comment", "type": "object", "required": [ "body" ], "properties": { "body": { "type": "string", "x-go-name": "Body" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "200": { "description": "Comment", "schema": { "description": "Comment represents a comment on a commit or issue", "type": "object", "properties": { "body": { "type": "string", "x-go-name": "Body" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_url": { "type": "string", "x-go-name": "IssueURL" }, "pull_request_url": { "type": "string", "x-go-name": "PRURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/issues/{id}/times": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "List an issue's tracked times", "operationId": "issueTrackedTimes", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "TrackedTimeList", "schema": { "type": "array", "items": { "description": "TrackedTime worked time for an issue / pr", "type": "object", "properties": { "created": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_id": { "type": "integer", "format": "int64", "x-go-name": "IssueID" }, "time": { "description": "Time in seconds", "type": "integer", "format": "int64", "x-go-name": "Time" }, "user_id": { "type": "integer", "format": "int64", "x-go-name": "UserID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Add a tracked time to a issue", "operationId": "issueAddTime", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue to add tracked time to", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "AddTimeOption options for adding time to an issue", "type": "object", "required": [ "time" ], "properties": { "time": { "description": "time in seconds", "type": "integer", "format": "int64", "x-go-name": "Time" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "200": { "description": "TrackedTime", "schema": { "description": "TrackedTime worked time for an issue / pr", "type": "object", "properties": { "created": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_id": { "type": "integer", "format": "int64", "x-go-name": "IssueID" }, "time": { "description": "Time in seconds", "type": "integer", "format": "int64", "x-go-name": "Time" }, "user_id": { "type": "integer", "format": "int64", "x-go-name": "UserID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "400": { "description": "APIError is error format response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } }, "403": { "description": "APIError is error format response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } } } }, "/repos/{owner}/{repo}/issues/{index}": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Get an issue", "operationId": "issueGetIssue", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue to get", "name": "index", "in": "path", "required": true } ], "responses": { "200": { "description": "Issue", "schema": { "description": "Issue represents an issue in a repository", "type": "object", "properties": { "assignee": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "assignees": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Labels" }, "milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "pull_request": { "description": "PullRequestMeta PR info if an issue is a PR", "type": "object", "properties": { "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Edit an issue", "operationId": "issueEditIssue", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue to edit", "name": "index", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "EditIssueOption options for editing an issue", "type": "object", "properties": { "assignee": { "type": "string", "x-go-name": "Assignee" }, "assignees": { "type": "array", "items": { "type": "string" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "milestone": { "type": "integer", "format": "int64", "x-go-name": "Milestone" }, "state": { "type": "string", "x-go-name": "State" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "Issue", "schema": { "description": "Issue represents an issue in a repository", "type": "object", "properties": { "assignee": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "assignees": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Labels" }, "milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "pull_request": { "description": "PullRequestMeta PR info if an issue is a PR", "type": "object", "properties": { "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/issues/{index}/comments": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "List all comments on an issue", "operationId": "issueGetComments", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "index", "in": "path", "required": true }, { "type": "string", "description": "if provided, only comments updated since the specified time are returned.", "name": "string", "in": "query" } ], "responses": { "200": { "description": "CommentList", "schema": { "type": "array", "items": { "description": "Comment represents a comment on a commit or issue", "type": "object", "properties": { "body": { "type": "string", "x-go-name": "Body" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_url": { "type": "string", "x-go-name": "IssueURL" }, "pull_request_url": { "type": "string", "x-go-name": "PRURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Add a comment to an issue", "operationId": "issueCreateComment", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "index", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "CreateIssueCommentOption options for creating a comment on an issue", "type": "object", "required": [ "body" ], "properties": { "body": { "type": "string", "x-go-name": "Body" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "Comment", "schema": { "description": "Comment represents a comment on a commit or issue", "type": "object", "properties": { "body": { "type": "string", "x-go-name": "Body" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_url": { "type": "string", "x-go-name": "IssueURL" }, "pull_request_url": { "type": "string", "x-go-name": "PRURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/issues/{index}/comments/{id}": { "delete": { "tags": [ "issue" ], "summary": "Delete a comment", "operationId": "issueDeleteCommentDeprecated", "deprecated": true, "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "this parameter is ignored", "name": "index", "in": "path", "required": true }, { "type": "integer", "description": "id of comment to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Edit a comment", "operationId": "issueEditCommentDeprecated", "deprecated": true, "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "this parameter is ignored", "name": "index", "in": "path", "required": true }, { "type": "integer", "description": "id of the comment to edit", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "EditIssueCommentOption options for editing a comment", "type": "object", "required": [ "body" ], "properties": { "body": { "type": "string", "x-go-name": "Body" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "200": { "description": "Comment", "schema": { "description": "Comment represents a comment on a commit or issue", "type": "object", "properties": { "body": { "type": "string", "x-go-name": "Body" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_url": { "type": "string", "x-go-name": "IssueURL" }, "pull_request_url": { "type": "string", "x-go-name": "PRURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/issues/{index}/labels": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Get an issue's labels", "operationId": "issueGetLabels", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "index", "in": "path", "required": true } ], "responses": { "200": { "description": "LabelList", "schema": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "404": { "description": "APINotFound is a not found empty response" } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Replace an issue's labels", "operationId": "issueReplaceLabels", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "index", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "IssueLabelsOption a collection of labels", "type": "object", "properties": { "labels": { "description": "list of label IDs", "type": "array", "items": { "type": "integer", "format": "int64" }, "x-go-name": "Labels" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "200": { "description": "LabelList", "schema": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Add a label to an issue", "operationId": "issueAddLabel", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "index", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "IssueLabelsOption a collection of labels", "type": "object", "properties": { "labels": { "description": "list of label IDs", "type": "array", "items": { "type": "integer", "format": "int64" }, "x-go-name": "Labels" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "200": { "description": "LabelList", "schema": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Remove all labels from an issue", "operationId": "issueClearLabels", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "index", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } } }, "/repos/{owner}/{repo}/issues/{index}/labels/{id}": { "delete": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Remove a label from an issue", "operationId": "issueRemoveLabel", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "index", "in": "path", "required": true }, { "type": "integer", "description": "id of the label to remove", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } } }, "/repos/{owner}/{repo}/keys": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repository's keys", "operationId": "repoListKeys", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "DeployKeyList", "schema": { "type": "array", "items": { "description": "DeployKey a deploy key", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "read_only": { "type": "boolean", "x-go-name": "ReadOnly" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Add a key to a repository", "operationId": "repoCreateKey", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "CreateKeyOption options when creating a key", "type": "object", "required": [ "title", "key" ], "properties": { "key": { "description": "An armored SSH key to add", "type": "string", "uniqueItems": true, "x-go-name": "Key" }, "read_only": { "description": "Describe if the key has only read access or read/write", "type": "boolean", "x-go-name": "ReadOnly" }, "title": { "description": "Title of the key to add", "type": "string", "uniqueItems": true, "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "DeployKey", "schema": { "description": "DeployKey a deploy key", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "read_only": { "type": "boolean", "x-go-name": "ReadOnly" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/keys/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a repository's key by id", "operationId": "repoGetKey", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the key to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "DeployKey", "schema": { "description": "DeployKey a deploy key", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "read_only": { "type": "boolean", "x-go-name": "ReadOnly" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } }, "delete": { "tags": [ "repository" ], "summary": "Delete a key from a repository", "operationId": "repoDeleteKey", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the key to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } } }, "/repos/{owner}/{repo}/labels": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Get all of a repository's labels", "operationId": "issueListLabels", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "LabelList", "schema": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Create a label", "operationId": "issueCreateLabel", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "CreateLabelOption options for creating a label", "type": "object", "required": [ "name", "color" ], "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "#00aabb" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "Label", "schema": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/labels/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Get a single label", "operationId": "issueGetLabel", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the label to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Label", "schema": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } }, "delete": { "tags": [ "issue" ], "summary": "Delete a label", "operationId": "issueDeleteLabel", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the label to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Update a label", "operationId": "issueEditLabel", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the label to edit", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "EditLabelOption options for editing a label", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "200": { "description": "Label", "schema": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/milestones": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Get all of a repository's milestones", "operationId": "issueGetMilestonesList", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "MilestoneList", "schema": { "type": "array", "items": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Create a milestone", "operationId": "issueCreateMilestone", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "CreateMilestoneOption options for creating a milestone", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "Milestone", "schema": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/milestones/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Get a milestone", "operationId": "issueGetMilestone", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the milestone", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Milestone", "schema": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } }, "delete": { "tags": [ "issue" ], "summary": "Delete a milestone", "operationId": "issueDeleteMilestone", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the milestone to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Update a milestone", "operationId": "issueEditMilestone", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the milestone", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "EditMilestoneOption options for editing a milestone", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "state": { "type": "string", "x-go-name": "State" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "200": { "description": "Milestone", "schema": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/mirror-sync": { "post": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Sync a mirrored repository", "operationId": "repoMirrorSync", "parameters": [ { "type": "string", "description": "owner of the repo to sync", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo to sync", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "APIEmpty is an empty response" } } } }, "/repos/{owner}/{repo}/pulls": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repo's pull requests", "operationId": "repoListPullRequests", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "PullRequestList", "schema": { "type": "array", "items": { "description": "PullRequest represents a pull request", "type": "object", "properties": { "assignee": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "assignees": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Assignees" }, "base": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "diff_url": { "type": "string", "x-go-name": "DiffURL" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "head": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Labels" }, "merge_base": { "type": "string", "x-go-name": "MergeBase" }, "merge_commit_sha": { "type": "string", "x-go-name": "MergedCommitID" }, "mergeable": { "type": "boolean", "x-go-name": "Mergeable" }, "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" }, "merged_by": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "patch_url": { "type": "string", "x-go-name": "PatchURL" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Create a pull request", "operationId": "repoCreatePullRequest", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "CreatePullRequestOption options when creating a pull request", "type": "object", "properties": { "assignee": { "type": "string", "x-go-name": "Assignee" }, "assignees": { "type": "array", "items": { "type": "string" }, "x-go-name": "Assignees" }, "base": { "type": "string", "x-go-name": "Base" }, "body": { "type": "string", "x-go-name": "Body" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "head": { "type": "string", "x-go-name": "Head" }, "labels": { "type": "array", "items": { "type": "integer", "format": "int64" }, "x-go-name": "Labels" }, "milestone": { "type": "integer", "format": "int64", "x-go-name": "Milestone" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "PullRequest", "schema": { "description": "PullRequest represents a pull request", "type": "object", "properties": { "assignee": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "assignees": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Assignees" }, "base": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "diff_url": { "type": "string", "x-go-name": "DiffURL" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "head": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Labels" }, "merge_base": { "type": "string", "x-go-name": "MergeBase" }, "merge_commit_sha": { "type": "string", "x-go-name": "MergedCommitID" }, "mergeable": { "type": "boolean", "x-go-name": "Mergeable" }, "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" }, "merged_by": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "patch_url": { "type": "string", "x-go-name": "PatchURL" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/pulls/{index}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a pull request", "operationId": "repoGetPullRequest", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the pull request to get", "name": "index", "in": "path", "required": true } ], "responses": { "200": { "description": "PullRequest", "schema": { "description": "PullRequest represents a pull request", "type": "object", "properties": { "assignee": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "assignees": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Assignees" }, "base": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "diff_url": { "type": "string", "x-go-name": "DiffURL" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "head": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Labels" }, "merge_base": { "type": "string", "x-go-name": "MergeBase" }, "merge_commit_sha": { "type": "string", "x-go-name": "MergedCommitID" }, "mergeable": { "type": "boolean", "x-go-name": "Mergeable" }, "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" }, "merged_by": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "patch_url": { "type": "string", "x-go-name": "PatchURL" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Update a pull request", "operationId": "repoEditPullRequest", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the pull request to edit", "name": "index", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "EditPullRequestOption options when modify pull request", "type": "object", "properties": { "assignee": { "type": "string", "x-go-name": "Assignee" }, "assignees": { "type": "array", "items": { "type": "string" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "labels": { "type": "array", "items": { "type": "integer", "format": "int64" }, "x-go-name": "Labels" }, "milestone": { "type": "integer", "format": "int64", "x-go-name": "Milestone" }, "state": { "type": "string", "x-go-name": "State" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "PullRequest", "schema": { "description": "PullRequest represents a pull request", "type": "object", "properties": { "assignee": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "assignees": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Assignees" }, "base": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "diff_url": { "type": "string", "x-go-name": "DiffURL" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "head": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Labels" }, "merge_base": { "type": "string", "x-go-name": "MergeBase" }, "merge_commit_sha": { "type": "string", "x-go-name": "MergedCommitID" }, "mergeable": { "type": "boolean", "x-go-name": "Mergeable" }, "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" }, "merged_by": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "patch_url": { "type": "string", "x-go-name": "PatchURL" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/pulls/{index}/merge": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Check if a pull request has been merged", "operationId": "repoPullRequestIsMerged", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the pull request", "name": "index", "in": "path", "required": true } ], "responses": { "204": { "description": "pull request has been merged", "schema": { "description": "APIEmpty is an empty response" } }, "404": { "description": "pull request has not been merged", "schema": { "description": "APIEmpty is an empty response" } } } }, "post": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Merge a pull request", "operationId": "repoMergePullRequest", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the pull request to merge", "name": "index", "in": "path", "required": true } ], "responses": { "200": { "description": "APIEmpty is an empty response" }, "405": { "description": "APIEmpty is an empty response" } } } }, "/repos/{owner}/{repo}/raw/{filepath}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a file from a repository", "operationId": "repoGetRawFile", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "filepath of the file to get", "name": "filepath", "in": "path", "required": true } ], "responses": { "200": { "description": "success" } } } }, "/repos/{owner}/{repo}/releases": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repo's releases", "operationId": "repoListReleases", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "ReleaseList", "schema": { "type": "array", "items": { "description": "Release represents a repository release", "type": "object", "properties": { "assets": { "type": "array", "items": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Attachments" }, "author": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "body": { "type": "string", "x-go-name": "Note" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "CreatedAt" }, "draft": { "type": "boolean", "x-go-name": "IsDraft" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Title" }, "prerelease": { "type": "boolean", "x-go-name": "IsPrerelease" }, "published_at": { "type": "string", "format": "date-time", "x-go-name": "PublishedAt" }, "tag_name": { "type": "string", "x-go-name": "TagName" }, "tarball_url": { "type": "string", "x-go-name": "TarURL" }, "target_commitish": { "type": "string", "x-go-name": "Target" }, "url": { "type": "string", "x-go-name": "URL" }, "zipball_url": { "type": "string", "x-go-name": "ZipURL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Create a release", "operationId": "repoCreateRelease", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "CreateReleaseOption options when creating a release", "type": "object", "required": [ "tag_name" ], "properties": { "body": { "type": "string", "x-go-name": "Note" }, "draft": { "type": "boolean", "x-go-name": "IsDraft" }, "name": { "type": "string", "x-go-name": "Title" }, "prerelease": { "type": "boolean", "x-go-name": "IsPrerelease" }, "tag_name": { "type": "string", "x-go-name": "TagName" }, "target_commitish": { "type": "string", "x-go-name": "Target" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "Release", "schema": { "description": "Release represents a repository release", "type": "object", "properties": { "assets": { "type": "array", "items": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Attachments" }, "author": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "body": { "type": "string", "x-go-name": "Note" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "CreatedAt" }, "draft": { "type": "boolean", "x-go-name": "IsDraft" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Title" }, "prerelease": { "type": "boolean", "x-go-name": "IsPrerelease" }, "published_at": { "type": "string", "format": "date-time", "x-go-name": "PublishedAt" }, "tag_name": { "type": "string", "x-go-name": "TagName" }, "tarball_url": { "type": "string", "x-go-name": "TarURL" }, "target_commitish": { "type": "string", "x-go-name": "Target" }, "url": { "type": "string", "x-go-name": "URL" }, "zipball_url": { "type": "string", "x-go-name": "ZipURL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/releases/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a release", "operationId": "repoGetRelease", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Release", "schema": { "description": "Release represents a repository release", "type": "object", "properties": { "assets": { "type": "array", "items": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Attachments" }, "author": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "body": { "type": "string", "x-go-name": "Note" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "CreatedAt" }, "draft": { "type": "boolean", "x-go-name": "IsDraft" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Title" }, "prerelease": { "type": "boolean", "x-go-name": "IsPrerelease" }, "published_at": { "type": "string", "format": "date-time", "x-go-name": "PublishedAt" }, "tag_name": { "type": "string", "x-go-name": "TagName" }, "tarball_url": { "type": "string", "x-go-name": "TarURL" }, "target_commitish": { "type": "string", "x-go-name": "Target" }, "url": { "type": "string", "x-go-name": "URL" }, "zipball_url": { "type": "string", "x-go-name": "ZipURL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } }, "delete": { "tags": [ "repository" ], "summary": "Delete a release", "operationId": "repoDeleteRelease", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Update a release", "operationId": "repoEditRelease", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release to edit", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "EditReleaseOption options when editing a release", "type": "object", "properties": { "body": { "type": "string", "x-go-name": "Note" }, "draft": { "type": "boolean", "x-go-name": "IsDraft" }, "name": { "type": "string", "x-go-name": "Title" }, "prerelease": { "type": "boolean", "x-go-name": "IsPrerelease" }, "tag_name": { "type": "string", "x-go-name": "TagName" }, "target_commitish": { "type": "string", "x-go-name": "Target" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "200": { "description": "Release", "schema": { "description": "Release represents a repository release", "type": "object", "properties": { "assets": { "type": "array", "items": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Attachments" }, "author": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "body": { "type": "string", "x-go-name": "Note" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "CreatedAt" }, "draft": { "type": "boolean", "x-go-name": "IsDraft" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Title" }, "prerelease": { "type": "boolean", "x-go-name": "IsPrerelease" }, "published_at": { "type": "string", "format": "date-time", "x-go-name": "PublishedAt" }, "tag_name": { "type": "string", "x-go-name": "TagName" }, "tarball_url": { "type": "string", "x-go-name": "TarURL" }, "target_commitish": { "type": "string", "x-go-name": "Target" }, "url": { "type": "string", "x-go-name": "URL" }, "zipball_url": { "type": "string", "x-go-name": "ZipURL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/releases/{id}/assets": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List release's attachments", "operationId": "repoListReleaseAttachments", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "AttachmentList", "schema": { "type": "array", "items": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "post": { "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Create a release attachment", "operationId": "repoCreateReleaseAttachment", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "name of the attachment", "name": "name", "in": "query" }, { "type": "file", "description": "attachment to upload", "name": "attachment", "in": "formData", "required": true } ], "responses": { "201": { "description": "Attachment", "schema": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a release attachment", "operationId": "repoGetReleaseAttachment", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "id of the attachment to get", "name": "attachment_id", "in": "path", "required": true } ], "responses": { "200": { "description": "Attachment", "schema": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Delete a release attachment", "operationId": "repoDeleteReleaseAttachment", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "id of the attachment to delete", "name": "attachment_id", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Edit a release attachment", "operationId": "repoEditReleaseAttachment", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "id of the attachment to edit", "name": "attachment_id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "EditAttachmentOptions options for editing attachments", "type": "object", "properties": { "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "Attachment", "schema": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/repos/{owner}/{repo}/stargazers": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repo's stargazers", "operationId": "repoListStargazers", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "UserList", "schema": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/repos/{owner}/{repo}/statuses/{sha}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a commit's statuses", "operationId": "repoListStatuses", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "sha of the commit", "name": "sha", "in": "path", "required": true } ], "responses": { "200": { "description": "StatusList", "schema": { "type": "array", "items": { "description": "Status holds a single Status of a single Commit", "type": "object", "properties": { "context": { "type": "string", "x-go-name": "Context" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "creator": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "description": { "type": "string", "x-go-name": "Description" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "status": { "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "target_url": { "type": "string", "x-go-name": "TargetURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "post": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Create a commit status", "operationId": "repoCreateStatus", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "sha of the commit", "name": "sha", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "CreateStatusOption holds the information needed to create a new Status for a Commit", "type": "object", "properties": { "context": { "type": "string", "x-go-name": "Context" }, "description": { "type": "string", "x-go-name": "Description" }, "state": { "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "target_url": { "type": "string", "x-go-name": "TargetURL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "200": { "description": "StatusList", "schema": { "type": "array", "items": { "description": "Status holds a single Status of a single Commit", "type": "object", "properties": { "context": { "type": "string", "x-go-name": "Context" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "creator": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "description": { "type": "string", "x-go-name": "Description" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "status": { "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "target_url": { "type": "string", "x-go-name": "TargetURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/repos/{owner}/{repo}/subscribers": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repo's watchers", "operationId": "repoListSubscribers", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "UserList", "schema": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/repos/{owner}/{repo}/subscription": { "get": { "tags": [ "repository" ], "summary": "Check if the current user is watching a repo", "operationId": "userCurrentCheckSubscription", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "WatchInfo", "schema": { "description": "WatchInfo represents an API watch status of one repository", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "CreatedAt" }, "ignored": { "type": "boolean", "x-go-name": "Ignored" }, "reason": { "type": "object", "x-go-name": "Reason" }, "repository_url": { "type": "string", "x-go-name": "RepositoryURL" }, "subscribed": { "type": "boolean", "x-go-name": "Subscribed" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } }, "put": { "tags": [ "repository" ], "summary": "Watch a repo", "operationId": "userCurrentPutSubscription", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "WatchInfo", "schema": { "description": "WatchInfo represents an API watch status of one repository", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "CreatedAt" }, "ignored": { "type": "boolean", "x-go-name": "Ignored" }, "reason": { "type": "object", "x-go-name": "Reason" }, "repository_url": { "type": "string", "x-go-name": "RepositoryURL" }, "subscribed": { "type": "boolean", "x-go-name": "Subscribed" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } }, "delete": { "tags": [ "repository" ], "summary": "Unwatch a repo", "operationId": "userCurrentDeleteSubscription", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } } }, "/repos/{owner}/{repo}/times": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repo's tracked times", "operationId": "repoTrackedTimes", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "description": "TrackedTimeList", "schema": { "type": "array", "items": { "description": "TrackedTime worked time for an issue / pr", "type": "object", "properties": { "created": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_id": { "type": "integer", "format": "int64", "x-go-name": "IssueID" }, "time": { "description": "Time in seconds", "type": "integer", "format": "int64", "x-go-name": "Time" }, "user_id": { "type": "integer", "format": "int64", "x-go-name": "UserID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/repos/{owner}/{repo}/times/{user}": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List a user's tracked times in a repo", "operationId": "userTrackedTimes", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "username of user", "name": "user", "in": "path", "required": true } ], "responses": { "200": { "description": "TrackedTimeList", "schema": { "type": "array", "items": { "description": "TrackedTime worked time for an issue / pr", "type": "object", "properties": { "created": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_id": { "type": "integer", "format": "int64", "x-go-name": "IssueID" }, "time": { "description": "Time in seconds", "type": "integer", "format": "int64", "x-go-name": "Time" }, "user_id": { "type": "integer", "format": "int64", "x-go-name": "UserID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/repositories/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a repository by id", "operationId": "repoGetByID", "parameters": [ { "type": "integer", "description": "id of the repo to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Repository", "schema": { "$ref": "#/definitions/Repository" } } } } }, "/teams/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Get a team", "operationId": "orgGetTeam", "parameters": [ { "type": "integer", "description": "id of the team to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Team", "schema": { "description": "Team represents a team in an organization", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "permission": { "type": "string", "enum": [ "none", "read", "write", "admin", "owner" ], "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } }, "delete": { "tags": [ "organization" ], "summary": "Delete a team", "operationId": "orgDeleteTeam", "parameters": [ { "type": "integer", "description": "id of the team to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "team deleted", "schema": { "description": "APIEmpty is an empty response" } } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Edit a team", "operationId": "orgEditTeam", "parameters": [ { "type": "integer", "description": "id of the team to edit", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "description": "EditTeamOption options for editing a team", "type": "object", "required": [ "name" ], "properties": { "description": { "type": "string", "x-go-name": "Description" }, "name": { "type": "string", "x-go-name": "Name" }, "permission": { "type": "string", "enum": [ "read", "write", "admin" ], "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "200": { "description": "Team", "schema": { "description": "Team represents a team in an organization", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "permission": { "type": "string", "enum": [ "none", "read", "write", "admin", "owner" ], "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/teams/{id}/members": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List a team's members", "operationId": "orgListTeamMembers", "parameters": [ { "type": "integer", "description": "id of the team", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "UserList", "schema": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/teams/{id}/members/{username}": { "put": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Add a team member", "operationId": "orgAddTeamMember", "parameters": [ { "type": "integer", "description": "id of the team", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "username of the user to add", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } }, "delete": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Remove a team member", "operationId": "orgRemoveTeamMember", "parameters": [ { "type": "integer", "description": "id of the team", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "username of the user to remove", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } } }, "/teams/{id}/repos": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List a team's repos", "operationId": "orgListTeamRepos", "parameters": [ { "type": "integer", "description": "id of the team", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "RepositoryList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Repository" } } } } } }, "/teams/{id}/repos/{org}/{repo}": { "put": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Add a repository to a team", "operationId": "orgAddTeamRepository", "parameters": [ { "type": "integer", "description": "id of the team", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "organization that owns the repo to add", "name": "org", "in": "path", "required": true }, { "type": "string", "description": "name of the repo to add", "name": "repo", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } }, "delete": { "description": "This does not delete the repository, it only removes the repository from the team.", "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Remove a repository from a team", "operationId": "orgRemoveTeamRepository", "parameters": [ { "type": "integer", "description": "id of the team", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "organization that owns the repo to remove", "name": "org", "in": "path", "required": true }, { "type": "string", "description": "name of the repo to remove", "name": "repo", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } } }, "/topics/search": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "search topics via keyword", "operationId": "topicSearch", "parameters": [ { "type": "string", "description": "keywords to search", "name": "q", "in": "query", "required": true } ], "responses": { "200": { "description": "Repository", "schema": { "$ref": "#/definitions/Repository" } } } } }, "/user": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get the authenticated user", "operationId": "userGetCurrent", "responses": { "200": { "description": "User", "schema": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "/user/emails": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the authenticated user's email addresses", "operationId": "userListEmails", "responses": { "200": { "description": "EmailList", "schema": { "type": "array", "items": { "description": "Email an email address belonging to a user", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "primary": { "type": "boolean", "x-go-name": "Primary" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "post": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Add email addresses", "operationId": "userAddEmail", "parameters": [ { "name": "body", "in": "body", "schema": { "description": "CreateEmailOption options when creating email addresses", "type": "object", "properties": { "emails": { "description": "email addresses to add", "type": "array", "items": { "type": "string" }, "x-go-name": "Emails" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "EmailList", "schema": { "type": "array", "items": { "description": "Email an email address belonging to a user", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "primary": { "type": "boolean", "x-go-name": "Primary" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Delete email addresses", "operationId": "userDeleteEmail", "parameters": [ { "name": "body", "in": "body", "schema": { "description": "DeleteEmailOption options when deleting email addresses", "type": "object", "properties": { "emails": { "description": "email addresses to delete", "type": "array", "items": { "type": "string" }, "x-go-name": "Emails" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } } }, "/user/followers": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the authenticated user's followers", "operationId": "userCurrentListFollowers", "responses": { "200": { "description": "UserList", "schema": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/user/following": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the users that the authenticated user is following", "operationId": "userCurrentListFollowing", "responses": { "200": { "description": "UserList", "schema": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/user/following/{username}": { "get": { "tags": [ "user" ], "summary": "Check whether a user is followed by the authenticated user", "operationId": "userCurrentCheckFollowing", "parameters": [ { "type": "string", "description": "username of followed user", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" }, "404": { "description": "APINotFound is a not found empty response" } } }, "put": { "tags": [ "user" ], "summary": "Follow a user", "operationId": "userCurrentPutFollow", "parameters": [ { "type": "string", "description": "username of user to follow", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } }, "delete": { "tags": [ "user" ], "summary": "Unfollow a user", "operationId": "userCurrentDeleteFollow", "parameters": [ { "type": "string", "description": "username of user to unfollow", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } } }, "/user/gpg_keys": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the authenticated user's GPG keys", "operationId": "userCurrentListGPGKeys", "responses": { "200": { "description": "GPGKeyList", "schema": { "type": "array", "items": { "$ref": "#/definitions/GPGKey" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Create a GPG key", "operationId": "userCurrentPostGPGKey", "parameters": [ { "name": "Form", "in": "body", "schema": { "description": "CreateGPGKeyOption options create user GPG key", "type": "object", "required": [ "armored_public_key" ], "properties": { "armored_public_key": { "description": "An armored GPG key to add", "type": "string", "uniqueItems": true, "x-go-name": "ArmoredKey" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "GPGKey", "schema": { "$ref": "#/definitions/GPGKey" } }, "422": { "description": "APIValidationError is error format response related to input validation", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } } } }, "/user/gpg_keys/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get a GPG key", "operationId": "userCurrentGetGPGKey", "parameters": [ { "type": "integer", "description": "id of key to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "GPGKey", "schema": { "$ref": "#/definitions/GPGKey" } }, "404": { "description": "APINotFound is a not found empty response" } } }, "delete": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Remove a GPG key", "operationId": "userCurrentDeleteGPGKey", "parameters": [ { "type": "integer", "description": "id of key to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" }, "403": { "description": "APIForbiddenError is a forbidden error response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } } } }, "/user/keys": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the authenticated user's public keys", "operationId": "userCurrentListKeys", "responses": { "200": { "description": "PublicKeyList", "schema": { "type": "array", "items": { "description": "PublicKey publickey is a user key to push code to repository", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "fingerprint": { "type": "string", "x-go-name": "Fingerprint" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Create a public key", "operationId": "userCurrentPostKey", "parameters": [ { "name": "body", "in": "body", "schema": { "description": "CreateKeyOption options when creating a key", "type": "object", "required": [ "title", "key" ], "properties": { "key": { "description": "An armored SSH key to add", "type": "string", "uniqueItems": true, "x-go-name": "Key" }, "read_only": { "description": "Describe if the key has only read access or read/write", "type": "boolean", "x-go-name": "ReadOnly" }, "title": { "description": "Title of the key to add", "type": "string", "uniqueItems": true, "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "PublicKey", "schema": { "description": "PublicKey publickey is a user key to push code to repository", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "fingerprint": { "type": "string", "x-go-name": "Fingerprint" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "422": { "description": "APIValidationError is error format response related to input validation", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } } } }, "/user/keys/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get a public key", "operationId": "userCurrentGetKey", "parameters": [ { "type": "integer", "description": "id of key to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "PublicKey", "schema": { "description": "PublicKey publickey is a user key to push code to repository", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "fingerprint": { "type": "string", "x-go-name": "Fingerprint" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "404": { "description": "APINotFound is a not found empty response" } } }, "delete": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Delete a public key", "operationId": "userCurrentDeleteKey", "parameters": [ { "type": "integer", "description": "id of key to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" }, "403": { "description": "APIForbiddenError is a forbidden error response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } }, "404": { "description": "APINotFound is a not found empty response" } } } }, "/user/orgs": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List the current user's organizations", "operationId": "orgListCurrentUserOrgs", "responses": { "200": { "description": "OrganizationList", "schema": { "type": "array", "items": { "description": "Organization represents an organization", "type": "object", "properties": { "avatar_url": { "type": "string", "x-go-name": "AvatarURL" }, "description": { "type": "string", "x-go-name": "Description" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "location": { "type": "string", "x-go-name": "Location" }, "username": { "type": "string", "x-go-name": "UserName" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/user/repos": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the repos that the authenticated user owns or has access to", "operationId": "userCurrentListRepos", "responses": { "200": { "description": "RepositoryList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Repository" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository", "user" ], "summary": "Create a repository", "operationId": "createCurrentUserRepo", "parameters": [ { "name": "body", "in": "body", "schema": { "description": "CreateRepoOption options when creating repository", "type": "object", "required": [ "name" ], "properties": { "auto_init": { "description": "Whether the repository should be auto-intialized?", "type": "boolean", "x-go-name": "AutoInit" }, "description": { "description": "Description of the repository to create", "type": "string", "x-go-name": "Description" }, "gitignores": { "description": "Gitignores to use", "type": "string", "x-go-name": "Gitignores" }, "license": { "description": "License to use", "type": "string", "x-go-name": "License" }, "name": { "description": "Name of the repository to create", "type": "string", "uniqueItems": true, "x-go-name": "Name" }, "private": { "description": "Whether the repository is private", "type": "boolean", "x-go-name": "Private" }, "readme": { "description": "Readme of the repository to create", "type": "string", "x-go-name": "Readme" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } ], "responses": { "201": { "description": "Repository", "schema": { "$ref": "#/definitions/Repository" } } } } }, "/user/starred": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "The repos that the authenticated user has starred", "operationId": "userCurrentListStarred", "responses": { "200": { "description": "RepositoryList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Repository" } } } } } }, "/user/starred/{owner}/{repo}": { "get": { "tags": [ "user" ], "summary": "Whether the authenticated is starring the repo", "operationId": "userCurrentCheckStarring", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" }, "404": { "description": "APINotFound is a not found empty response" } } }, "put": { "tags": [ "user" ], "summary": "Star the given repo", "operationId": "userCurrentPutStar", "parameters": [ { "type": "string", "description": "owner of the repo to star", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo to star", "name": "repo", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } }, "delete": { "tags": [ "user" ], "summary": "Unstar the given repo", "operationId": "userCurrentDeleteStar", "parameters": [ { "type": "string", "description": "owner of the repo to unstar", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo to unstar", "name": "repo", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } } }, "/user/subscriptions": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List repositories watched by the authenticated user", "operationId": "userCurrentListSubscriptions", "responses": { "200": { "description": "RepositoryList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Repository" } } } } } }, "/user/times": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the current user's tracked times", "operationId": "userCurrentTrackedTimes", "responses": { "200": { "description": "TrackedTimeList", "schema": { "type": "array", "items": { "description": "TrackedTime worked time for an issue / pr", "type": "object", "properties": { "created": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_id": { "type": "integer", "format": "int64", "x-go-name": "IssueID" }, "time": { "description": "Time in seconds", "type": "integer", "format": "int64", "x-go-name": "Time" }, "user_id": { "type": "integer", "format": "int64", "x-go-name": "UserID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/user/{username}/orgs": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List a user's organizations", "operationId": "orgListUserOrgs", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "OrganizationList", "schema": { "type": "array", "items": { "description": "Organization represents an organization", "type": "object", "properties": { "avatar_url": { "type": "string", "x-go-name": "AvatarURL" }, "description": { "type": "string", "x-go-name": "Description" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "location": { "type": "string", "x-go-name": "Location" }, "username": { "type": "string", "x-go-name": "UserName" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/users/search": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Search for users", "operationId": "userSearch", "parameters": [ { "type": "string", "description": "keyword", "name": "q", "in": "query" }, { "type": "integer", "description": "maximum number of users to return", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "UserList", "schema": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/users/{follower}/following/{followee}": { "get": { "tags": [ "user" ], "summary": "Check if one user is following another user", "operationId": "userCheckFollowing", "parameters": [ { "type": "string", "description": "username of following user", "name": "follower", "in": "path", "required": true }, { "type": "string", "description": "username of followed user", "name": "followee", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" }, "404": { "description": "APINotFound is a not found empty response" } } } }, "/users/{username}": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get a user", "operationId": "userGet", "parameters": [ { "type": "string", "description": "username of user to get", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "User", "schema": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "404": { "description": "APINotFound is a not found empty response" } } } }, "/users/{username}/followers": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the given user's followers", "operationId": "userListFollowers", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "UserList", "schema": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/users/{username}/following": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the users that the given user is following", "operationId": "userListFollowing", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "UserList", "schema": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/users/{username}/gpg_keys": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the given user's GPG keys", "operationId": "userListGPGKeys", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "GPGKeyList", "schema": { "type": "array", "items": { "$ref": "#/definitions/GPGKey" } } } } } }, "/users/{username}/keys": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the given user's public keys", "operationId": "userListKeys", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "PublicKeyList", "schema": { "type": "array", "items": { "description": "PublicKey publickey is a user key to push code to repository", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "fingerprint": { "type": "string", "x-go-name": "Fingerprint" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "/users/{username}/repos": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the repos owned by the given user", "operationId": "userListRepos", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "RepositoryList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Repository" } } } } } }, "/users/{username}/starred": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "The repos that the given user has starred", "operationId": "userListStarred", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "RepositoryList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Repository" } } } } } }, "/users/{username}/subscriptions": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the repositories watched by a user", "operationId": "userListSubscriptions", "parameters": [ { "type": "string", "description": "username of the user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "RepositoryList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Repository" } } } } } }, "/users/{username}/tokens": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the authenticated user's access tokens", "operationId": "userGetTokens", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "AccessTokenList represents a list of API access token." } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Create an access token", "operationId": "userCreateToken", "parameters": [ { "type": "string", "x-go-name": "Name", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "AccessToken represents a API access token.", "headers": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "sha1": { "type": "string" } } } } } }, "/users/{username}/tokens/{token}": { "delete": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "delete an access token", "operationId": "userDeleteAccessToken", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true }, { "type": "integer", "description": "token to be deleted", "name": "token", "in": "path", "required": true } ], "responses": { "204": { "description": "APIEmpty is an empty response" } } } }, "/version": { "get": { "produces": [ "application/json" ], "tags": [ "miscellaneous" ], "summary": "Returns the version of the Gitea application", "operationId": "getVersion", "responses": { "200": { "description": "ServerVersion", "schema": { "description": "ServerVersion wraps the version of the server", "type": "object", "properties": { "version": { "type": "string", "x-go-name": "Version" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } } } } }, "definitions": { "AddCollaboratorOption": { "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository", "type": "object", "properties": { "permission": { "type": "string", "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "AddTimeOption": { "description": "AddTimeOption options for adding time to an issue", "type": "object", "required": [ "time" ], "properties": { "time": { "description": "time in seconds", "type": "integer", "format": "int64", "x-go-name": "Time" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Attachment": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Branch": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Comment": { "description": "Comment represents a comment on a commit or issue", "type": "object", "properties": { "body": { "type": "string", "x-go-name": "Body" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_url": { "type": "string", "x-go-name": "IssueURL" }, "pull_request_url": { "type": "string", "x-go-name": "PRURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateEmailOption": { "description": "CreateEmailOption options when creating email addresses", "type": "object", "properties": { "emails": { "description": "email addresses to add", "type": "array", "items": { "type": "string" }, "x-go-name": "Emails" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateForkOption": { "description": "CreateForkOption options for creating a fork", "type": "object", "properties": { "organization": { "description": "organization name, if forking into an organization", "type": "string", "x-go-name": "Organization" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateGPGKeyOption": { "description": "CreateGPGKeyOption options create user GPG key", "type": "object", "required": [ "armored_public_key" ], "properties": { "armored_public_key": { "description": "An armored GPG key to add", "type": "string", "uniqueItems": true, "x-go-name": "ArmoredKey" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateHookOption": { "description": "CreateHookOption options when create a hook", "type": "object", "required": [ "type", "config" ], "properties": { "active": { "type": "boolean", "default": false, "x-go-name": "Active" }, "config": { "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "Config" }, "events": { "type": "array", "items": { "type": "string" }, "x-go-name": "Events" }, "type": { "type": "string", "enum": [ "gitea", "gogs", "slack", "discord" ], "x-go-name": "Type" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateIssueCommentOption": { "description": "CreateIssueCommentOption options for creating a comment on an issue", "type": "object", "required": [ "body" ], "properties": { "body": { "type": "string", "x-go-name": "Body" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateIssueOption": { "description": "CreateIssueOption options to create one issue", "type": "object", "required": [ "title" ], "properties": { "assignee": { "description": "username of assignee", "type": "string", "x-go-name": "Assignee" }, "assignees": { "type": "array", "items": { "type": "string" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "closed": { "type": "boolean", "x-go-name": "Closed" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "labels": { "description": "list of label ids", "type": "array", "items": { "type": "integer", "format": "int64" }, "x-go-name": "Labels" }, "milestone": { "description": "milestone id", "type": "integer", "format": "int64", "x-go-name": "Milestone" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateKeyOption": { "description": "CreateKeyOption options when creating a key", "type": "object", "required": [ "title", "key" ], "properties": { "key": { "description": "An armored SSH key to add", "type": "string", "uniqueItems": true, "x-go-name": "Key" }, "read_only": { "description": "Describe if the key has only read access or read/write", "type": "boolean", "x-go-name": "ReadOnly" }, "title": { "description": "Title of the key to add", "type": "string", "uniqueItems": true, "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateLabelOption": { "description": "CreateLabelOption options for creating a label", "type": "object", "required": [ "name", "color" ], "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "#00aabb" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateMilestoneOption": { "description": "CreateMilestoneOption options for creating a milestone", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateOrgOption": { "description": "CreateOrgOption options for creating an organization", "type": "object", "required": [ "username" ], "properties": { "description": { "type": "string", "x-go-name": "Description" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "location": { "type": "string", "x-go-name": "Location" }, "username": { "type": "string", "x-go-name": "UserName" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreatePullRequestOption": { "description": "CreatePullRequestOption options when creating a pull request", "type": "object", "properties": { "assignee": { "type": "string", "x-go-name": "Assignee" }, "assignees": { "type": "array", "items": { "type": "string" }, "x-go-name": "Assignees" }, "base": { "type": "string", "x-go-name": "Base" }, "body": { "type": "string", "x-go-name": "Body" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "head": { "type": "string", "x-go-name": "Head" }, "labels": { "type": "array", "items": { "type": "integer", "format": "int64" }, "x-go-name": "Labels" }, "milestone": { "type": "integer", "format": "int64", "x-go-name": "Milestone" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateReleaseOption": { "description": "CreateReleaseOption options when creating a release", "type": "object", "required": [ "tag_name" ], "properties": { "body": { "type": "string", "x-go-name": "Note" }, "draft": { "type": "boolean", "x-go-name": "IsDraft" }, "name": { "type": "string", "x-go-name": "Title" }, "prerelease": { "type": "boolean", "x-go-name": "IsPrerelease" }, "tag_name": { "type": "string", "x-go-name": "TagName" }, "target_commitish": { "type": "string", "x-go-name": "Target" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateRepoOption": { "description": "CreateRepoOption options when creating repository", "type": "object", "required": [ "name" ], "properties": { "auto_init": { "description": "Whether the repository should be auto-intialized?", "type": "boolean", "x-go-name": "AutoInit" }, "description": { "description": "Description of the repository to create", "type": "string", "x-go-name": "Description" }, "gitignores": { "description": "Gitignores to use", "type": "string", "x-go-name": "Gitignores" }, "license": { "description": "License to use", "type": "string", "x-go-name": "License" }, "name": { "description": "Name of the repository to create", "type": "string", "uniqueItems": true, "x-go-name": "Name" }, "private": { "description": "Whether the repository is private", "type": "boolean", "x-go-name": "Private" }, "readme": { "description": "Readme of the repository to create", "type": "string", "x-go-name": "Readme" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateStatusOption": { "description": "CreateStatusOption holds the information needed to create a new Status for a Commit", "type": "object", "properties": { "context": { "type": "string", "x-go-name": "Context" }, "description": { "type": "string", "x-go-name": "Description" }, "state": { "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "target_url": { "type": "string", "x-go-name": "TargetURL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateTeamOption": { "description": "CreateTeamOption options for creating a team", "type": "object", "required": [ "name" ], "properties": { "description": { "type": "string", "x-go-name": "Description" }, "name": { "type": "string", "x-go-name": "Name" }, "permission": { "type": "string", "enum": [ "read", "write", "admin" ], "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateUserOption": { "description": "CreateUserOption create user options", "type": "object", "required": [ "username", "email", "password" ], "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "login_name": { "type": "string", "x-go-name": "LoginName" }, "password": { "type": "string", "x-go-name": "Password" }, "send_notify": { "type": "boolean", "x-go-name": "SendNotify" }, "source_id": { "type": "integer", "format": "int64", "x-go-name": "SourceID" }, "username": { "type": "string", "x-go-name": "Username" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "DeleteEmailOption": { "description": "DeleteEmailOption options when deleting email addresses", "type": "object", "properties": { "emails": { "description": "email addresses to delete", "type": "array", "items": { "type": "string" }, "x-go-name": "Emails" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "DeployKey": { "description": "DeployKey a deploy key", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "read_only": { "type": "boolean", "x-go-name": "ReadOnly" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditAttachmentOptions": { "description": "EditAttachmentOptions options for editing attachments", "type": "object", "properties": { "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditHookOption": { "description": "EditHookOption options when modify one hook", "type": "object", "properties": { "active": { "type": "boolean", "x-go-name": "Active" }, "config": { "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "Config" }, "events": { "type": "array", "items": { "type": "string" }, "x-go-name": "Events" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditIssueCommentOption": { "description": "EditIssueCommentOption options for editing a comment", "type": "object", "required": [ "body" ], "properties": { "body": { "type": "string", "x-go-name": "Body" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditIssueOption": { "description": "EditIssueOption options for editing an issue", "type": "object", "properties": { "assignee": { "type": "string", "x-go-name": "Assignee" }, "assignees": { "type": "array", "items": { "type": "string" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "milestone": { "type": "integer", "format": "int64", "x-go-name": "Milestone" }, "state": { "type": "string", "x-go-name": "State" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditLabelOption": { "description": "EditLabelOption options for editing a label", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditMilestoneOption": { "description": "EditMilestoneOption options for editing a milestone", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "state": { "type": "string", "x-go-name": "State" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditOrgOption": { "description": "EditOrgOption options for editing an organization", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "location": { "type": "string", "x-go-name": "Location" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditPullRequestOption": { "description": "EditPullRequestOption options when modify pull request", "type": "object", "properties": { "assignee": { "type": "string", "x-go-name": "Assignee" }, "assignees": { "type": "array", "items": { "type": "string" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "labels": { "type": "array", "items": { "type": "integer", "format": "int64" }, "x-go-name": "Labels" }, "milestone": { "type": "integer", "format": "int64", "x-go-name": "Milestone" }, "state": { "type": "string", "x-go-name": "State" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditReleaseOption": { "description": "EditReleaseOption options when editing a release", "type": "object", "properties": { "body": { "type": "string", "x-go-name": "Note" }, "draft": { "type": "boolean", "x-go-name": "IsDraft" }, "name": { "type": "string", "x-go-name": "Title" }, "prerelease": { "type": "boolean", "x-go-name": "IsPrerelease" }, "tag_name": { "type": "string", "x-go-name": "TagName" }, "target_commitish": { "type": "string", "x-go-name": "Target" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditTeamOption": { "description": "EditTeamOption options for editing a team", "type": "object", "required": [ "name" ], "properties": { "description": { "type": "string", "x-go-name": "Description" }, "name": { "type": "string", "x-go-name": "Name" }, "permission": { "type": "string", "enum": [ "read", "write", "admin" ], "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditUserOption": { "description": "EditUserOption edit user options", "type": "object", "required": [ "email" ], "properties": { "active": { "type": "boolean", "x-go-name": "Active" }, "admin": { "type": "boolean", "x-go-name": "Admin" }, "allow_git_hook": { "type": "boolean", "x-go-name": "AllowGitHook" }, "allow_import_local": { "type": "boolean", "x-go-name": "AllowImportLocal" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "location": { "type": "string", "x-go-name": "Location" }, "login_name": { "type": "string", "x-go-name": "LoginName" }, "max_repo_creation": { "type": "integer", "format": "int64", "x-go-name": "MaxRepoCreation" }, "password": { "type": "string", "x-go-name": "Password" }, "source_id": { "type": "integer", "format": "int64", "x-go-name": "SourceID" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Email": { "description": "Email an email address belonging to a user", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "primary": { "type": "boolean", "x-go-name": "Primary" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "GPGKey": { "description": "GPGKey a user GPG key to sign commit and tag in repository", "type": "object", "properties": { "can_certify": { "type": "boolean", "x-go-name": "CanCertify" }, "can_encrypt_comms": { "type": "boolean", "x-go-name": "CanEncryptComms" }, "can_encrypt_storage": { "type": "boolean", "x-go-name": "CanEncryptStorage" }, "can_sign": { "type": "boolean", "x-go-name": "CanSign" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "emails": { "type": "array", "items": { "description": "GPGKeyEmail an email attached to a GPGKey", "type": "object", "properties": { "email": { "type": "string", "x-go-name": "Email" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Emails" }, "expires_at": { "type": "string", "format": "date-time", "x-go-name": "Expires" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key_id": { "type": "string", "x-go-name": "KeyID" }, "primary_key_id": { "type": "string", "x-go-name": "PrimaryKeyID" }, "public_key": { "type": "string", "x-go-name": "PublicKey" }, "subkeys": { "type": "array", "items": { "description": "GPGKey a user GPG key to sign commit and tag in repository", "type": "object", "properties": { "can_certify": { "type": "boolean", "x-go-name": "CanCertify" }, "can_encrypt_comms": { "type": "boolean", "x-go-name": "CanEncryptComms" }, "can_encrypt_storage": { "type": "boolean", "x-go-name": "CanEncryptStorage" }, "can_sign": { "type": "boolean", "x-go-name": "CanSign" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "emails": { "type": "array", "items": { "description": "GPGKeyEmail an email attached to a GPGKey", "type": "object", "properties": { "email": { "type": "string", "x-go-name": "Email" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Emails" }, "expires_at": { "type": "string", "format": "date-time", "x-go-name": "Expires" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key_id": { "type": "string", "x-go-name": "KeyID" }, "primary_key_id": { "type": "string", "x-go-name": "PrimaryKeyID" }, "public_key": { "type": "string", "x-go-name": "PublicKey" }, "subkeys": { "type": "array", "items": { "$ref": "#/definitions/GPGKey" }, "x-go-name": "SubsKey" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "SubsKey" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "GPGKeyEmail": { "description": "GPGKeyEmail an email attached to a GPGKey", "type": "object", "properties": { "email": { "type": "string", "x-go-name": "Email" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Issue": { "description": "Issue represents an issue in a repository", "type": "object", "properties": { "assignee": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "assignees": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Labels" }, "milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "pull_request": { "description": "PullRequestMeta PR info if an issue is a PR", "type": "object", "properties": { "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "IssueLabelsOption": { "description": "IssueLabelsOption a collection of labels", "type": "object", "properties": { "labels": { "description": "list of label IDs", "type": "array", "items": { "type": "integer", "format": "int64" }, "x-go-name": "Labels" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Label": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "MarkdownOption": { "description": "MarkdownOption markdown options", "type": "object", "properties": { "Context": { "description": "Context to render\n\nin: body", "type": "string" }, "Mode": { "description": "Mode to render\n\nin: body", "type": "string" }, "Text": { "description": "Text markdown to render\n\nin: body", "type": "string" }, "Wiki": { "description": "Is it a wiki page ?\n\nin: body", "type": "boolean" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "MigrateRepoForm": { "description": "MigrateRepoForm form for migrating repository", "type": "object", "required": [ "clone_addr", "uid", "repo_name" ], "properties": { "auth_password": { "type": "string", "x-go-name": "AuthPassword" }, "auth_username": { "type": "string", "x-go-name": "AuthUsername" }, "clone_addr": { "type": "string", "x-go-name": "CloneAddr" }, "description": { "type": "string", "x-go-name": "Description" }, "mirror": { "type": "boolean", "x-go-name": "Mirror" }, "private": { "type": "boolean", "x-go-name": "Private" }, "repo_name": { "type": "string", "x-go-name": "RepoName" }, "uid": { "type": "integer", "format": "int64", "x-go-name": "UID" } }, "x-go-package": "code.gitea.io/gitea/modules/auth" }, "Milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Organization": { "description": "Organization represents an organization", "type": "object", "properties": { "avatar_url": { "type": "string", "x-go-name": "AvatarURL" }, "description": { "type": "string", "x-go-name": "Description" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "location": { "type": "string", "x-go-name": "Location" }, "username": { "type": "string", "x-go-name": "UserName" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "PRBranchInfo": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "PayloadCommit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "PayloadCommitVerification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "PayloadUser": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Permission": { "description": "Permission represents a set of permissions", "type": "object", "properties": { "admin": { "type": "boolean", "x-go-name": "Admin" }, "pull": { "type": "boolean", "x-go-name": "Pull" }, "push": { "type": "boolean", "x-go-name": "Push" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "PublicKey": { "description": "PublicKey publickey is a user key to push code to repository", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "fingerprint": { "type": "string", "x-go-name": "Fingerprint" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "PullRequest": { "description": "PullRequest represents a pull request", "type": "object", "properties": { "assignee": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "assignees": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Assignees" }, "base": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "diff_url": { "type": "string", "x-go-name": "DiffURL" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "head": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Labels" }, "merge_base": { "type": "string", "x-go-name": "MergeBase" }, "merge_commit_sha": { "type": "string", "x-go-name": "MergedCommitID" }, "mergeable": { "type": "boolean", "x-go-name": "Mergeable" }, "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" }, "merged_by": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "patch_url": { "type": "string", "x-go-name": "PatchURL" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "PullRequestMeta": { "description": "PullRequestMeta PR info if an issue is a PR", "type": "object", "properties": { "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Release": { "description": "Release represents a repository release", "type": "object", "properties": { "assets": { "type": "array", "items": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Attachments" }, "author": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "body": { "type": "string", "x-go-name": "Note" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "CreatedAt" }, "draft": { "type": "boolean", "x-go-name": "IsDraft" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Title" }, "prerelease": { "type": "boolean", "x-go-name": "IsPrerelease" }, "published_at": { "type": "string", "format": "date-time", "x-go-name": "PublishedAt" }, "tag_name": { "type": "string", "x-go-name": "TagName" }, "tarball_url": { "type": "string", "x-go-name": "TarURL" }, "target_commitish": { "type": "string", "x-go-name": "Target" }, "url": { "type": "string", "x-go-name": "URL" }, "zipball_url": { "type": "string", "x-go-name": "ZipURL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Repository": { "description": "Repository represents a repository", "type": "object", "properties": { "clone_url": { "type": "string", "x-go-name": "CloneURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "default_branch": { "type": "string", "x-go-name": "DefaultBranch" }, "description": { "type": "string", "x-go-name": "Description" }, "empty": { "type": "boolean", "x-go-name": "Empty" }, "fork": { "type": "boolean", "x-go-name": "Fork" }, "forks_count": { "type": "integer", "format": "int64", "x-go-name": "Forks" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "mirror": { "type": "boolean", "x-go-name": "Mirror" }, "name": { "type": "string", "x-go-name": "Name" }, "open_issues_count": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "owner": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "parent": { "$ref": "#/definitions/Repository" }, "permissions": { "description": "Permission represents a set of permissions", "type": "object", "properties": { "admin": { "type": "boolean", "x-go-name": "Admin" }, "pull": { "type": "boolean", "x-go-name": "Pull" }, "push": { "type": "boolean", "x-go-name": "Push" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "private": { "type": "boolean", "x-go-name": "Private" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "ssh_url": { "type": "string", "x-go-name": "SSHURL" }, "stars_count": { "type": "integer", "format": "int64", "x-go-name": "Stars" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "watchers_count": { "type": "integer", "format": "int64", "x-go-name": "Watchers" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "SearchResults": { "description": "SearchResults results of a successful search", "type": "object", "properties": { "data": { "type": "array", "items": { "description": "Repository represents a repository", "type": "object", "properties": { "clone_url": { "type": "string", "x-go-name": "CloneURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "default_branch": { "type": "string", "x-go-name": "DefaultBranch" }, "description": { "type": "string", "x-go-name": "Description" }, "empty": { "type": "boolean", "x-go-name": "Empty" }, "fork": { "type": "boolean", "x-go-name": "Fork" }, "forks_count": { "type": "integer", "format": "int64", "x-go-name": "Forks" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "mirror": { "type": "boolean", "x-go-name": "Mirror" }, "name": { "type": "string", "x-go-name": "Name" }, "open_issues_count": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "owner": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "parent": { "$ref": "#/definitions/Repository" }, "permissions": { "description": "Permission represents a set of permissions", "type": "object", "properties": { "admin": { "type": "boolean", "x-go-name": "Admin" }, "pull": { "type": "boolean", "x-go-name": "Pull" }, "push": { "type": "boolean", "x-go-name": "Push" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "private": { "type": "boolean", "x-go-name": "Private" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "ssh_url": { "type": "string", "x-go-name": "SSHURL" }, "stars_count": { "type": "integer", "format": "int64", "x-go-name": "Stars" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "watchers_count": { "type": "integer", "format": "int64", "x-go-name": "Watchers" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Data" }, "ok": { "type": "boolean", "x-go-name": "OK" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "ServerVersion": { "description": "ServerVersion wraps the version of the server", "type": "object", "properties": { "version": { "type": "string", "x-go-name": "Version" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "StateType": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Status": { "description": "Status holds a single Status of a single Commit", "type": "object", "properties": { "context": { "type": "string", "x-go-name": "Context" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "creator": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "description": { "type": "string", "x-go-name": "Description" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "status": { "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "target_url": { "type": "string", "x-go-name": "TargetURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "StatusState": { "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Team": { "description": "Team represents a team in an organization", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "permission": { "type": "string", "enum": [ "none", "read", "write", "admin", "owner" ], "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "TrackedTime": { "description": "TrackedTime worked time for an issue / pr", "type": "object", "properties": { "created": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_id": { "type": "integer", "format": "int64", "x-go-name": "IssueID" }, "time": { "description": "Time in seconds", "type": "integer", "format": "int64", "x-go-name": "Time" }, "user_id": { "type": "integer", "format": "int64", "x-go-name": "UserID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "User": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "WatchInfo": { "description": "WatchInfo represents an API watch status of one repository", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "CreatedAt" }, "ignored": { "type": "boolean", "x-go-name": "Ignored" }, "reason": { "type": "object", "x-go-name": "Reason" }, "repository_url": { "type": "string", "x-go-name": "RepositoryURL" }, "subscribed": { "type": "boolean", "x-go-name": "Subscribed" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "responses": { "AccessToken": { "description": "AccessToken represents a API access token.", "headers": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "sha1": { "type": "string" } } }, "AccessTokenList": { "description": "AccessTokenList represents a list of API access token." }, "Attachment": { "description": "Attachment", "schema": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "AttachmentList": { "description": "AttachmentList", "schema": { "type": "array", "items": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "Branch": { "description": "Branch", "schema": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "BranchList": { "description": "BranchList", "schema": { "type": "array", "items": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "Comment": { "description": "Comment", "schema": { "description": "Comment represents a comment on a commit or issue", "type": "object", "properties": { "body": { "type": "string", "x-go-name": "Body" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_url": { "type": "string", "x-go-name": "IssueURL" }, "pull_request_url": { "type": "string", "x-go-name": "PRURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "CommentList": { "description": "CommentList", "schema": { "type": "array", "items": { "description": "Comment represents a comment on a commit or issue", "type": "object", "properties": { "body": { "type": "string", "x-go-name": "Body" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_url": { "type": "string", "x-go-name": "IssueURL" }, "pull_request_url": { "type": "string", "x-go-name": "PRURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "DeployKey": { "description": "DeployKey", "schema": { "description": "DeployKey a deploy key", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "read_only": { "type": "boolean", "x-go-name": "ReadOnly" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "DeployKeyList": { "description": "DeployKeyList", "schema": { "type": "array", "items": { "description": "DeployKey a deploy key", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "read_only": { "type": "boolean", "x-go-name": "ReadOnly" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "EmailList": { "description": "EmailList", "schema": { "type": "array", "items": { "description": "Email an email address belonging to a user", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "primary": { "type": "boolean", "x-go-name": "Primary" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "GPGKey": { "description": "GPGKey", "schema": { "$ref": "#/definitions/GPGKey" } }, "GPGKeyList": { "description": "GPGKeyList", "schema": { "type": "array", "items": { "$ref": "#/definitions/GPGKey" } } }, "Hook": { "description": "Hook", "schema": { "type": "array", "items": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "HookList": { "description": "HookList", "schema": { "type": "array", "items": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "committer": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "Issue": { "description": "Issue", "schema": { "description": "Issue represents an issue in a repository", "type": "object", "properties": { "assignee": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "assignees": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Labels" }, "milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "pull_request": { "description": "PullRequestMeta PR info if an issue is a PR", "type": "object", "properties": { "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "IssueList": { "description": "IssueList", "schema": { "type": "array", "items": { "description": "Issue represents an issue in a repository", "type": "object", "properties": { "assignee": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "assignees": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Labels" }, "milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "pull_request": { "description": "PullRequestMeta PR info if an issue is a PR", "type": "object", "properties": { "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "Label": { "description": "Label", "schema": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "LabelList": { "description": "LabelList", "schema": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "MarkdownRender": { "description": "MarkdownRender is a rendered markdown document" }, "Milestone": { "description": "Milestone", "schema": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "MilestoneList": { "description": "MilestoneList", "schema": { "type": "array", "items": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "Organization": { "description": "Organization", "schema": { "description": "Organization represents an organization", "type": "object", "properties": { "avatar_url": { "type": "string", "x-go-name": "AvatarURL" }, "description": { "type": "string", "x-go-name": "Description" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "location": { "type": "string", "x-go-name": "Location" }, "username": { "type": "string", "x-go-name": "UserName" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "OrganizationList": { "description": "OrganizationList", "schema": { "type": "array", "items": { "description": "Organization represents an organization", "type": "object", "properties": { "avatar_url": { "type": "string", "x-go-name": "AvatarURL" }, "description": { "type": "string", "x-go-name": "Description" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "location": { "type": "string", "x-go-name": "Location" }, "username": { "type": "string", "x-go-name": "UserName" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "PublicKey": { "description": "PublicKey", "schema": { "description": "PublicKey publickey is a user key to push code to repository", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "fingerprint": { "type": "string", "x-go-name": "Fingerprint" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "PublicKeyList": { "description": "PublicKeyList", "schema": { "type": "array", "items": { "description": "PublicKey publickey is a user key to push code to repository", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "fingerprint": { "type": "string", "x-go-name": "Fingerprint" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "PullRequest": { "description": "PullRequest", "schema": { "description": "PullRequest represents a pull request", "type": "object", "properties": { "assignee": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "assignees": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Assignees" }, "base": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "diff_url": { "type": "string", "x-go-name": "DiffURL" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "head": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Labels" }, "merge_base": { "type": "string", "x-go-name": "MergeBase" }, "merge_commit_sha": { "type": "string", "x-go-name": "MergedCommitID" }, "mergeable": { "type": "boolean", "x-go-name": "Mergeable" }, "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" }, "merged_by": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "patch_url": { "type": "string", "x-go-name": "PatchURL" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "PullRequestList": { "description": "PullRequestList", "schema": { "type": "array", "items": { "description": "PullRequest represents a pull request", "type": "object", "properties": { "assignee": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "assignees": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Assignees" }, "base": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "diff_url": { "type": "string", "x-go-name": "DiffURL" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "head": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Labels" }, "merge_base": { "type": "string", "x-go-name": "MergeBase" }, "merge_commit_sha": { "type": "string", "x-go-name": "MergedCommitID" }, "mergeable": { "type": "boolean", "x-go-name": "Mergeable" }, "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" }, "merged_by": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "patch_url": { "type": "string", "x-go-name": "PatchURL" }, "state": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "Release": { "description": "Release", "schema": { "description": "Release represents a repository release", "type": "object", "properties": { "assets": { "type": "array", "items": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Attachments" }, "author": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "body": { "type": "string", "x-go-name": "Note" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "CreatedAt" }, "draft": { "type": "boolean", "x-go-name": "IsDraft" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Title" }, "prerelease": { "type": "boolean", "x-go-name": "IsPrerelease" }, "published_at": { "type": "string", "format": "date-time", "x-go-name": "PublishedAt" }, "tag_name": { "type": "string", "x-go-name": "TagName" }, "tarball_url": { "type": "string", "x-go-name": "TarURL" }, "target_commitish": { "type": "string", "x-go-name": "Target" }, "url": { "type": "string", "x-go-name": "URL" }, "zipball_url": { "type": "string", "x-go-name": "ZipURL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "ReleaseList": { "description": "ReleaseList", "schema": { "type": "array", "items": { "description": "Release represents a repository release", "type": "object", "properties": { "assets": { "type": "array", "items": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Attachments" }, "author": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "body": { "type": "string", "x-go-name": "Note" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "CreatedAt" }, "draft": { "type": "boolean", "x-go-name": "IsDraft" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Title" }, "prerelease": { "type": "boolean", "x-go-name": "IsPrerelease" }, "published_at": { "type": "string", "format": "date-time", "x-go-name": "PublishedAt" }, "tag_name": { "type": "string", "x-go-name": "TagName" }, "tarball_url": { "type": "string", "x-go-name": "TarURL" }, "target_commitish": { "type": "string", "x-go-name": "Target" }, "url": { "type": "string", "x-go-name": "URL" }, "zipball_url": { "type": "string", "x-go-name": "ZipURL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "Repository": { "description": "Repository", "schema": { "$ref": "#/definitions/Repository" } }, "RepositoryList": { "description": "RepositoryList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Repository" } } }, "SearchResults": { "description": "SearchResults", "schema": { "description": "SearchResults results of a successful search", "type": "object", "properties": { "data": { "type": "array", "items": { "description": "Repository represents a repository", "type": "object", "properties": { "clone_url": { "type": "string", "x-go-name": "CloneURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "default_branch": { "type": "string", "x-go-name": "DefaultBranch" }, "description": { "type": "string", "x-go-name": "Description" }, "empty": { "type": "boolean", "x-go-name": "Empty" }, "fork": { "type": "boolean", "x-go-name": "Fork" }, "forks_count": { "type": "integer", "format": "int64", "x-go-name": "Forks" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "mirror": { "type": "boolean", "x-go-name": "Mirror" }, "name": { "type": "string", "x-go-name": "Name" }, "open_issues_count": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "owner": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "parent": { "$ref": "#/definitions/Repository" }, "permissions": { "description": "Permission represents a set of permissions", "type": "object", "properties": { "admin": { "type": "boolean", "x-go-name": "Admin" }, "pull": { "type": "boolean", "x-go-name": "Pull" }, "push": { "type": "boolean", "x-go-name": "Push" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "private": { "type": "boolean", "x-go-name": "Private" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "ssh_url": { "type": "string", "x-go-name": "SSHURL" }, "stars_count": { "type": "integer", "format": "int64", "x-go-name": "Stars" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "watchers_count": { "type": "integer", "format": "int64", "x-go-name": "Watchers" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "x-go-name": "Data" }, "ok": { "type": "boolean", "x-go-name": "OK" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "ServerVersion": { "description": "ServerVersion", "schema": { "description": "ServerVersion wraps the version of the server", "type": "object", "properties": { "version": { "type": "string", "x-go-name": "Version" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "Status": { "description": "Status", "schema": { "description": "Status holds a single Status of a single Commit", "type": "object", "properties": { "context": { "type": "string", "x-go-name": "Context" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "creator": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "description": { "type": "string", "x-go-name": "Description" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "status": { "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "target_url": { "type": "string", "x-go-name": "TargetURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "StatusList": { "description": "StatusList", "schema": { "type": "array", "items": { "description": "Status holds a single Status of a single Commit", "type": "object", "properties": { "context": { "type": "string", "x-go-name": "Context" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "creator": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "description": { "type": "string", "x-go-name": "Description" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "status": { "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "target_url": { "type": "string", "x-go-name": "TargetURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "Team": { "description": "Team", "schema": { "description": "Team represents a team in an organization", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "permission": { "type": "string", "enum": [ "none", "read", "write", "admin", "owner" ], "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "TeamList": { "description": "TeamList", "schema": { "type": "array", "items": { "description": "Team represents a team in an organization", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "permission": { "type": "string", "enum": [ "none", "read", "write", "admin", "owner" ], "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "TrackedTime": { "description": "TrackedTime", "schema": { "description": "TrackedTime worked time for an issue / pr", "type": "object", "properties": { "created": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_id": { "type": "integer", "format": "int64", "x-go-name": "IssueID" }, "time": { "description": "Time in seconds", "type": "integer", "format": "int64", "x-go-name": "Time" }, "user_id": { "type": "integer", "format": "int64", "x-go-name": "UserID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "TrackedTimeList": { "description": "TrackedTimeList", "schema": { "type": "array", "items": { "description": "TrackedTime worked time for an issue / pr", "type": "object", "properties": { "created": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_id": { "type": "integer", "format": "int64", "x-go-name": "IssueID" }, "time": { "description": "Time in seconds", "type": "integer", "format": "int64", "x-go-name": "Time" }, "user_id": { "type": "integer", "format": "int64", "x-go-name": "UserID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "User": { "description": "User", "schema": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "UserList": { "description": "UserList", "schema": { "type": "array", "items": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } } }, "WatchInfo": { "description": "WatchInfo", "schema": { "description": "WatchInfo represents an API watch status of one repository", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "CreatedAt" }, "ignored": { "type": "boolean", "x-go-name": "Ignored" }, "reason": { "type": "object", "x-go-name": "Reason" }, "repository_url": { "type": "string", "x-go-name": "RepositoryURL" }, "subscribed": { "type": "boolean", "x-go-name": "Subscribed" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "empty": { "description": "APIEmpty is an empty response" }, "error": { "description": "APIError is error format response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } }, "forbidden": { "description": "APIForbiddenError is a forbidden error response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } }, "notFound": { "description": "APINotFound is a not found empty response" }, "parameterBodies": { "description": "parameterBodies", "schema": { "description": "EditAttachmentOptions options for editing attachments", "type": "object", "properties": { "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "redirect": { "description": "APIRedirect is a redirect response" }, "validationError": { "description": "APIValidationError is error format response related to input validation", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } }, "securityDefinitions": { "AccessToken": { "type": "apiKey", "name": "access_token", "in": "query" }, "AuthorizationHeaderToken": { "type": "apiKey", "name": "Authorization", "in": "header" }, "BasicAuth": { "type": "basic" }, "Token": { "type": "apiKey", "name": "token", "in": "query" } }, "security": [ { "BasicAuth": [] }, { "Token": [] }, { "AccessToken": [] }, { "AuthorizationHeaderToken": [] } ] }validate-0.24.0/fixtures/bugs/1614/gitea.json000066400000000000000000005725061457312750000206010ustar00rootroot00000000000000{ "consumes": [ "application/json", "text/plain" ], "produces": [ "application/json", "text/html" ], "schemes": [ "http", "https" ], "swagger": "2.0", "info": { "description": "This documentation describes the Gitea API.", "title": "Gitea API.", "license": { "name": "MIT", "url": "http://opensource.org/licenses/MIT" }, "version": "1.1.1" }, "basePath": "/api/v1", "paths": { "/admin/users": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Create a user", "operationId": "adminCreateUser", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateUserOption" } } ], "responses": { "201": { "$ref": "#/responses/User" }, "403": { "$ref": "#/responses/forbidden" }, "422": { "$ref": "#/responses/validationError" } } } }, "/admin/users/{username}": { "delete": { "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Delete a user", "operationId": "adminDeleteUser", "parameters": [ { "type": "string", "description": "username of user to delete", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" }, "422": { "$ref": "#/responses/validationError" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Edit an existing user", "operationId": "adminEditUser", "parameters": [ { "type": "string", "description": "username of user to edit", "name": "username", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/EditUserOption" } } ], "responses": { "200": { "$ref": "#/responses/User" }, "403": { "$ref": "#/responses/forbidden" }, "422": { "$ref": "#/responses/validationError" } } } }, "/admin/users/{username}/keys": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Add a public key on behalf of a user", "operationId": "adminCreatePublicKey", "parameters": [ { "type": "string", "description": "username of the user", "name": "username", "in": "path", "required": true } ], "responses": { "201": { "$ref": "#/responses/PublicKey" }, "403": { "$ref": "#/responses/forbidden" }, "422": { "$ref": "#/responses/validationError" } } } }, "/admin/users/{username}/keys/{id}": { "delete": { "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Delete a user's public key", "operationId": "adminDeleteUserPublicKey", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true }, { "type": "integer", "description": "id of the key to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } } } }, "/admin/users/{username}/orgs": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Create an organization", "operationId": "adminCreateOrg", "parameters": [ { "type": "string", "description": "username of the user that will own the created organization", "name": "username", "in": "path", "required": true } ], "responses": { "201": { "$ref": "#/responses/Organization" }, "403": { "$ref": "#/responses/forbidden" }, "422": { "$ref": "#/responses/validationError" } } } }, "/admin/users/{username}/repos": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Create a repository on behalf a user", "operationId": "adminCreateRepo", "parameters": [ { "type": "string", "description": "username of the user. This user will own the created repository", "name": "username", "in": "path", "required": true } ], "responses": { "201": { "$ref": "#/responses/Repository" }, "403": { "$ref": "#/responses/forbidden" }, "422": { "$ref": "#/responses/validationError" } } } }, "/markdown": { "post": { "consumes": [ "application/json" ], "produces": [ "text/html" ], "tags": [ "miscellaneous" ], "summary": "Render a markdown document as HTML", "operationId": "renderMarkdown", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/MarkdownOption" } } ], "responses": { "200": { "$ref": "#/responses/MarkdownRender" }, "422": { "$ref": "#/responses/validationError" } } } }, "/markdown/raw": { "post": { "consumes": [ "text/plain" ], "produces": [ "text/html" ], "tags": [ "miscellaneous" ], "summary": "Render raw markdown as HTML", "operationId": "renderMarkdownRaw", "parameters": [ { "description": "Request body to render", "name": "body", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "$ref": "#/responses/MarkdownRender" }, "422": { "$ref": "#/responses/validationError" } } } }, "/org/{org}/repos": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Create a repository in an organization", "operationId": "createOrgRepo", "parameters": [ { "type": "string", "description": "name of organization", "name": "org", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateRepoOption" } } ], "responses": { "201": { "$ref": "#/responses/Repository" }, "403": { "$ref": "#/responses/forbidden" }, "422": { "$ref": "#/responses/validationError" } } } }, "/orgs/{org}": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Get an organization", "operationId": "orgGet", "parameters": [ { "type": "string", "description": "name of the organization to get", "name": "org", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/Organization" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Edit an organization", "operationId": "orgEdit", "parameters": [ { "type": "string", "description": "name of the organization to edit", "name": "org", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/EditOrgOption" } } ], "responses": { "200": { "$ref": "#/responses/Organization" } } } }, "/orgs/{org}/hooks": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List an organization's webhooks", "operationId": "orgListHooks", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/HookList" } } } }, "/orgs/{org}/hooks/": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Create a hook", "operationId": "orgCreateHook", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true } ], "responses": { "201": { "$ref": "#/responses/Hook" } } } }, "/orgs/{org}/hooks/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Get a hook", "operationId": "orgGetHook", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "integer", "description": "id of the hook to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/Hook" } } }, "delete": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Delete a hook", "operationId": "orgDeleteHook", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "integer", "description": "id of the hook to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Update a hook", "operationId": "orgEditHook", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "integer", "description": "id of the hook to update", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/Hook" } } } }, "/orgs/{org}/members": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List an organization's members", "operationId": "orgListMembers", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/UserList" } } } }, "/orgs/{org}/members/{username}": { "get": { "tags": [ "organization" ], "summary": "Check if a user is a member of an organization", "operationId": "orgIsMember", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "string", "description": "username of the user", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "description": "user is a member", "schema": { "$ref": "#/responses/empty" } }, "404": { "description": "user is not a member", "schema": { "$ref": "#/responses/empty" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Remove a member from an organization", "operationId": "orgDeleteMember", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "string", "description": "username of the user", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "description": "member removed", "schema": { "$ref": "#/responses/empty" } } } } }, "/orgs/{org}/public_members": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List an organization's public members", "operationId": "orgListPublicMembers", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/UserList" } } } }, "/orgs/{org}/public_members/{username}": { "get": { "tags": [ "organization" ], "summary": "Check if a user is a public member of an organization", "operationId": "orgIsPublicMember", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "string", "description": "username of the user", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "description": "user is a public member", "schema": { "$ref": "#/responses/empty" } }, "404": { "description": "user is not a public member", "schema": { "$ref": "#/responses/empty" } } } }, "put": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Publicize a user's membership", "operationId": "orgPublicizeMember", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "string", "description": "username of the user", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "description": "membership publicized", "schema": { "$ref": "#/responses/empty" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Conceal a user's membership", "operationId": "orgConcealMember", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "type": "string", "description": "username of the user", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } } }, "/orgs/{org}/repos": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List an organization's repos", "operationId": "orgListRepos", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/RepositoryList" } } } }, "/orgs/{org}/teams": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List an organization's teams", "operationId": "orgListTeams", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/TeamList" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Create a team", "operationId": "orgCreateTeam", "parameters": [ { "type": "string", "description": "name of the organization", "name": "org", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateTeamOption" } } ], "responses": { "201": { "$ref": "#/responses/Team" } } } }, "/repos/migrate": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Migrate a remote git repository", "operationId": "repoMigrate", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/MigrateRepoForm" } } ], "responses": { "201": { "$ref": "#/responses/Repository" } } } }, "/repos/search": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Search for repositories", "operationId": "repoSearch", "parameters": [ { "type": "string", "description": "keyword", "name": "q", "in": "query" }, { "type": "integer", "description": "search only for repos that the user with the given id owns or contributes to", "name": "uid", "in": "query" }, { "type": "integer", "description": "page number of results to return (1-based)", "name": "page", "in": "query" }, { "type": "integer", "description": "page size of results, maximum page size is 50", "name": "limit", "in": "query" }, { "type": "string", "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"", "name": "mode", "in": "query" }, { "type": "boolean", "description": "if `uid` is given, search only for repos that the user owns", "name": "exclusive", "in": "query" } ], "responses": { "200": { "$ref": "#/responses/SearchResults" }, "422": { "$ref": "#/responses/validationError" } } } }, "/repos/{owner}/{repo}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a repository", "operationId": "repoGet", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/Repository" } } }, "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Delete a repository", "operationId": "repoDelete", "parameters": [ { "type": "string", "description": "owner of the repo to delete", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo to delete", "name": "repo", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" } } } }, "/repos/{owner}/{repo}/archive/{archive}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get an archive of a repository", "operationId": "repoGetArchive", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "archive to download, consisting of a git reference and archive", "name": "archive", "in": "path", "required": true } ], "responses": { "200": { "description": "success" } } } }, "/repos/{owner}/{repo}/branches": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repository's branches", "operationId": "repoListBranches", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/BranchList" } } } }, "/repos/{owner}/{repo}/branches/{branch}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repository's branches", "operationId": "repoGetBranch", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "branch to get", "name": "branch", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/Branch" } } } }, "/repos/{owner}/{repo}/collaborators": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repository's collaborators", "operationId": "repoListCollaborators", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/UserList" } } } }, "/repos/{owner}/{repo}/collaborators/{collaborator}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Check if a user is a collaborator of a repository", "operationId": "repoCheckCollaborator", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "username of the collaborator", "name": "collaborator", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/empty" } } }, "put": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Add a collaborator to a repository", "operationId": "repoAddCollaborator", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "username of the collaborator to add", "name": "collaborator", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/AddCollaboratorOption" } } ], "responses": { "204": { "$ref": "#/responses/empty" } } }, "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Delete a collaborator from a repository", "operationId": "repoDeleteCollaborator", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "username of the collaborator to delete", "name": "collaborator", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } } }, "/repos/{owner}/{repo}/commits/{ref}/statuses": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a commit's combined status, by branch/tag/commit reference", "operationId": "repoGetCombinedStatusByRef", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "name of branch/tag/commit", "name": "ref", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/Status" } } } }, "/repos/{owner}/{repo}/editorconfig/{filepath}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get the EditorConfig definitions of a file in a repository", "operationId": "repoGetEditorConfig", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "filepath of file to get", "name": "filepath", "in": "path", "required": true } ], "responses": { "200": { "description": "success" } } } }, "/repos/{owner}/{repo}/forks": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repository's forks", "operationId": "listForks", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/RepositoryList" } } }, "post": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Fork a repository", "operationId": "createFork", "parameters": [ { "type": "string", "description": "owner of the repo to fork", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo to fork", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateForkOption" } } ], "responses": { "202": { "$ref": "#/responses/Repository" } } } }, "/repos/{owner}/{repo}/hooks": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List the hooks in a repository", "operationId": "repoListHooks", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/HookList" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Create a hook", "operationId": "repoCreateHook", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateHookOption" } } ], "responses": { "201": { "$ref": "#/responses/Hook" } } } }, "/repos/{owner}/{repo}/hooks/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a hook", "operationId": "repoGetHook", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the hook to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/Hook" } } }, "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Delete a hook in a repository", "operationId": "repoDeleteHook", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the hook to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" } } }, "patch": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Edit a hook in a repository", "operationId": "repoEditHook", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the hook", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/EditHookOption" } } ], "responses": { "200": { "$ref": "#/responses/Hook" } } } }, "/repos/{owner}/{repo}/hooks/{id}/tests": { "post": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Test a push webhook", "operationId": "repoTestHook", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the hook to test", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } } }, "/repos/{owner}/{repo}/issues": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "List a repository's issues", "operationId": "issueListIssues", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "whether issue is open or closed", "name": "state", "in": "query" }, { "type": "integer", "description": "page number of requested issues", "name": "page", "in": "query" }, { "type": "string", "description": "search string", "name": "q", "in": "query" } ], "responses": { "200": { "$ref": "#/responses/IssueList" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Create an issue", "operationId": "issueCreateIssue", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateIssueOption" } } ], "responses": { "201": { "$ref": "#/responses/Issue" } } } }, "/repos/{owner}/{repo}/issues/comments": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "List all comments in a repository", "operationId": "issueGetRepoComments", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "if provided, only comments updated since the provided time are returned.", "name": "string", "in": "query" } ], "responses": { "200": { "$ref": "#/responses/CommentList" } } } }, "/repos/{owner}/{repo}/issues/comments/{id}": { "delete": { "tags": [ "issue" ], "summary": "Delete a comment", "operationId": "issueDeleteComment", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of comment to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Edit a comment", "operationId": "issueEditComment", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the comment to edit", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/EditIssueCommentOption" } } ], "responses": { "200": { "$ref": "#/responses/Comment" } } } }, "/repos/{owner}/{repo}/issues/{id}/times": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "List an issue's tracked times", "operationId": "issueTrackedTimes", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/TrackedTimeList" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Add a tracked time to a issue", "operationId": "issueAddTime", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue to add tracked time to", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/AddTimeOption" } } ], "responses": { "200": { "$ref": "#/responses/TrackedTime" }, "400": { "$ref": "#/responses/error" }, "403": { "$ref": "#/responses/error" } } } }, "/repos/{owner}/{repo}/issues/{index}": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Get an issue", "operationId": "issueGetIssue", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue to get", "name": "index", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/Issue" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Edit an issue", "operationId": "issueEditIssue", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue to edit", "name": "index", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/EditIssueOption" } } ], "responses": { "201": { "$ref": "#/responses/Issue" } } } }, "/repos/{owner}/{repo}/issues/{index}/comments": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "List all comments on an issue", "operationId": "issueGetComments", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "index", "in": "path", "required": true }, { "type": "string", "description": "if provided, only comments updated since the specified time are returned.", "name": "string", "in": "query" } ], "responses": { "200": { "$ref": "#/responses/CommentList" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Add a comment to an issue", "operationId": "issueCreateComment", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "index", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateIssueCommentOption" } } ], "responses": { "201": { "$ref": "#/responses/Comment" } } } }, "/repos/{owner}/{repo}/issues/{index}/comments/{id}": { "delete": { "tags": [ "issue" ], "summary": "Delete a comment", "operationId": "issueDeleteCommentDeprecated", "deprecated": true, "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "this parameter is ignored", "name": "index", "in": "path", "required": true }, { "type": "integer", "description": "id of comment to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Edit a comment", "operationId": "issueEditCommentDeprecated", "deprecated": true, "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "this parameter is ignored", "name": "index", "in": "path", "required": true }, { "type": "integer", "description": "id of the comment to edit", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/EditIssueCommentOption" } } ], "responses": { "200": { "$ref": "#/responses/Comment" } } } }, "/repos/{owner}/{repo}/issues/{index}/labels": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Get an issue's labels", "operationId": "issueGetLabels", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "index", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/LabelList" }, "404": { "$ref": "#/responses/notFound" } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Replace an issue's labels", "operationId": "issueReplaceLabels", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "index", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/IssueLabelsOption" } } ], "responses": { "200": { "$ref": "#/responses/LabelList" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Add a label to an issue", "operationId": "issueAddLabel", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "index", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/IssueLabelsOption" } } ], "responses": { "200": { "$ref": "#/responses/LabelList" } } }, "delete": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Remove all labels from an issue", "operationId": "issueClearLabels", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "index", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } } }, "/repos/{owner}/{repo}/issues/{index}/labels/{id}": { "delete": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Remove a label from an issue", "operationId": "issueRemoveLabel", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the issue", "name": "index", "in": "path", "required": true }, { "type": "integer", "description": "id of the label to remove", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } } }, "/repos/{owner}/{repo}/keys": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repository's keys", "operationId": "repoListKeys", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/DeployKeyList" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Add a key to a repository", "operationId": "repoCreateKey", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateKeyOption" } } ], "responses": { "201": { "$ref": "#/responses/DeployKey" } } } }, "/repos/{owner}/{repo}/keys/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a repository's key by id", "operationId": "repoGetKey", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the key to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/DeployKey" } } }, "delete": { "tags": [ "repository" ], "summary": "Delete a key from a repository", "operationId": "repoDeleteKey", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the key to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } } }, "/repos/{owner}/{repo}/labels": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Get all of a repository's labels", "operationId": "issueListLabels", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/LabelList" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Create a label", "operationId": "issueCreateLabel", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateLabelOption" } } ], "responses": { "201": { "$ref": "#/responses/Label" } } } }, "/repos/{owner}/{repo}/labels/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Get a single label", "operationId": "issueGetLabel", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the label to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/Label" } } }, "delete": { "tags": [ "issue" ], "summary": "Delete a label", "operationId": "issueDeleteLabel", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the label to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Update a label", "operationId": "issueEditLabel", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the label to edit", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/EditLabelOption" } } ], "responses": { "200": { "$ref": "#/responses/Label" } } } }, "/repos/{owner}/{repo}/milestones": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Get all of a repository's milestones", "operationId": "issueGetMilestonesList", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/MilestoneList" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Create a milestone", "operationId": "issueCreateMilestone", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateMilestoneOption" } } ], "responses": { "201": { "$ref": "#/responses/Milestone" } } } }, "/repos/{owner}/{repo}/milestones/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Get a milestone", "operationId": "issueGetMilestone", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the milestone", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/Milestone" } } }, "delete": { "tags": [ "issue" ], "summary": "Delete a milestone", "operationId": "issueDeleteMilestone", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the milestone to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "issue" ], "summary": "Update a milestone", "operationId": "issueEditMilestone", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the milestone", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/EditMilestoneOption" } } ], "responses": { "200": { "$ref": "#/responses/Milestone" } } } }, "/repos/{owner}/{repo}/mirror-sync": { "post": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Sync a mirrored repository", "operationId": "repoMirrorSync", "parameters": [ { "type": "string", "description": "owner of the repo to sync", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo to sync", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/empty" } } } }, "/repos/{owner}/{repo}/pulls": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repo's pull requests", "operationId": "repoListPullRequests", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/PullRequestList" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Create a pull request", "operationId": "repoCreatePullRequest", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreatePullRequestOption" } } ], "responses": { "201": { "$ref": "#/responses/PullRequest" } } } }, "/repos/{owner}/{repo}/pulls/{index}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a pull request", "operationId": "repoGetPullRequest", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the pull request to get", "name": "index", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/PullRequest" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Update a pull request", "operationId": "repoEditPullRequest", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the pull request to edit", "name": "index", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/EditPullRequestOption" } } ], "responses": { "201": { "$ref": "#/responses/PullRequest" } } } }, "/repos/{owner}/{repo}/pulls/{index}/merge": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Check if a pull request has been merged", "operationId": "repoPullRequestIsMerged", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the pull request", "name": "index", "in": "path", "required": true } ], "responses": { "204": { "description": "pull request has been merged", "schema": { "$ref": "#/responses/empty" } }, "404": { "description": "pull request has not been merged", "schema": { "$ref": "#/responses/empty" } } } }, "post": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Merge a pull request", "operationId": "repoMergePullRequest", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "index of the pull request to merge", "name": "index", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/empty" }, "405": { "$ref": "#/responses/empty" } } } }, "/repos/{owner}/{repo}/raw/{filepath}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a file from a repository", "operationId": "repoGetRawFile", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "filepath of the file to get", "name": "filepath", "in": "path", "required": true } ], "responses": { "200": { "description": "success" } } } }, "/repos/{owner}/{repo}/releases": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repo's releases", "operationId": "repoListReleases", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/ReleaseList" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Create a release", "operationId": "repoCreateRelease", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateReleaseOption" } } ], "responses": { "201": { "$ref": "#/responses/Release" } } } }, "/repos/{owner}/{repo}/releases/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a release", "operationId": "repoGetRelease", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/Release" } } }, "delete": { "tags": [ "repository" ], "summary": "Delete a release", "operationId": "repoDeleteRelease", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Update a release", "operationId": "repoEditRelease", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release to edit", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/EditReleaseOption" } } ], "responses": { "200": { "$ref": "#/responses/Release" } } } }, "/repos/{owner}/{repo}/releases/{id}/assets": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List release's attachments", "operationId": "repoListReleaseAttachments", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/AttachmentList" } } }, "post": { "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Create a release attachment", "operationId": "repoCreateReleaseAttachment", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "name of the attachment", "name": "name", "in": "query" }, { "type": "file", "description": "attachment to upload", "name": "attachment", "in": "formData", "required": true } ], "responses": { "201": { "$ref": "#/responses/Attachment" } } } }, "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a release attachment", "operationId": "repoGetReleaseAttachment", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "id of the attachment to get", "name": "attachment_id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/Attachment" } } }, "delete": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Delete a release attachment", "operationId": "repoDeleteReleaseAttachment", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "id of the attachment to delete", "name": "attachment_id", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Edit a release attachment", "operationId": "repoEditReleaseAttachment", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "integer", "description": "id of the release", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "id of the attachment to edit", "name": "attachment_id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/EditAttachmentOptions" } } ], "responses": { "201": { "$ref": "#/responses/Attachment" } } } }, "/repos/{owner}/{repo}/stargazers": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repo's stargazers", "operationId": "repoListStargazers", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/UserList" } } } }, "/repos/{owner}/{repo}/statuses/{sha}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a commit's statuses", "operationId": "repoListStatuses", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "sha of the commit", "name": "sha", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/StatusList" } } }, "post": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Create a commit status", "operationId": "repoCreateStatus", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "sha of the commit", "name": "sha", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateStatusOption" } } ], "responses": { "200": { "$ref": "#/responses/StatusList" } } } }, "/repos/{owner}/{repo}/subscribers": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repo's watchers", "operationId": "repoListSubscribers", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/UserList" } } } }, "/repos/{owner}/{repo}/subscription": { "get": { "tags": [ "repository" ], "summary": "Check if the current user is watching a repo", "operationId": "userCurrentCheckSubscription", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/WatchInfo" } } }, "put": { "tags": [ "repository" ], "summary": "Watch a repo", "operationId": "userCurrentPutSubscription", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/WatchInfo" } } }, "delete": { "tags": [ "repository" ], "summary": "Unwatch a repo", "operationId": "userCurrentDeleteSubscription", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } } }, "/repos/{owner}/{repo}/times": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "List a repo's tracked times", "operationId": "repoTrackedTimes", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/TrackedTimeList" } } } }, "/repos/{owner}/{repo}/times/{user}": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List a user's tracked times in a repo", "operationId": "userTrackedTimes", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true }, { "type": "string", "description": "username of user", "name": "user", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/TrackedTimeList" } } } }, "/repositories/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "Get a repository by id", "operationId": "repoGetByID", "parameters": [ { "type": "integer", "description": "id of the repo to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/Repository" } } } }, "/teams/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Get a team", "operationId": "orgGetTeam", "parameters": [ { "type": "integer", "description": "id of the team to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/Team" } } }, "delete": { "tags": [ "organization" ], "summary": "Delete a team", "operationId": "orgDeleteTeam", "parameters": [ { "type": "integer", "description": "id of the team to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "team deleted", "schema": { "$ref": "#/responses/empty" } } } }, "patch": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Edit a team", "operationId": "orgEditTeam", "parameters": [ { "type": "integer", "description": "id of the team to edit", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/EditTeamOption" } } ], "responses": { "200": { "$ref": "#/responses/Team" } } } }, "/teams/{id}/members": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List a team's members", "operationId": "orgListTeamMembers", "parameters": [ { "type": "integer", "description": "id of the team", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/UserList" } } } }, "/teams/{id}/members/{username}": { "put": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Add a team member", "operationId": "orgAddTeamMember", "parameters": [ { "type": "integer", "description": "id of the team", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "username of the user to add", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } }, "delete": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Remove a team member", "operationId": "orgRemoveTeamMember", "parameters": [ { "type": "integer", "description": "id of the team", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "username of the user to remove", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } } }, "/teams/{id}/repos": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List a team's repos", "operationId": "orgListTeamRepos", "parameters": [ { "type": "integer", "description": "id of the team", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/RepositoryList" } } } }, "/teams/{id}/repos/{org}/{repo}": { "put": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Add a repository to a team", "operationId": "orgAddTeamRepository", "parameters": [ { "type": "integer", "description": "id of the team", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "organization that owns the repo to add", "name": "org", "in": "path", "required": true }, { "type": "string", "description": "name of the repo to add", "name": "repo", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } }, "delete": { "description": "This does not delete the repository, it only removes the repository from the team.", "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "Remove a repository from a team", "operationId": "orgRemoveTeamRepository", "parameters": [ { "type": "integer", "description": "id of the team", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "organization that owns the repo to remove", "name": "org", "in": "path", "required": true }, { "type": "string", "description": "name of the repo to remove", "name": "repo", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } } }, "/topics/search": { "get": { "produces": [ "application/json" ], "tags": [ "repository" ], "summary": "search topics via keyword", "operationId": "topicSearch", "parameters": [ { "type": "string", "description": "keywords to search", "name": "q", "in": "query", "required": true } ], "responses": { "200": { "$ref": "#/responses/Repository" } } } }, "/user": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get the authenticated user", "operationId": "userGetCurrent", "responses": { "200": { "$ref": "#/responses/User" } } } }, "/user/emails": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the authenticated user's email addresses", "operationId": "userListEmails", "responses": { "200": { "$ref": "#/responses/EmailList" } } }, "post": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Add email addresses", "operationId": "userAddEmail", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateEmailOption" } } ], "responses": { "201": { "$ref": "#/responses/EmailList" } } }, "delete": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Delete email addresses", "operationId": "userDeleteEmail", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/DeleteEmailOption" } } ], "responses": { "204": { "$ref": "#/responses/empty" } } } }, "/user/followers": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the authenticated user's followers", "operationId": "userCurrentListFollowers", "responses": { "200": { "$ref": "#/responses/UserList" } } } }, "/user/following": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the users that the authenticated user is following", "operationId": "userCurrentListFollowing", "responses": { "200": { "$ref": "#/responses/UserList" } } } }, "/user/following/{username}": { "get": { "tags": [ "user" ], "summary": "Check whether a user is followed by the authenticated user", "operationId": "userCurrentCheckFollowing", "parameters": [ { "type": "string", "description": "username of followed user", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" } } }, "put": { "tags": [ "user" ], "summary": "Follow a user", "operationId": "userCurrentPutFollow", "parameters": [ { "type": "string", "description": "username of user to follow", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } }, "delete": { "tags": [ "user" ], "summary": "Unfollow a user", "operationId": "userCurrentDeleteFollow", "parameters": [ { "type": "string", "description": "username of user to unfollow", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } } }, "/user/gpg_keys": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the authenticated user's GPG keys", "operationId": "userCurrentListGPGKeys", "responses": { "200": { "$ref": "#/responses/GPGKeyList" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Create a GPG key", "operationId": "userCurrentPostGPGKey", "parameters": [ { "name": "Form", "in": "body", "schema": { "$ref": "#/definitions/CreateGPGKeyOption" } } ], "responses": { "201": { "$ref": "#/responses/GPGKey" }, "422": { "$ref": "#/responses/validationError" } } } }, "/user/gpg_keys/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get a GPG key", "operationId": "userCurrentGetGPGKey", "parameters": [ { "type": "integer", "description": "id of key to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/GPGKey" }, "404": { "$ref": "#/responses/notFound" } } }, "delete": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Remove a GPG key", "operationId": "userCurrentDeleteGPGKey", "parameters": [ { "type": "integer", "description": "id of key to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" } } } }, "/user/keys": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the authenticated user's public keys", "operationId": "userCurrentListKeys", "responses": { "200": { "$ref": "#/responses/PublicKeyList" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Create a public key", "operationId": "userCurrentPostKey", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateKeyOption" } } ], "responses": { "201": { "$ref": "#/responses/PublicKey" }, "422": { "$ref": "#/responses/validationError" } } } }, "/user/keys/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get a public key", "operationId": "userCurrentGetKey", "parameters": [ { "type": "integer", "description": "id of key to get", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/PublicKey" }, "404": { "$ref": "#/responses/notFound" } } }, "delete": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Delete a public key", "operationId": "userCurrentDeleteKey", "parameters": [ { "type": "integer", "description": "id of key to delete", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/notFound" } } } }, "/user/orgs": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List the current user's organizations", "operationId": "orgListCurrentUserOrgs", "responses": { "200": { "$ref": "#/responses/OrganizationList" } } } }, "/user/repos": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the repos that the authenticated user owns or has access to", "operationId": "userCurrentListRepos", "responses": { "200": { "$ref": "#/responses/RepositoryList" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "repository", "user" ], "summary": "Create a repository", "operationId": "createCurrentUserRepo", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateRepoOption" } } ], "responses": { "201": { "$ref": "#/responses/Repository" } } } }, "/user/starred": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "The repos that the authenticated user has starred", "operationId": "userCurrentListStarred", "responses": { "200": { "$ref": "#/responses/RepositoryList" } } } }, "/user/starred/{owner}/{repo}": { "get": { "tags": [ "user" ], "summary": "Whether the authenticated is starring the repo", "operationId": "userCurrentCheckStarring", "parameters": [ { "type": "string", "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo", "name": "repo", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" } } }, "put": { "tags": [ "user" ], "summary": "Star the given repo", "operationId": "userCurrentPutStar", "parameters": [ { "type": "string", "description": "owner of the repo to star", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo to star", "name": "repo", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } }, "delete": { "tags": [ "user" ], "summary": "Unstar the given repo", "operationId": "userCurrentDeleteStar", "parameters": [ { "type": "string", "description": "owner of the repo to unstar", "name": "owner", "in": "path", "required": true }, { "type": "string", "description": "name of the repo to unstar", "name": "repo", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } } }, "/user/subscriptions": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List repositories watched by the authenticated user", "operationId": "userCurrentListSubscriptions", "responses": { "200": { "$ref": "#/responses/RepositoryList" } } } }, "/user/times": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the current user's tracked times", "operationId": "userCurrentTrackedTimes", "responses": { "200": { "$ref": "#/responses/TrackedTimeList" } } } }, "/user/{username}/orgs": { "get": { "produces": [ "application/json" ], "tags": [ "organization" ], "summary": "List a user's organizations", "operationId": "orgListUserOrgs", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/OrganizationList" } } } }, "/users/search": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Search for users", "operationId": "userSearch", "parameters": [ { "type": "string", "description": "keyword", "name": "q", "in": "query" }, { "type": "integer", "description": "maximum number of users to return", "name": "limit", "in": "query" } ], "responses": { "200": { "$ref": "#/responses/UserList" } } } }, "/users/{follower}/following/{followee}": { "get": { "tags": [ "user" ], "summary": "Check if one user is following another user", "operationId": "userCheckFollowing", "parameters": [ { "type": "string", "description": "username of following user", "name": "follower", "in": "path", "required": true }, { "type": "string", "description": "username of followed user", "name": "followee", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" }, "404": { "$ref": "#/responses/notFound" } } } }, "/users/{username}": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get a user", "operationId": "userGet", "parameters": [ { "type": "string", "description": "username of user to get", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/User" }, "404": { "$ref": "#/responses/notFound" } } } }, "/users/{username}/followers": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the given user's followers", "operationId": "userListFollowers", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/UserList" } } } }, "/users/{username}/following": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the users that the given user is following", "operationId": "userListFollowing", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/UserList" } } } }, "/users/{username}/gpg_keys": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the given user's GPG keys", "operationId": "userListGPGKeys", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/GPGKeyList" } } } }, "/users/{username}/keys": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the given user's public keys", "operationId": "userListKeys", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/PublicKeyList" } } } }, "/users/{username}/repos": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the repos owned by the given user", "operationId": "userListRepos", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/RepositoryList" } } } }, "/users/{username}/starred": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "The repos that the given user has starred", "operationId": "userListStarred", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/RepositoryList" } } } }, "/users/{username}/subscriptions": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the repositories watched by a user", "operationId": "userListSubscriptions", "parameters": [ { "type": "string", "description": "username of the user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/RepositoryList" } } } }, "/users/{username}/tokens": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "List the authenticated user's access tokens", "operationId": "userGetTokens", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/AccessTokenList" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Create an access token", "operationId": "userCreateToken", "parameters": [ { "type": "string", "x-go-name": "Name", "description": "username of user", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/AccessToken" } } } }, "/users/{username}/tokens/{token}": { "delete": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "delete an access token", "operationId": "userDeleteAccessToken", "parameters": [ { "type": "string", "description": "username of user", "name": "username", "in": "path", "required": true }, { "type": "integer", "description": "token to be deleted", "name": "token", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" } } } }, "/version": { "get": { "produces": [ "application/json" ], "tags": [ "miscellaneous" ], "summary": "Returns the version of the Gitea application", "operationId": "getVersion", "responses": { "200": { "$ref": "#/responses/ServerVersion" } } } } }, "definitions": { "AddCollaboratorOption": { "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository", "type": "object", "properties": { "permission": { "type": "string", "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "AddTimeOption": { "description": "AddTimeOption options for adding time to an issue", "type": "object", "required": [ "time" ], "properties": { "time": { "description": "time in seconds", "type": "integer", "format": "int64", "x-go-name": "Time" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Attachment": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Branch": { "description": "Branch represents a repository branch", "type": "object", "properties": { "commit": { "$ref": "#/definitions/PayloadCommit" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Comment": { "description": "Comment represents a comment on a commit or issue", "type": "object", "properties": { "body": { "type": "string", "x-go-name": "Body" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_url": { "type": "string", "x-go-name": "IssueURL" }, "pull_request_url": { "type": "string", "x-go-name": "PRURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "user": { "$ref": "#/definitions/User" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateEmailOption": { "description": "CreateEmailOption options when creating email addresses", "type": "object", "properties": { "emails": { "description": "email addresses to add", "type": "array", "items": { "type": "string" }, "x-go-name": "Emails" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateForkOption": { "description": "CreateForkOption options for creating a fork", "type": "object", "properties": { "organization": { "description": "organization name, if forking into an organization", "type": "string", "x-go-name": "Organization" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateGPGKeyOption": { "description": "CreateGPGKeyOption options create user GPG key", "type": "object", "required": [ "armored_public_key" ], "properties": { "armored_public_key": { "description": "An armored GPG key to add", "type": "string", "uniqueItems": true, "x-go-name": "ArmoredKey" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateHookOption": { "description": "CreateHookOption options when create a hook", "type": "object", "required": [ "type", "config" ], "properties": { "active": { "type": "boolean", "default": false, "x-go-name": "Active" }, "config": { "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "Config" }, "events": { "type": "array", "items": { "type": "string" }, "x-go-name": "Events" }, "type": { "type": "string", "enum": [ "gitea", "gogs", "slack", "discord" ], "x-go-name": "Type" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateIssueCommentOption": { "description": "CreateIssueCommentOption options for creating a comment on an issue", "type": "object", "required": [ "body" ], "properties": { "body": { "type": "string", "x-go-name": "Body" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateIssueOption": { "description": "CreateIssueOption options to create one issue", "type": "object", "required": [ "title" ], "properties": { "assignee": { "description": "username of assignee", "type": "string", "x-go-name": "Assignee" }, "assignees": { "type": "array", "items": { "type": "string" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "closed": { "type": "boolean", "x-go-name": "Closed" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "labels": { "description": "list of label ids", "type": "array", "items": { "type": "integer", "format": "int64" }, "x-go-name": "Labels" }, "milestone": { "description": "milestone id", "type": "integer", "format": "int64", "x-go-name": "Milestone" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateKeyOption": { "description": "CreateKeyOption options when creating a key", "type": "object", "required": [ "title", "key" ], "properties": { "key": { "description": "An armored SSH key to add", "type": "string", "uniqueItems": true, "x-go-name": "Key" }, "read_only": { "description": "Describe if the key has only read access or read/write", "type": "boolean", "x-go-name": "ReadOnly" }, "title": { "description": "Title of the key to add", "type": "string", "uniqueItems": true, "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateLabelOption": { "description": "CreateLabelOption options for creating a label", "type": "object", "required": [ "name", "color" ], "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "#00aabb" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateMilestoneOption": { "description": "CreateMilestoneOption options for creating a milestone", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateOrgOption": { "description": "CreateOrgOption options for creating an organization", "type": "object", "required": [ "username" ], "properties": { "description": { "type": "string", "x-go-name": "Description" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "location": { "type": "string", "x-go-name": "Location" }, "username": { "type": "string", "x-go-name": "UserName" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreatePullRequestOption": { "description": "CreatePullRequestOption options when creating a pull request", "type": "object", "properties": { "assignee": { "type": "string", "x-go-name": "Assignee" }, "assignees": { "type": "array", "items": { "type": "string" }, "x-go-name": "Assignees" }, "base": { "type": "string", "x-go-name": "Base" }, "body": { "type": "string", "x-go-name": "Body" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "head": { "type": "string", "x-go-name": "Head" }, "labels": { "type": "array", "items": { "type": "integer", "format": "int64" }, "x-go-name": "Labels" }, "milestone": { "type": "integer", "format": "int64", "x-go-name": "Milestone" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateReleaseOption": { "description": "CreateReleaseOption options when creating a release", "type": "object", "required": [ "tag_name" ], "properties": { "body": { "type": "string", "x-go-name": "Note" }, "draft": { "type": "boolean", "x-go-name": "IsDraft" }, "name": { "type": "string", "x-go-name": "Title" }, "prerelease": { "type": "boolean", "x-go-name": "IsPrerelease" }, "tag_name": { "type": "string", "x-go-name": "TagName" }, "target_commitish": { "type": "string", "x-go-name": "Target" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateRepoOption": { "description": "CreateRepoOption options when creating repository", "type": "object", "required": [ "name" ], "properties": { "auto_init": { "description": "Whether the repository should be auto-intialized?", "type": "boolean", "x-go-name": "AutoInit" }, "description": { "description": "Description of the repository to create", "type": "string", "x-go-name": "Description" }, "gitignores": { "description": "Gitignores to use", "type": "string", "x-go-name": "Gitignores" }, "license": { "description": "License to use", "type": "string", "x-go-name": "License" }, "name": { "description": "Name of the repository to create", "type": "string", "uniqueItems": true, "x-go-name": "Name" }, "private": { "description": "Whether the repository is private", "type": "boolean", "x-go-name": "Private" }, "readme": { "description": "Readme of the repository to create", "type": "string", "x-go-name": "Readme" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateStatusOption": { "description": "CreateStatusOption holds the information needed to create a new Status for a Commit", "type": "object", "properties": { "context": { "type": "string", "x-go-name": "Context" }, "description": { "type": "string", "x-go-name": "Description" }, "state": { "$ref": "#/definitions/StatusState" }, "target_url": { "type": "string", "x-go-name": "TargetURL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateTeamOption": { "description": "CreateTeamOption options for creating a team", "type": "object", "required": [ "name" ], "properties": { "description": { "type": "string", "x-go-name": "Description" }, "name": { "type": "string", "x-go-name": "Name" }, "permission": { "type": "string", "enum": [ "read", "write", "admin" ], "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "CreateUserOption": { "description": "CreateUserOption create user options", "type": "object", "required": [ "username", "email", "password" ], "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "login_name": { "type": "string", "x-go-name": "LoginName" }, "password": { "type": "string", "x-go-name": "Password" }, "send_notify": { "type": "boolean", "x-go-name": "SendNotify" }, "source_id": { "type": "integer", "format": "int64", "x-go-name": "SourceID" }, "username": { "type": "string", "x-go-name": "Username" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "DeleteEmailOption": { "description": "DeleteEmailOption options when deleting email addresses", "type": "object", "properties": { "emails": { "description": "email addresses to delete", "type": "array", "items": { "type": "string" }, "x-go-name": "Emails" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "DeployKey": { "description": "DeployKey a deploy key", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "read_only": { "type": "boolean", "x-go-name": "ReadOnly" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditAttachmentOptions": { "description": "EditAttachmentOptions options for editing attachments", "type": "object", "properties": { "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditHookOption": { "description": "EditHookOption options when modify one hook", "type": "object", "properties": { "active": { "type": "boolean", "x-go-name": "Active" }, "config": { "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "Config" }, "events": { "type": "array", "items": { "type": "string" }, "x-go-name": "Events" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditIssueCommentOption": { "description": "EditIssueCommentOption options for editing a comment", "type": "object", "required": [ "body" ], "properties": { "body": { "type": "string", "x-go-name": "Body" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditIssueOption": { "description": "EditIssueOption options for editing an issue", "type": "object", "properties": { "assignee": { "type": "string", "x-go-name": "Assignee" }, "assignees": { "type": "array", "items": { "type": "string" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "milestone": { "type": "integer", "format": "int64", "x-go-name": "Milestone" }, "state": { "type": "string", "x-go-name": "State" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditLabelOption": { "description": "EditLabelOption options for editing a label", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color" }, "name": { "type": "string", "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditMilestoneOption": { "description": "EditMilestoneOption options for editing a milestone", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "state": { "type": "string", "x-go-name": "State" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditOrgOption": { "description": "EditOrgOption options for editing an organization", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "location": { "type": "string", "x-go-name": "Location" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditPullRequestOption": { "description": "EditPullRequestOption options when modify pull request", "type": "object", "properties": { "assignee": { "type": "string", "x-go-name": "Assignee" }, "assignees": { "type": "array", "items": { "type": "string" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "labels": { "type": "array", "items": { "type": "integer", "format": "int64" }, "x-go-name": "Labels" }, "milestone": { "type": "integer", "format": "int64", "x-go-name": "Milestone" }, "state": { "type": "string", "x-go-name": "State" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditReleaseOption": { "description": "EditReleaseOption options when editing a release", "type": "object", "properties": { "body": { "type": "string", "x-go-name": "Note" }, "draft": { "type": "boolean", "x-go-name": "IsDraft" }, "name": { "type": "string", "x-go-name": "Title" }, "prerelease": { "type": "boolean", "x-go-name": "IsPrerelease" }, "tag_name": { "type": "string", "x-go-name": "TagName" }, "target_commitish": { "type": "string", "x-go-name": "Target" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditTeamOption": { "description": "EditTeamOption options for editing a team", "type": "object", "required": [ "name" ], "properties": { "description": { "type": "string", "x-go-name": "Description" }, "name": { "type": "string", "x-go-name": "Name" }, "permission": { "type": "string", "enum": [ "read", "write", "admin" ], "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "EditUserOption": { "description": "EditUserOption edit user options", "type": "object", "required": [ "email" ], "properties": { "active": { "type": "boolean", "x-go-name": "Active" }, "admin": { "type": "boolean", "x-go-name": "Admin" }, "allow_git_hook": { "type": "boolean", "x-go-name": "AllowGitHook" }, "allow_import_local": { "type": "boolean", "x-go-name": "AllowImportLocal" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "location": { "type": "string", "x-go-name": "Location" }, "login_name": { "type": "string", "x-go-name": "LoginName" }, "max_repo_creation": { "type": "integer", "format": "int64", "x-go-name": "MaxRepoCreation" }, "password": { "type": "string", "x-go-name": "Password" }, "source_id": { "type": "integer", "format": "int64", "x-go-name": "SourceID" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Email": { "description": "Email an email address belonging to a user", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "primary": { "type": "boolean", "x-go-name": "Primary" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "GPGKey": { "description": "GPGKey a user GPG key to sign commit and tag in repository", "type": "object", "properties": { "can_certify": { "type": "boolean", "x-go-name": "CanCertify" }, "can_encrypt_comms": { "type": "boolean", "x-go-name": "CanEncryptComms" }, "can_encrypt_storage": { "type": "boolean", "x-go-name": "CanEncryptStorage" }, "can_sign": { "type": "boolean", "x-go-name": "CanSign" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "emails": { "type": "array", "items": { "$ref": "#/definitions/GPGKeyEmail" }, "x-go-name": "Emails" }, "expires_at": { "type": "string", "format": "date-time", "x-go-name": "Expires" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key_id": { "type": "string", "x-go-name": "KeyID" }, "primary_key_id": { "type": "string", "x-go-name": "PrimaryKeyID" }, "public_key": { "type": "string", "x-go-name": "PublicKey" }, "subkeys": { "type": "array", "items": { "$ref": "#/definitions/GPGKey" }, "x-go-name": "SubsKey" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "GPGKeyEmail": { "description": "GPGKeyEmail an email attached to a GPGKey", "type": "object", "properties": { "email": { "type": "string", "x-go-name": "Email" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Issue": { "description": "Issue represents an issue in a repository", "type": "object", "properties": { "assignee": { "$ref": "#/definitions/User" }, "assignees": { "type": "array", "items": { "$ref": "#/definitions/User" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "$ref": "#/definitions/Label" }, "x-go-name": "Labels" }, "milestone": { "$ref": "#/definitions/Milestone" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "pull_request": { "$ref": "#/definitions/PullRequestMeta" }, "state": { "$ref": "#/definitions/StateType" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "$ref": "#/definitions/User" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "IssueLabelsOption": { "description": "IssueLabelsOption a collection of labels", "type": "object", "properties": { "labels": { "description": "list of label IDs", "type": "array", "items": { "type": "integer", "format": "int64" }, "x-go-name": "Labels" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Label": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "MarkdownOption": { "description": "MarkdownOption markdown options", "type": "object", "properties": { "Context": { "description": "Context to render\n\nin: body", "type": "string" }, "Mode": { "description": "Mode to render\n\nin: body", "type": "string" }, "Text": { "description": "Text markdown to render\n\nin: body", "type": "string" }, "Wiki": { "description": "Is it a wiki page ?\n\nin: body", "type": "boolean" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "MigrateRepoForm": { "description": "MigrateRepoForm form for migrating repository", "type": "object", "required": [ "clone_addr", "uid", "repo_name" ], "properties": { "auth_password": { "type": "string", "x-go-name": "AuthPassword" }, "auth_username": { "type": "string", "x-go-name": "AuthUsername" }, "clone_addr": { "type": "string", "x-go-name": "CloneAddr" }, "description": { "type": "string", "x-go-name": "Description" }, "mirror": { "type": "boolean", "x-go-name": "Mirror" }, "private": { "type": "boolean", "x-go-name": "Private" }, "repo_name": { "type": "string", "x-go-name": "RepoName" }, "uid": { "type": "integer", "format": "int64", "x-go-name": "UID" } }, "x-go-package": "code.gitea.io/gitea/modules/auth" }, "Milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "description": { "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "$ref": "#/definitions/StateType" }, "title": { "type": "string", "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Organization": { "description": "Organization represents an organization", "type": "object", "properties": { "avatar_url": { "type": "string", "x-go-name": "AvatarURL" }, "description": { "type": "string", "x-go-name": "Description" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "location": { "type": "string", "x-go-name": "Location" }, "username": { "type": "string", "x-go-name": "UserName" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "PRBranchInfo": { "description": "PRBranchInfo information about a branch", "type": "object", "properties": { "label": { "type": "string", "x-go-name": "Name" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repo": { "$ref": "#/definitions/Repository" }, "repo_id": { "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { "type": "string", "x-go-name": "Sha" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "PayloadCommit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { "author": { "$ref": "#/definitions/PayloadUser" }, "committer": { "$ref": "#/definitions/PayloadUser" }, "id": { "description": "sha1 hash of the commit", "type": "string", "x-go-name": "ID" }, "message": { "type": "string", "x-go-name": "Message" }, "timestamp": { "type": "string", "format": "date-time", "x-go-name": "Timestamp" }, "url": { "type": "string", "x-go-name": "URL" }, "verification": { "$ref": "#/definitions/PayloadCommitVerification" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "PayloadCommitVerification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", "type": "object", "properties": { "payload": { "type": "string", "x-go-name": "Payload" }, "reason": { "type": "string", "x-go-name": "Reason" }, "signature": { "type": "string", "x-go-name": "Signature" }, "verified": { "type": "boolean", "x-go-name": "Verified" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "PayloadUser": { "description": "PayloadUser represents the author or committer of a commit", "type": "object", "properties": { "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "name": { "description": "Full name of the commit author", "type": "string", "x-go-name": "Name" }, "username": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Permission": { "description": "Permission represents a set of permissions", "type": "object", "properties": { "admin": { "type": "boolean", "x-go-name": "Admin" }, "pull": { "type": "boolean", "x-go-name": "Pull" }, "push": { "type": "boolean", "x-go-name": "Push" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "PublicKey": { "description": "PublicKey publickey is a user key to push code to repository", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "fingerprint": { "type": "string", "x-go-name": "Fingerprint" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { "type": "string", "x-go-name": "Key" }, "title": { "type": "string", "x-go-name": "Title" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "PullRequest": { "description": "PullRequest represents a pull request", "type": "object", "properties": { "assignee": { "$ref": "#/definitions/User" }, "assignees": { "type": "array", "items": { "$ref": "#/definitions/User" }, "x-go-name": "Assignees" }, "base": { "$ref": "#/definitions/PRBranchInfo" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "diff_url": { "type": "string", "x-go-name": "DiffURL" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "head": { "$ref": "#/definitions/PRBranchInfo" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "labels": { "type": "array", "items": { "$ref": "#/definitions/Label" }, "x-go-name": "Labels" }, "merge_base": { "type": "string", "x-go-name": "MergeBase" }, "merge_commit_sha": { "type": "string", "x-go-name": "MergedCommitID" }, "mergeable": { "type": "boolean", "x-go-name": "Mergeable" }, "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" }, "merged_by": { "$ref": "#/definitions/User" }, "milestone": { "$ref": "#/definitions/Milestone" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "patch_url": { "type": "string", "x-go-name": "PatchURL" }, "state": { "$ref": "#/definitions/StateType" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "$ref": "#/definitions/User" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "PullRequestMeta": { "description": "PullRequestMeta PR info if an issue is a PR", "type": "object", "properties": { "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Release": { "description": "Release represents a repository release", "type": "object", "properties": { "assets": { "type": "array", "items": { "$ref": "#/definitions/Attachment" }, "x-go-name": "Attachments" }, "author": { "$ref": "#/definitions/User" }, "body": { "type": "string", "x-go-name": "Note" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "CreatedAt" }, "draft": { "type": "boolean", "x-go-name": "IsDraft" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Title" }, "prerelease": { "type": "boolean", "x-go-name": "IsPrerelease" }, "published_at": { "type": "string", "format": "date-time", "x-go-name": "PublishedAt" }, "tag_name": { "type": "string", "x-go-name": "TagName" }, "tarball_url": { "type": "string", "x-go-name": "TarURL" }, "target_commitish": { "type": "string", "x-go-name": "Target" }, "url": { "type": "string", "x-go-name": "URL" }, "zipball_url": { "type": "string", "x-go-name": "ZipURL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Repository": { "description": "Repository represents a repository", "type": "object", "properties": { "clone_url": { "type": "string", "x-go-name": "CloneURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "default_branch": { "type": "string", "x-go-name": "DefaultBranch" }, "description": { "type": "string", "x-go-name": "Description" }, "empty": { "type": "boolean", "x-go-name": "Empty" }, "fork": { "type": "boolean", "x-go-name": "Fork" }, "forks_count": { "type": "integer", "format": "int64", "x-go-name": "Forks" }, "full_name": { "type": "string", "x-go-name": "FullName" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "mirror": { "type": "boolean", "x-go-name": "Mirror" }, "name": { "type": "string", "x-go-name": "Name" }, "open_issues_count": { "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "owner": { "$ref": "#/definitions/User" }, "parent": { "$ref": "#/definitions/Repository" }, "permissions": { "$ref": "#/definitions/Permission" }, "private": { "type": "boolean", "x-go-name": "Private" }, "size": { "type": "integer", "format": "int64", "x-go-name": "Size" }, "ssh_url": { "type": "string", "x-go-name": "SSHURL" }, "stars_count": { "type": "integer", "format": "int64", "x-go-name": "Stars" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "watchers_count": { "type": "integer", "format": "int64", "x-go-name": "Watchers" }, "website": { "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "SearchResults": { "description": "SearchResults results of a successful search", "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/Repository" }, "x-go-name": "Data" }, "ok": { "type": "boolean", "x-go-name": "OK" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "ServerVersion": { "description": "ServerVersion wraps the version of the server", "type": "object", "properties": { "version": { "type": "string", "x-go-name": "Version" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "StateType": { "description": "StateType issue state type", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Status": { "description": "Status holds a single Status of a single Commit", "type": "object", "properties": { "context": { "type": "string", "x-go-name": "Context" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "creator": { "$ref": "#/definitions/User" }, "description": { "type": "string", "x-go-name": "Description" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "status": { "$ref": "#/definitions/StatusState" }, "target_url": { "type": "string", "x-go-name": "TargetURL" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "StatusState": { "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"", "type": "string", "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Team": { "description": "Team represents a team in an organization", "type": "object", "properties": { "description": { "type": "string", "x-go-name": "Description" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "permission": { "type": "string", "enum": [ "none", "read", "write", "admin", "owner" ], "x-go-name": "Permission" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "TrackedTime": { "description": "TrackedTime worked time for an issue / pr", "type": "object", "properties": { "created": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_id": { "type": "integer", "format": "int64", "x-go-name": "IssueID" }, "time": { "description": "Time in seconds", "type": "integer", "format": "int64", "x-go-name": "Time" }, "user_id": { "type": "integer", "format": "int64", "x-go-name": "UserID" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "User": { "description": "User represents a user", "type": "object", "properties": { "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "WatchInfo": { "description": "WatchInfo represents an API watch status of one repository", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "CreatedAt" }, "ignored": { "type": "boolean", "x-go-name": "Ignored" }, "reason": { "type": "object", "x-go-name": "Reason" }, "repository_url": { "type": "string", "x-go-name": "RepositoryURL" }, "subscribed": { "type": "boolean", "x-go-name": "Subscribed" }, "url": { "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" } }, "responses": { "AccessToken": { "description": "AccessToken represents a API access token.", "headers": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "sha1": { "type": "string" } } }, "AccessTokenList": { "description": "AccessTokenList represents a list of API access token." }, "Attachment": { "description": "Attachment", "schema": { "$ref": "#/definitions/Attachment" } }, "AttachmentList": { "description": "AttachmentList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Attachment" } } }, "Branch": { "description": "Branch", "schema": { "$ref": "#/definitions/Branch" } }, "BranchList": { "description": "BranchList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Branch" } } }, "Comment": { "description": "Comment", "schema": { "$ref": "#/definitions/Comment" } }, "CommentList": { "description": "CommentList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Comment" } } }, "DeployKey": { "description": "DeployKey", "schema": { "$ref": "#/definitions/DeployKey" } }, "DeployKeyList": { "description": "DeployKeyList", "schema": { "type": "array", "items": { "$ref": "#/definitions/DeployKey" } } }, "EmailList": { "description": "EmailList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Email" } } }, "GPGKey": { "description": "GPGKey", "schema": { "$ref": "#/definitions/GPGKey" } }, "GPGKeyList": { "description": "GPGKeyList", "schema": { "type": "array", "items": { "$ref": "#/definitions/GPGKey" } } }, "Hook": { "description": "Hook", "schema": { "type": "array", "items": { "$ref": "#/definitions/Branch" } } }, "HookList": { "description": "HookList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Branch" } } }, "Issue": { "description": "Issue", "schema": { "$ref": "#/definitions/Issue" } }, "IssueList": { "description": "IssueList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Issue" } } }, "Label": { "description": "Label", "schema": { "$ref": "#/definitions/Label" } }, "LabelList": { "description": "LabelList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Label" } } }, "MarkdownRender": { "description": "MarkdownRender is a rendered markdown document" }, "Milestone": { "description": "Milestone", "schema": { "$ref": "#/definitions/Milestone" } }, "MilestoneList": { "description": "MilestoneList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Milestone" } } }, "Organization": { "description": "Organization", "schema": { "$ref": "#/definitions/Organization" } }, "OrganizationList": { "description": "OrganizationList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Organization" } } }, "PublicKey": { "description": "PublicKey", "schema": { "$ref": "#/definitions/PublicKey" } }, "PublicKeyList": { "description": "PublicKeyList", "schema": { "type": "array", "items": { "$ref": "#/definitions/PublicKey" } } }, "PullRequest": { "description": "PullRequest", "schema": { "$ref": "#/definitions/PullRequest" } }, "PullRequestList": { "description": "PullRequestList", "schema": { "type": "array", "items": { "$ref": "#/definitions/PullRequest" } } }, "Release": { "description": "Release", "schema": { "$ref": "#/definitions/Release" } }, "ReleaseList": { "description": "ReleaseList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Release" } } }, "Repository": { "description": "Repository", "schema": { "$ref": "#/definitions/Repository" } }, "RepositoryList": { "description": "RepositoryList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Repository" } } }, "SearchResults": { "description": "SearchResults", "schema": { "$ref": "#/definitions/SearchResults" } }, "ServerVersion": { "description": "ServerVersion", "schema": { "$ref": "#/definitions/ServerVersion" } }, "Status": { "description": "Status", "schema": { "$ref": "#/definitions/Status" } }, "StatusList": { "description": "StatusList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Status" } } }, "Team": { "description": "Team", "schema": { "$ref": "#/definitions/Team" } }, "TeamList": { "description": "TeamList", "schema": { "type": "array", "items": { "$ref": "#/definitions/Team" } } }, "TrackedTime": { "description": "TrackedTime", "schema": { "$ref": "#/definitions/TrackedTime" } }, "TrackedTimeList": { "description": "TrackedTimeList", "schema": { "type": "array", "items": { "$ref": "#/definitions/TrackedTime" } } }, "User": { "description": "User", "schema": { "$ref": "#/definitions/User" } }, "UserList": { "description": "UserList", "schema": { "type": "array", "items": { "$ref": "#/definitions/User" } } }, "WatchInfo": { "description": "WatchInfo", "schema": { "$ref": "#/definitions/WatchInfo" } }, "empty": { "description": "APIEmpty is an empty response" }, "error": { "description": "APIError is error format response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } }, "forbidden": { "description": "APIForbiddenError is a forbidden error response", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } }, "notFound": { "description": "APINotFound is a not found empty response" }, "parameterBodies": { "description": "parameterBodies", "schema": { "$ref": "#/definitions/EditAttachmentOptions" } }, "redirect": { "description": "APIRedirect is a redirect response" }, "validationError": { "description": "APIValidationError is error format response related to input validation", "headers": { "message": { "type": "string" }, "url": { "type": "string" } } } }, "securityDefinitions": { "AccessToken": { "type": "apiKey", "name": "access_token", "in": "query" }, "AuthorizationHeaderToken": { "type": "apiKey", "name": "Authorization", "in": "header" }, "BasicAuth": { "type": "basic" }, "Token": { "type": "apiKey", "name": "token", "in": "query" } }, "security": [ { "BasicAuth": [] }, { "Token": [] }, { "AccessToken": [] }, { "AuthorizationHeaderToken": [] } ] } validate-0.24.0/fixtures/bugs/1621/000077500000000000000000000000001457312750000165745ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/1621/1621-flat.yaml000066400000000000000000002515101457312750000210010ustar00rootroot00000000000000consumes: - application/json produces: - application/json swagger: "2.0" info: description: | This is the documentation for the Giant Swarm API starting at version `v4`. For an introduction to Giant Swarm, refer to the [documentation site](https://docs.giantswarm.io/). The Giant Swarm API attempts to behave in a __restful__ way. As a developer, you access resources using the `GET` method and, for example, delete them using the same path and the `DELETE` method. Accessing resources via GET usually returns all information available about a resource, while collections, like for example the list of all clusters you have access to, only contain a selected few attributes of each member item. Some requests, like for example the request to create a new cluster, don't return the resource itself. Instead, the response delivers a standard message body, showing a `code` and a `message` part. The `message` contains information for you or a client's end user. The `code` attribute contains some string (example: `RESOURCE_CREATED`) that is supposed to give you details on the state of the operation, in addition to standard HTTP status codes. This message format is also used in the case of errors. We provide a [list of all response codes](https://github.com/giantswarm/api-spec/blob/master/details/RESPONSE_CODES.md) outside this documentation. Feedback on the API as well as this documentation is welcome via `support@giantswarm.io` or on IRC channel [#giantswarm](irc://irc.freenode.org:6667/#giantswarm) on freenode. ## Source The source of this documentation is available on [GitHub](https://github.com/giantswarm/api-spec). title: The Giant Swarm API v4 termsOfService: https://giantswarm.io/terms/ license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html version: 4.0.0 paths: /v4/auth-tokens/: post: description: | Creates a Auth Token for a given user. Must authenticate with email and password. tags: - auth tokens summary: Create Auth Token (Login) operationId: createAuthToken parameters: - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header - x-examples: application/json: email: developer@example.com password_base64: cGFzc3dvcmQ= description: Create Auth Token Request name: body in: body required: true schema: $ref: '#/definitions/v4CreateAuthTokenRequest' responses: "200": description: Success schema: $ref: '#/definitions/v4CreateAuthTokenResponse' examples: application/json: auth_token: e5239484-2299-41df-b901-d0568db7e3f9 "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. delete: description: | Deletes the authentication token provided in the Authorization header. This effectively logs you out. tags: - auth tokens summary: Delete Auth Token (Logout) operationId: deleteAuthToken parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header responses: "200": description: Success schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_DELETED message: The authentication token has been succesfully deleted. "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. /v4/clusters/: get: description: | This operation fetches a list of clusters. The result depends on the permissions of the user. A normal user will get all the clusters the user has access to, via organization membership. A user with admin permission will receive a list of all existing clusters. The result array items are sparse representations of the cluster objects. To fetch more details on a cluster, use the [getCluster](#operation/getCluster) operation. tags: - clusters summary: Get clusters operationId: getClusters parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header responses: "200": description: Success schema: type: array items: $ref: '#/definitions/v4ClusterListItem' examples: application/json: - create_date: "2017-06-08T12:31:47.215Z" id: g8s3o name: Staging Cluster owner: acme - create_date: "2017-05-22T13:58:02.024Z" id: 3dkr6 name: Test Cluster owner: testorg "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. default: description: Error schema: $ref: '#/definitions/v4GenericResponse' post: description: | This operation is used to create a new Kubernetes cluster for an organization. The desired configuration can be specified using the __cluster definition format__ (see [external documentation](https://github.com/giantswarm/api-spec/blob/master/details/CLUSTER_DEFINITION.md) for details). The cluster definition format allows to set a number of optional configuration details, like memory size and number of CPU cores. However, one attribute is __mandatory__ upon creation: The `owner` attribute must carry the name of the organization the cluster will belong to. Note that the acting user must be a member of that organization in order to create a cluster. It is *recommended* to also specify the `name` attribute to give the cluster a friendly name, like e. g. "Development Cluster". Additional definition attributes can be used. Where attributes are omitted, default configuration values will be applied. For example, if no `release_version` is specified, the most recent version is used. The `workers` attribute, if present, must contain an array of node definition objects. The number of objects given determines the number of workers created. For example, requesting three worker nodes with default configuration can be achieved by submitting an array of three empty objects: ```"workers": [{}, {}, {}]``` For clusters on AWS, note that all worker nodes must use the same instance type. tags: - clusters summary: Create cluster operationId: addCluster parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header - x-examples: application/json: name: Example cluster with 3 default worker nodes owner: myteam release_version: 1.4.2 workers: - {} - {} - {} description: New cluster definition name: body in: body required: true schema: $ref: '#/definitions/v4AddClusterRequest' responses: "201": description: Cluster created schema: $ref: '#/definitions/v4GenericResponse' headers: Location: type: string description: URI to obtain details on the new cluster using the [getCluster](#operation/getCluster) operation examples: application/json: code: RESOURCE_CREATED message: A new cluster has been created with ID 'wqtlq' "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. default: description: error schema: $ref: '#/definitions/v4GenericResponse' /v4/clusters/{cluster_id}/: get: description: | This operation allows to obtain all available details on a particular cluster. tags: - clusters summary: Get cluster details operationId: getCluster parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header - type: string description: Cluster ID name: cluster_id in: path required: true responses: "200": description: Cluster details schema: $ref: '#/definitions/v4ClusterDetailsResponse' examples: application/json: api_endpoint: https://api.wqtlq.example.com create_date: "2017-03-03T10:50:45.949270905Z" id: wqtlq kubernetes_version: "" kvm: port_mappings: - port: 30020 protocol: http - port: 30021 protocol: https name: Just a Standard Cluster owner: acme release_version: 2.5.16 workers: - cpu: cores: 4 labels: beta.kubernetes.io/arch: amd64 beta.kubernetes.io/os: linux ip: 10.3.11.2 kubernetes.io/hostname: worker-1.x882ofna.k8s.gigantic.io nodetype: hicpu memory: size_gb: 2 storage: size_gb: 20 - cpu: cores: 2 labels: beta.kubernetes.io/arch: amd64 beta.kubernetes.io/os: linux ip: 10.3.62.2 kubernetes.io/hostname: worker-2.x882ofna.k8s.gigantic.io nodetype: hiram memory: size_gb: 8 storage: size_gb: 20 "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. "404": description: Cluster not found schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_NOT_FOUND message: The cluster with ID 'wqtlq' could not be found, or perhaps you do not have access to it. Please make sure the cluster ID is correct, and that you are a member of the organization that it belongs to. default: description: error schema: $ref: '#/definitions/v4GenericResponse' delete: description: | This operation allows to delete a cluster. __Caution:__ Deleting a cluster causes the termination of all workloads running on the cluster. Data stored on the worker nodes will be lost. There is no way to undo this operation. The response is sent as soon as the request is validated. At that point, workloads might still be running on the cluster and may be accessible for a little wile, until the cluster is actually deleted. tags: - clusters summary: Delete cluster operationId: deleteCluster parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header - type: string description: Cluster ID name: cluster_id in: path required: true responses: "202": description: Deleting cluster schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_DELETION_STARTED message: The cluster with ID 'wqtlq' is being deleted. "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. "404": description: Cluster not found schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_NOT_FOUND message: The cluster with ID 'wqtlq' could not be found, or perhaps you do not have access to it. Please make sure the cluster ID is correct, and that you are a member of the organization that it belongs to. default: description: error schema: $ref: '#/definitions/v4GenericResponse' patch: description: | This operation allows to modify an existing cluster. A cluster modification is performed by submitting a `PATCH` request to the cluster resource (as described in the [addCluster](#operation/addCluster) and [getCluster](#operation/getCluster)) in form of a [JSON Patch Merge (RFC 7386)](https://tools.ietf.org/html/rfc7386). This means, only the attributes to be modified have to be contained in the request body. The following attributes can be modified: - `name`: Rename the cluster to something more fitting. - `owner`: Changing the owner organization name means to change cluster ownership from one organization to another. The user performing the request has to be a member of both organizations. - `release_version`: By changing this attribute you can upgrade a cluster to a newer [release](https://docs.giantswarm.io/api/#tag/releases). - `workers`: By modifying the array of workers, nodes can be added to increase the cluster's capacity. See details below. ### Adding and Removing Worker Nodes (Scaling) Adding worker nodes to a cluster or removing worker nodes from a cluster works by submitting the `workers` attribute, which contains a (sparse) array of worker node defintions. _Sparse_ here means that all configuration details are optional. In the case that worker nodes are added to a cluster, wherever a configuration detail is missing, defaults will be applied. See [Creating a cluster](#operation/addCluster) for details. When modifying the cluster resource, you describe the desired state. For scaling, this means that the worker node array submitted must contain as many elements as the cluster should have worker nodes. If your cluster currently has five nodes and you submit a workers array with four elements, this means that one worker node will be removed. If your submitted workers array has six elements, this means one will be added. As an example, this request body could be used to scale a cluster to three worker nodes: ```json { "workers": [{}, {}, {}] } ``` If the scaled cluster had four worker nodes before, one would be removed. If it had two worker nodes before, one with default settings would be added. ### Limitations - As of now, existing worker nodes cannot be modified. - When removing nodes (scaling down), it is not possible to determine which nodes will be removed. - On AWS based clusters, all worker nodes must use the same EC2 instance type (`instance_type` node attribute). By not setting an `instance_type` when submitting a PATCH request, you ensure that the right instance type is used automatically. tags: - clusters summary: Modify cluster operationId: modifyCluster parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header - x-examples: application/merge-patch+json: name: New cluster name description: Merge-patch body name: body in: body required: true schema: $ref: '#/definitions/v4ModifyClusterRequest' - type: string description: Cluster ID name: cluster_id in: path required: true responses: "200": description: Cluster modified schema: $ref: '#/definitions/v4ClusterDetailsResponse' "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. "404": description: Cluster not found schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_NOT_FOUND message: The cluster with ID 'wqtlq' could not be found, or perhaps you do not have access to it. Please make sure the cluster ID is correct, and that you are a member of the organization that it belongs to. default: description: error schema: $ref: '#/definitions/v4GenericResponse' /v4/clusters/{cluster_id}/key-pairs/: get: description: | Returns a list of information on all key pairs of a cluster as an array. The individual array items contain metadata on the key pairs, but neither the key nor the certificate. These can only be obtained upon creation, using the [addKeypair](#operation/addKeyPair) operation. tags: - key pairs summary: Get key pairs operationId: getKeyPairs parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header - type: string description: Cluster ID name: cluster_id in: path required: true responses: "200": description: Key pairs schema: $ref: '#/definitions/v4GetKeyPairsResponse' "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. default: description: error schema: $ref: '#/definitions/v4GenericResponse' post: description: | This operation allows to create a new key pair for accessing a specific cluster. A key pair consists of an unencrypted private RSA key and an X.509 certificate. In addition, when obtaining a key pair for a cluster, the cluster's certificate authority file (CA certificate) is delivered, which is required by TLS clients to establish trust to the cluster. In addition to the credentials itself, a key pair has some metadata like a unique ID, a creation timestamp and a free text `description` that you can use at will, for example to note for whom a key pair has been issued. ### Customizing the certificate's subject for K8s RBAC It is possible to set the Common Name and Organization fields of the generated certificate's subject. - `cn_prefix`: The certificate's common name uses this format: `.user.`. `clusterdomain` is specific to your cluster and is not editable. The `cn_prefix` however is editable. When left blank it will default to the email address of the Giant Swarm user that is performing the create key pair request. The common name is used as the username for requests to the Kubernetes API. This allows you to set up role-based access controls. - `certificate_organizations`: This will set the certificate's `organization` fields. Use a comma separated list of values. The Kubernetes API will use these values as group memberships. __Note:__ The actual credentials coming with the key pair (key, certificate) can only be accessed once, as the result of the `POST` request that triggers their creation. This restriction exists to minimize the risk of credentials being leaked. If you fail to capture the credentials upon creation, you'll have to repeat the creation request. tags: - key pairs summary: Create key pair operationId: addKeyPair parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header - type: string description: Cluster ID name: cluster_id in: path required: true - x-examples: application/json: certificate_organizations: system:masters description: Admin key pair lasting twelve hours ttl_hours: 12 description: | While the `ttl_hours` attribute is optional and will be set to a default value when omitted, the `description` is mandatory. name: body in: body required: true schema: $ref: '#/definitions/v4AddKeyPairRequest' responses: "200": description: Success schema: $ref: '#/definitions/v4AddKeyPairResponse' examples: application/json: certificate_authority_data: '-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----' client_certificate_data: '-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----' client_key_data: '-----BEGIN RSA PRIVATE KEY-----...-----END RSA PRIVATE KEY-----' create_date: "2016-06-01T12:00:00.000Z" description: Key pair description id: 02:cc:da:f9:fb:ce:c3:e5:e1:f6:27:d8:43:48:0d:37:4a:ee:b9:67 ttl_hours: 8640 "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. /v4/info/: get: description: | Returns a set of details on the installation. The output varies based on the provider used in the installation. This information is useful for example when creating new cluster, to prevent creating clusters with more worker nodes than possible. ### Example for an AWS-based installation ```json { "general": { "installation_name": "shire", "provider": "aws", "datacenter": "eu-central-1" }, "workers": { "count_per_cluster": { "max": 20, "default": 3 }, "instance_type": { "options": [ "m3.medium", "m3.large", "m3.xlarge" ], "default": "m3.large" } } } ``` ### Example for a KVM-based installation ```json { "general": { "installation_name": "isengard", "provider": "kvm", "datacenter": "string" }, "workers": { "count_per_cluster": { "max": 8, "default": 3 }, } } ``` tags: - info summary: Get information on the installation operationId: getInfo parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header responses: "200": description: Information schema: $ref: '#/definitions/v4InfoResponse' examples: application/json: general: datacenter: eu-central-1 installation_name: shire provider: aws workers: count_per_cluster: default: 3 max: 20 instance_type: default: m3.large options: - m3.medium - m3.large - m3.xlarge "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. default: description: Error schema: $ref: '#/definitions/v4GenericResponse' /v4/organizations/: get: description: | This operation allows to fetch a list of organizations the user is a member of. In the case of an admin user, the result includes all existing organizations. tags: - organizations summary: Get organizations operationId: getOrganizations parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header responses: "200": description: Success schema: type: array items: $ref: '#/definitions/v4OrganizationListItem' examples: application/json: - id: acme - id: giantswarm - id: testorg "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. default: description: Error schema: $ref: '#/definitions/v4GenericResponse' /v4/organizations/{organization_id}/: get: description: | This operation fetches organization details. tags: - organizations summary: Get organization details operationId: getOrganization parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header - type: string description: | An ID for the organization. This ID must be unique and match this regular expression: ^[a-z0-9_]{4,30}$ name: organization_id in: path required: true responses: "200": description: Organization details schema: $ref: '#/definitions/v4Organization' examples: application/json: id: acme members: - email: user1@example.com - email: user2@example.com "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. "404": description: Organization not found schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_NOT_FOUND message: 'The organization could not be found. (not found: the organization with id ''acme'' could not be found)' default: description: Error schema: $ref: '#/definitions/v4GenericResponse' put: description: | This operation allows a user to create an organization. tags: - organizations summary: Create an organization operationId: addOrganization parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header - type: string description: | An ID for the organization. This ID must be unique and match this regular expression: ^[a-z0-9_]{4,30}$ name: organization_id in: path required: true - x-examples: application/json: id: string members: - email: myself@example.com - email: colleague@example.com name: body in: body required: true schema: $ref: '#/definitions/v4Organization' responses: "201": description: Organization created schema: $ref: '#/definitions/v4Organization' examples: application/json: id: acme members: - email: user1@example.com - email: user2@example.com "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. "409": description: Organization already exists schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_ALREADY_EXISTS message: The organization could not be created. (org already exists) default: description: Error schema: $ref: '#/definitions/v4GenericResponse' delete: description: | This operation allows a user to delete an organization that they are a member of. Admin users can delete any organization. tags: - organizations summary: Delete an organization operationId: deleteOrganization parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header - type: string description: | An ID for the organization. This ID must be unique and match this regular expression: ^[a-z0-9_]{4,30}$ name: organization_id in: path required: true responses: "200": description: Organization deleted schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_DELETED message: The organization with ID 'acme' has been deleted. "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. "404": description: Organization not found schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_NOT_FOUND message: 'The organization could not be deleted. (not found: the organization with id ''acme'' could not be found)' default: description: Error schema: $ref: '#/definitions/v4GenericResponse' patch: description: | This operation allows you to modify an existing organization. You must be a member of the organization or an admin in order to use this endpoint. The following attributes can be modified: - `members`: By modifying the array of members, members can be added to or removed from the organization The request body must conform with the [JSON Patch Merge (RFC 7386)](https://tools.ietf.org/html/rfc7386) standard. Requests have to be sent with the `Content-Type: application/merge-patch+json` header. The full request must be valid before it will be executed, currently this means every member you attempt to add to the organization must actually exist in the system. If any member you attempt to add is invalid, the entire patch operation will fail, no members will be added or removed, and an error message will explain which members in your request are invalid. tags: - organizations summary: Modify organization operationId: modifyOrganization parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header - type: string description: | An ID for the organization. This ID must be unique and match this regular expression: ^[a-z0-9_]{4,30}$ name: organization_id in: path required: true - x-examples: application/merge-patch+json: members: - email: myself@example.com name: body in: body required: true schema: $ref: '#/definitions/modifyOrganizationParamsBody' responses: "200": description: Organization modified schema: $ref: '#/definitions/v4Organization' "400": description: Invalid input schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: INVALID_INPUT message: 'The organization could not be modified. (invalid input: user ''invalid-email'' does not exist or is invalid)' "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. "404": description: Organization not found schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_NOT_FOUND message: 'The organization could not be modified. (not found: the organization with id ''acme'' could not be found)' default: description: error schema: $ref: '#/definitions/v4GenericResponse' /v4/organizations/{organization_id}/credentials/: post: description: | Add a set of credentials to the organization allowing the creation and operation of clusters within a cloud provider account/subscription. The actual type of these credentials depends on the cloud provider the installation is running on. Currently, only AWS is supported, with support for Azure being planned for the near future. Credentials in an organization are immutable. Each organization can only have one set of credentials. Once credentials have been set for an organization, they are used for every new cluster that will be created for the organization. ### Example request body for AWS ```json { "provider": "aws", "aws": { "roles": { "admin": "arn:aws:iam::123456789012:role/GiantSwarmAdmin", "awsoperator": "arn:aws:iam::123456789012:role/GiantSwarmAWSOperator" } } } ``` tags: - organizations summary: Set credentials operationId: addCredentials parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header - type: string description: | An ID for the organization. This ID must be unique and match this regular expression: ^[a-z0-9_]{4,30}$ name: organization_id in: path required: true - x-examples: application/json: aws: roles: admin: arn:aws:iam::123456789012:role/GiantSwarmAdmin awsoperator: arn:aws:iam::123456789012:role/GiantSwarmAWSOperator provider: aws name: body in: body required: true schema: $ref: '#/definitions/v4AddCredentialsRequest' responses: "201": description: Credentials created schema: $ref: '#/definitions/v4GenericResponse' headers: Location: type: string description: URI of the new credentials resource examples: application/json: code: RESOURCE_CREATED message: A new set of credentials has been created with ID '5d9h4' "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. "409": description: Conflict schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_ALREADY_EXISTS message: The organisation already has a set of credentials default: description: error schema: $ref: '#/definitions/v4GenericResponse' /v4/releases/: get: description: | Lists all releases available for new clusters or for upgrading existing clusters. Might also serve as an archive to obtain details on older releases. tags: - releases summary: Get releases operationId: getReleases parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header responses: "200": description: Releases list schema: type: array items: $ref: '#/definitions/v4ReleaseListItem' examples: application/json: - active: false changelog: - component: kubernetes description: Security fixes - component: calico description: Security fixes components: - name: kubernetes version: 1.5.8 - name: calico version: 0.9.1 timestamp: "2017-09-21T08:14:03.37759Z" version: 1.14.9 - active: true changelog: - component: calico description: Bugfix components: - name: kubernetes version: 1.7.3 - name: calico version: 1.1.1 timestamp: "2017-11-11T12:24:56.59969Z" version: 2.8.4 "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. /v4/user/: get: description: | Returns details about the currently authenticated user tags: - users summary: Get current user operationId: getCurrentUser parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header responses: "200": description: Success schema: $ref: '#/definitions/v4UserListItem' examples: application/json: created: "2017-01-15T12:00:00Z" email: andy@example.com expiry: "2019-01-15T00:00:00Z" "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. default: description: Error schema: $ref: '#/definitions/v4GenericResponse' /v4/users/: get: description: | Returns a list of all users in the system. Currently this endpoint is only available to users with admin permissions. tags: - users summary: Get users operationId: getUsers parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header responses: "200": description: Success schema: type: array items: $ref: '#/definitions/v4UserListItem' examples: application/json: - created: "2017-01-15T12:00:00Z" email: andy@example.com expiry: "2019-01-15T00:00:00Z" - created: "2017-02-15T12:30:00Z" email: bob@example.com expiry: "2020-01-15T00:00:00Z" - created: "2017-03-15T13:00:00Z" email: charles@example.com expiry: "2021-01-15T00:00:00Z" "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. default: description: Error schema: $ref: '#/definitions/v4GenericResponse' /v4/users/{email}/: get: description: | Returns details about a specific user tags: - users summary: Get user operationId: getUser parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header - type: string description: The user's email address name: email in: path required: true responses: "200": description: Success schema: $ref: '#/definitions/v4UserListItem' examples: application/json: created: "2017-01-15T12:00:00Z" email: andy@example.com expiry: "2019-01-15T00:00:00Z" "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. "404": description: User not found schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_NOT_FOUND message: 'The user could not be found. (not found: user with email ''bob@example.com'' could not be found)' default: description: Error schema: $ref: '#/definitions/v4GenericResponse' put: description: | Creates a users in the system. Currently this endpoint is only available to users with admin permissions. tags: - users summary: Create user operationId: createUser parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header - type: string description: The user's email address name: email in: path required: true - x-examples: application/json: expiry: "2020-01-01T12:00:00.000Z" password: cGFzc3dvcmQ= description: User account details name: body in: body required: true schema: $ref: '#/definitions/v4CreateUserRequest' responses: "201": description: User created schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_CREATED message: The user with email 'bob@example.com' has been created. "400": description: User already exists schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_ALREADY_EXISTS message: 'The user could not be created. (invalid input: email ''bob@example.com'' already exists)' "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. default: description: Error schema: $ref: '#/definitions/v4GenericResponse' delete: description: | Deletes a users in the system. Currently this endpoint is only available to users with admin permissions. tags: - users summary: Delete user operationId: deleteUser parameters: - type: string description: As described in the [authentication](#section/Authentication) section name: Authorization in: header required: true - type: string description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. name: X-Request-ID in: header - type: string description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. name: X-Giant-Swarm-Activity in: header - type: string description: | If activity has been issued by a CLI, this header can contain the command line name: X-Giant-Swarm-CmdLine in: header - type: string description: The user's email address name: email in: path required: true responses: "200": description: User deleted schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_DELETED message: The user with email 'bob@example.com' has been deleted. "401": description: Permission denied schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: PERMISSION_DENIED message: The requested resource cannot be accessed using the provided authentication details. "404": description: User not found schema: $ref: '#/definitions/v4GenericResponse' examples: application/json: code: RESOURCE_NOT_FOUND message: 'The user could not be deleted. (not found: user with email ''bob@example.com'' could not be found)' default: description: Error schema: $ref: '#/definitions/v4GenericResponse' definitions: modifyOrganizationParamsBody: type: object properties: members: description: List of members that belong to this organization type: array items: $ref: '#/definitions/v4OrganizationMember' x-go-gen-location: operations v4AddClusterRequest: description: Request model for creating a new cluster type: object required: - owner properties: kubernetes_version: description: | Kubernetes version number (deprecated). Doesn't have any effect. This attribute is going to be removed in future API versions. type: string name: description: Cluster name type: string owner: description: Name of the organization owning the cluster type: string release_version: description: | The [release](https://docs.giantswarm.io/api/#tag/releases) version to use in the new cluster type: string workers: type: array items: $ref: '#/definitions/v4AddClusterRequestWorkersItems' v4AddClusterRequestWorkersItems: type: object properties: aws: $ref: '#/definitions/v4AddClusterRequestWorkersItemsAws' azure: $ref: '#/definitions/v4AddClusterRequestWorkersItemsAzure' cpu: $ref: '#/definitions/v4AddClusterRequestWorkersItemsCpu' labels: type: object additionalProperties: true memory: $ref: '#/definitions/v4AddClusterRequestWorkersItemsMemory' storage: $ref: '#/definitions/v4AddClusterRequestWorkersItemsStorage' x-go-gen-location: models v4AddClusterRequestWorkersItemsAws: description: | Attributes specific to nodes running on Amazon Web Services (AWS) type: object properties: instance_type: description: | EC2 instance type name. Must be the same for all worker nodes of a cluster. type: string x-go-gen-location: models v4AddClusterRequestWorkersItemsAzure: description: | Attributes specific to nodes running on Microsoft Azure type: object properties: vm_size: description: | Azure Virtual Machine size. Must be the same for all worker nodes of a cluster. type: string x-go-gen-location: models v4AddClusterRequestWorkersItemsCpu: type: object properties: cores: description: Number of CPU cores type: integer x-go-gen-location: models v4AddClusterRequestWorkersItemsMemory: type: object properties: size_gb: description: RAM size in GB. Can be an integer or float. type: number x-go-gen-location: models v4AddClusterRequestWorkersItemsStorage: type: object properties: size_gb: description: Node storage size in GB. Can be an integer or float. type: number x-go-gen-location: models v4AddCredentialsRequest: description: Request model for adding a set of credentials type: object required: - provider properties: aws: $ref: '#/definitions/v4AddCredentialsRequestAws' provider: type: string v4AddCredentialsRequestAws: description: Credentials specific to an AWS account type: object required: - roles properties: roles: $ref: '#/definitions/v4AddCredentialsRequestAwsRoles' x-go-gen-location: models v4AddCredentialsRequestAwsRoles: description: IAM roles to assume by certain entities type: object required: - awsoperator - admin properties: admin: description: ARN of the IAM role to assume by Giant Swarm support staff type: string awsoperator: description: ARN of the IAM role to assume by the software operating clusters type: string x-go-gen-location: models v4AddKeyPairRequest: type: object required: - description properties: certificate_organizations: description: | This will set the certificate subject's `organization` fields. Use a comma seperated list of values. type: string cn_prefix: description: The common name prefix of the certificate subject. This only allows characters that are usable in domain names (`a-z`, `0-9`, and `.-`, where `.-` must not occur at either the start or the end). type: string description: description: Free text information about the key pair type: string ttl_hours: description: Expiration time (from creation) in hours type: integer format: int32 v4AddKeyPairResponse: type: object properties: certificate_authority_data: description: PEM-encoded CA certificate of the cluster type: string client_certificate_data: description: PEM-encoded certificate type: string client_key_data: description: PEM-encoded RSA private key type: string create_date: description: Date/time of creation type: string description: description: Free text information about the key pair type: string id: description: Unique identifier of the key pair type: string ttl_hours: description: Expiration time (from creation) in hours type: integer v4ClusterDetailsResponse: description: Response model showing details of a cluster type: object properties: api_endpoint: description: URI of the Kubernetes API endpoint type: string create_date: description: Date/time of cluster creation type: string id: description: Unique cluster identifier type: string kubernetes_version: description: Deprecated. Will be removed in a future API version. type: string kvm: $ref: '#/definitions/v4ClusterDetailsResponseKvm' name: description: Cluster name type: string owner: description: Name of the organization owning the cluster type: string release_version: description: | The [release](https://docs.giantswarm.io/api/#tag/releases) version currently running this cluster. type: string workers: type: array items: $ref: '#/definitions/v4ClusterDetailsResponseWorkersItems' v4ClusterDetailsResponseKvm: description: Attributes specific to clusters running on KVM (on-prem) installations. type: object properties: port_mappings: description: | Reveals the ports on the host cluster that are mapped to this guest cluster's ingress and which protocol that port supports. Only shown and relevant on our on-prem KVM clusters. type: array items: $ref: '#/definitions/v4ClusterDetailsResponseKvmPortMappingsItems' x-go-gen-location: models v4ClusterDetailsResponseKvmPortMappingsItems: type: object properties: port: description: | The port on the host cluster that will forward traffic to the guest cluster type: integer protocol: description: | The protocol this port mapping is made for. type: string x-go-gen-location: models v4ClusterDetailsResponseWorkersItems: type: object properties: aws: $ref: '#/definitions/v4ClusterDetailsResponseWorkersItemsAws' azure: $ref: '#/definitions/v4ClusterDetailsResponseWorkersItemsAzure' cpu: $ref: '#/definitions/v4ClusterDetailsResponseWorkersItemsCpu' labels: type: object additionalProperties: true memory: $ref: '#/definitions/v4ClusterDetailsResponseWorkersItemsMemory' storage: $ref: '#/definitions/v4ClusterDetailsResponseWorkersItemsStorage' x-go-gen-location: models v4ClusterDetailsResponseWorkersItemsAws: description: | Attributes specific to nodes running on Amazon Web Services (AWS) type: object properties: instance_type: description: | EC2 instance type name. Must be the same for all worker nodes of a cluster. type: string x-go-gen-location: models v4ClusterDetailsResponseWorkersItemsAzure: description: | Attributes specific to nodes running on Microsoft Azure type: object properties: vm_size: description: | Azure Virtual Machine size. Must be the same for all worker nodes of a cluster. type: string x-go-gen-location: models v4ClusterDetailsResponseWorkersItemsCpu: type: object properties: cores: description: Number of CPU cores type: integer x-go-gen-location: models v4ClusterDetailsResponseWorkersItemsMemory: type: object properties: size_gb: description: RAM size in GB. Can be an integer or float. type: number x-go-gen-location: models v4ClusterDetailsResponseWorkersItemsStorage: type: object properties: size_gb: description: Node storage size in GB. Can be an integer or float. type: number x-go-gen-location: models v4ClusterListItem: type: object properties: create_date: description: Date/time of cluster creation type: string id: description: Unique cluster identifier type: string name: description: Cluster name type: string owner: description: Name of the organization owning the cluster type: string release_version: description: The semantic version number of this cluster type: string v4CreateAuthTokenRequest: type: object properties: email: description: Your email address type: string password_base64: description: Your password as a base64 encoded string type: string v4CreateAuthTokenResponse: type: object properties: auth_token: description: The newly created API token type: string v4CreateUserRequest: description: Request model for creating a new user type: object required: - password properties: expiry: description: The date and time when this account will expire type: string password: description: A Base64 encoded password type: string v4GenericResponse: type: object properties: code: description: | A machine readable [response code](https://github.com/giantswarm/api-spec/blob/master/details/RESPONSE_CODES.md) like e. g. `INVALID_CREDENTIALS` type: string message: description: A human readable message type: string v4GetKeyPairsResponse: description: Array of sparse key pair objects type: array items: $ref: '#/definitions/v4GetKeyPairsResponseItems' v4GetKeyPairsResponseItems: type: object properties: certificate_organizations: description: The certificate subject's `organization` fields. type: string common_name: description: The common name of the certificate subject. type: string create_date: description: Date/time of creation type: string description: description: Free text information about the key pair type: string id: description: Unique identifier of the key pair type: string ttl_hours: description: Expiration time (from creation) in hours type: integer x-go-gen-location: models v4InfoResponse: type: object properties: general: $ref: '#/definitions/v4InfoResponseGeneral' workers: $ref: '#/definitions/v4InfoResponseWorkers' v4InfoResponseGeneral: description: General information type: object properties: datacenter: description: Identifier of the datacenter or cloud provider region, e. g. "eu-west-1" type: string installation_name: description: Unique name of the installation type: string provider: description: The technical provider used in this installation. Either "kvm", "aws", or "azure". type: string x-go-gen-location: models v4InfoResponseWorkers: description: Information related to worker nodes type: object properties: count_per_cluster: $ref: '#/definitions/v4InfoResponseWorkersCountPerCluster' instance_type: $ref: '#/definitions/v4InfoResponseWorkersInstanceType' vm_size: $ref: '#/definitions/v4InfoResponseWorkersVmSize' x-go-gen-location: models v4InfoResponseWorkersCountPerCluster: description: Number of workers per cluster type: object properties: default: description: Default number of workers in a new cluster will have, if not specifiec otherwise type: number max: description: Maximum number of worker a cluster can have type: number x-go-gen-location: models v4InfoResponseWorkersInstanceType: description: Instance types to be used for worker nodes. Only available for AWS clusters. type: object properties: default: description: The instance type used in new cluster, if not specified type: string options: description: List of available instance types type: array items: type: string x-go-gen-location: models v4InfoResponseWorkersVmSize: description: Azure Virtual Machine size to be used for worker nodes. Only available for Azure clusters. type: object properties: default: description: The instance type used in new cluster, if not specified type: string options: description: List of available instance types type: array items: type: string x-go-gen-location: models v4ModifyClusterRequest: description: Request body for cluster modification type: object properties: name: description: Name for the cluster type: string owner: description: Name of the organization owning the cluster type: string release_version: description: Release version to use after an upgrade type: string workers: description: Worker node array type: array items: $ref: '#/definitions/v4ModifyClusterRequestWorkersItems' v4ModifyClusterRequestWorkersItems: type: object properties: aws: $ref: '#/definitions/v4ModifyClusterRequestWorkersItemsAws' azure: $ref: '#/definitions/v4ModifyClusterRequestWorkersItemsAzure' cpu: $ref: '#/definitions/v4ModifyClusterRequestWorkersItemsCpu' labels: type: object additionalProperties: true memory: $ref: '#/definitions/v4ModifyClusterRequestWorkersItemsMemory' storage: $ref: '#/definitions/v4ModifyClusterRequestWorkersItemsStorage' x-go-gen-location: models v4ModifyClusterRequestWorkersItemsAws: description: | Attributes specific to nodes running on Amazon Web Services (AWS) type: object properties: instance_type: description: | EC2 instance type name. Must be the same for all worker nodes of a cluster. type: string x-go-gen-location: models v4ModifyClusterRequestWorkersItemsAzure: description: | Attributes specific to nodes running on Microsoft Azure type: object properties: vm_size: description: | Azure Virtual Machine size. Must be the same for all worker nodes of a cluster. type: string x-go-gen-location: models v4ModifyClusterRequestWorkersItemsCpu: type: object properties: cores: description: Number of CPU cores type: integer x-go-gen-location: models v4ModifyClusterRequestWorkersItemsMemory: type: object properties: size_gb: description: RAM size in GB. Can be an integer or float. type: number x-go-gen-location: models v4ModifyClusterRequestWorkersItemsStorage: type: object properties: size_gb: description: Node storage size in GB. Can be an integer or float. type: number x-go-gen-location: models v4Organization: type: object properties: id: description: Unique name/identifier of the organization type: string members: description: List of members that belong to this organization type: array items: $ref: '#/definitions/v4OrganizationMembersItems' v4OrganizationListItem: type: object properties: id: description: Unique name/identifier of the organization type: string v4OrganizationMember: type: object properties: email: description: Email address of the user type: string v4OrganizationMembersItems: type: object properties: email: description: Email address of the user type: string x-go-gen-location: models v4ReleaseListItem: type: object required: - version - timestamp - changelog - components properties: active: description: | If true, the version is available for new clusters and cluster upgrades. Older versions become unavailable and thus have the value `false` here. type: boolean changelog: description: | Structured list of changes in this release, in comparison to the previous version, with respect to the contained components. type: array items: $ref: '#/definitions/v4ReleaseListItemChangelogItems' components: description: | List of components and their version contained in the release type: array items: $ref: '#/definitions/v4ReleaseListItemComponentsItems' timestamp: description: Date and time of the release creation type: string version: description: The semantic version number type: string v4ReleaseListItemChangelogItems: type: object properties: component: description: | If the changed item was a component, this attribute is the name of the component. type: string description: description: Human-friendly description of the change type: string x-go-gen-location: models v4ReleaseListItemComponentsItems: type: object required: - name - version properties: name: description: Name of the component type: string version: description: Version number of the component type: string x-go-gen-location: models v4UserListItem: type: object properties: created: description: The date and time that this account was created type: string email: description: Email address of the user type: string expiry: description: The date and time when this account will expire type: string securityDefinitions: AuthorizationHeaderToken: description: | Clients authenticate by passing an auth token via the `Authorization` header with a value of the format `giantswarm `. Auth tokens can be obtained using the [createAuthToken](#operation/createAuthToken) operation. type: apiKey name: Authorization in: header security: - AuthorizationHeaderToken: [] tags: - description: | Auth Tokens are your way of authenticating against this API. You can create one by passing your email and base64 encoded password to the create auth token endpoint. The auth token never expires, in case you want to invalidate it you need to delete it (logout). name: auth tokens - description: | Clusters are a central resource of the Giant Swarm API. As a user or team using Giant Swarm, you set up Kubernetes clusters to run your own workloads. The API currently provides operations to create and delete clusters, as well as list all available clusters and get details on specific clusters. name: clusters - description: Information about the Giant Swarm installation name: info - description: A key pair is a unique combination of a X.509 certificate and a private key. Key pairs are used to access the Kubernetes API of a cluster, both using `kubectl` and any standard web browser. name: key pairs externalDocs: description: 'User guide: Accessing Pods and Services from the Outside' url: https://docs.giantswarm.io/guides/accessing-services-from-the-outside/ - description: Organizations are groups of users who own resources like clusters. name: organizations - description: A user represents a person that should have access to the Giant Swarm API. Users can belong to many groups, and are identified by email address. name: users - description: | A release is a software bundle that constitutes a cluster. Releases are identified by their [semantic version number](http://semver.org/) in the `MAJOR.MINOR.PATCH` format. A release provides _components_, like for example Kubernetes. For each release the contained components are listed. Changes in components are detailed in the _changelog_ of a release. name: releases validate-0.24.0/fixtures/bugs/1621/definitions.yaml000066400000000000000000000465761457312750000220150ustar00rootroot00000000000000definitions: # Generic response model V4GenericResponse: type: object properties: message: type: string description: A human readable message code: type: string description: | A machine readable [response code](https://github.com/giantswarm/api-spec/blob/master/details/RESPONSE_CODES.md) like e. g. `INVALID_CREDENTIALS` # Info resposne V4InfoResponse: type: object properties: general: description: General information type: object properties: installation_name: description: Unique name of the installation type: string provider: description: The technical provider used in this installation. Either "kvm", "aws", or "azure". type: string datacenter: description: Identifier of the datacenter or cloud provider region, e. g. "eu-west-1" type: string workers: description: Information related to worker nodes type: object properties: count_per_cluster: description: Number of workers per cluster type: object properties: max: description: Maximum number of worker a cluster can have type: number default: description: Default number of workers in a new cluster will have, if not specifiec otherwise type: number instance_type: description: Instance types to be used for worker nodes. Only available for AWS clusters. type: object properties: options: description: List of available instance types type: array items: type: string default: description: The instance type used in new cluster, if not specified type: string vm_size: description: Azure Virtual Machine size to be used for worker nodes. Only available for Azure clusters. type: object properties: options: description: List of available instance types type: array items: type: string default: description: The instance type used in new cluster, if not specified type: string # Request to create a new cluster V4AddClusterRequest: type: object required: - owner description: Request model for creating a new cluster properties: owner: type: string description: Name of the organization owning the cluster name: type: string description: Cluster name release_version: type: string description: | The [release](https://docs.giantswarm.io/api/#tag/releases) version to use in the new cluster kubernetes_version: type: string description: | Kubernetes version number (deprecated). Doesn't have any effect. This attribute is going to be removed in future API versions. workers: type: array items: $ref: '#/definitions/V4NodeDefinition' V4ModifyClusterRequest: type: object required: [] description: Request body for cluster modification properties: name: type: string description: Name for the cluster owner: type: string description: Name of the organization owning the cluster release_version: type: string description: Release version to use after an upgrade workers: type: array description: Worker node array items: $ref: '#/definitions/V4NodeDefinition' # Details on existing cluster V4ClusterDetailsResponse: type: object description: Response model showing details of a cluster properties: id: type: string description: Unique cluster identifier api_endpoint: type: string description: URI of the Kubernetes API endpoint create_date: type: string description: Date/time of cluster creation owner: type: string description: Name of the organization owning the cluster name: type: string description: Cluster name release_version: type: string description: | The [release](https://docs.giantswarm.io/api/#tag/releases) version currently running this cluster. kubernetes_version: type: string description: Deprecated. Will be removed in a future API version. workers: type: array items: $ref: '#/definitions/V4NodeDefinition' kvm: type: object description: Attributes specific to clusters running on KVM (on-prem) installations. properties: port_mappings: type: array description: | Reveals the ports on the host cluster that are mapped to this guest cluster's ingress and which protocol that port supports. Only shown and relevant on our on-prem KVM clusters. items: type: object properties: port: description: | The port on the host cluster that will forward traffic to the guest cluster type: integer protocol: description: | The protocol this port mapping is made for. type: string # Definition of a cluster node V4NodeDefinition: type: object properties: aws: type: object description: | Attributes specific to nodes running on Amazon Web Services (AWS) properties: instance_type: type: string description: | EC2 instance type name. Must be the same for all worker nodes of a cluster. azure: type: object description: | Attributes specific to nodes running on Microsoft Azure properties: vm_size: type: string description: | Azure Virtual Machine size. Must be the same for all worker nodes of a cluster. memory: type: object properties: size_gb: type: number description: RAM size in GB. Can be an integer or float. storage: type: object properties: size_gb: type: number description: Node storage size in GB. Can be an integer or float. cpu: type: object properties: cores: type: integer description: Number of CPU cores labels: type: object additionalProperties: true # List of key pairs V4GetKeyPairsResponse: type: array description: Array of sparse key pair objects items: type: object properties: id: type: string description: Unique identifier of the key pair description: type: string description: Free text information about the key pair ttl_hours: type: integer description: Expiration time (from creation) in hours create_date: type: string description: Date/time of creation common_name: type: string description: The common name of the certificate subject. certificate_organizations: type: string description: The certificate subject's `organization` fields. # Add key pair request V4AddKeyPairRequest: type: object required: - description properties: description: type: string description: Free text information about the key pair ttl_hours: type: integer format: int32 description: Expiration time (from creation) in hours cn_prefix: type: string description: The common name prefix of the certificate subject. This only allows characters that are usable in domain names (`a-z`, `0-9`, and `.-`, where `.-` must not occur at either the start or the end). certificate_organizations: type: string description: | This will set the certificate subject's `organization` fields. Use a comma seperated list of values. V4AddKeyPairResponse: type: object properties: id: type: string description: Unique identifier of the key pair description: type: string description: Free text information about the key pair ttl_hours: type: integer description: Expiration time (from creation) in hours create_date: type: string description: Date/time of creation certificate_authority_data: type: string description: PEM-encoded CA certificate of the cluster client_key_data: type: string description: PEM-encoded RSA private key client_certificate_data: type: string description: PEM-encoded certificate # cluster metrics V4GetClusterMetricsResponse: description: Response for the getClusterMetrics operation type: object properties: workers: description: Group of metrics regarding workers type: array items: $ref: '#/definitions/V4NodeMetrics' V4NodeMetrics: type: object properties: id: description: String identifying the node type: string metrics: description: Container object for all metrics available for the node type: object properties: container_count: type: object properties: timestamp: description: Time when the given value has been recorded type: string value: description: The value for the metric. Can be an integer or float. type: number pod_count: type: object properties: timestamp: description: Time when the given value has been recorded type: string value: description: The value for the metric. Can be an integer or float. type: number cpu_used: type: object properties: timestamp: description: Time when the given value has been recorded type: string value: description: The value for the metric. Can be an integer or float. type: number ram_free: type: object properties: timestamp: description: Time when the given value has been recorded type: string value: description: The value for the metric. Can be an integer or float. type: number ram_available: type: object properties: timestamp: description: Time when the given value has been recorded type: string value: description: The value for the metric. Can be an integer or float. type: number ram_cached: type: object properties: timestamp: description: Time when the given value has been recorded type: string value: description: The value for the metric. Can be an integer or float. type: number ram_buffers: type: object properties: timestamp: description: Time when the given value has been recorded type: string value: description: The value for the metric. Can be an integer or float. type: number ram_mapped: type: object properties: timestamp: description: Time when the given value has been recorded type: string value: description: The value for the metric. Can be an integer or float. type: number node_storage_used: type: object properties: timestamp: description: Time when the given value has been recorded type: string value: description: The value for the metric. Can be an integer or float. type: number network_rx: type: object properties: timestamp: description: Time when the given value has been recorded type: string value: description: The value for the metric. Can be an integer or float. type: number network_tx: type: object properties: timestamp: description: Time when the given value has been recorded type: string value: description: The value for the metric. Can be an integer or float. type: number resource_cpu_requests: type: object properties: timestamp: description: Time when the given value has been recorded type: string value: description: The value for the metric. Can be an integer or float. type: number resource_cpu_limits: type: object properties: timestamp: description: Time when the given value has been recorded type: string value: description: The value for the metric. Can be an integer or float. type: number resource_ram_requests: type: object properties: timestamp: description: Time when the given value has been recorded type: string value: description: The value for the metric. Can be an integer or float. type: number resource_ram_limits: type: object properties: timestamp: description: Time when the given value has been recorded type: string value: description: The value for the metric. Can be an integer or float. type: number # a complete organization object V4Organization: type: object properties: id: type: string description: Unique name/identifier of the organization members: type: array description: List of members that belong to this organization items: $ref: '#/definitions/V4OrganizationMember' # An organization as returned by getOrganizations as an array item V4OrganizationListItem: type: object properties: id: type: string description: Unique name/identifier of the organization # A user that belongs to an organization V4OrganizationMember: type: object properties: email: type: string description: Email address of the user # One of the users in the array as returned by getUsers V4UserListItem: type: object properties: email: type: string description: Email address of the user created: type: string description: The date and time that this account was created expiry: type: string description: The date and time when this account will expire # A cluster array item, as return by getClusters V4ClusterListItem: type: object properties: id: type: string description: Unique cluster identifier create_date: type: string description: Date/time of cluster creation name: type: string description: Cluster name owner: type: string description: Name of the organization owning the cluster release_version: type: string description: The semantic version number of this cluster # A cluster array item, as return by getClusters V4ReleaseListItem: type: object required: ["version", "timestamp", "changelog", "components"] properties: version: type: string description: The semantic version number timestamp: type: string description: Date and time of the release creation active: type: boolean description: | If true, the version is available for new clusters and cluster upgrades. Older versions become unavailable and thus have the value `false` here. changelog: description: | Structured list of changes in this release, in comparison to the previous version, with respect to the contained components. type: array items: type: object properties: component: type: string description: | If the changed item was a component, this attribute is the name of the component. description: type: string description: Human-friendly description of the change components: description: | List of components and their version contained in the release type: array items: type: object required: ["name", "version"] properties: name: type: string description: Name of the component version: type: string description: Version number of the component V4CreateUserRequest: type: object required: - password description: Request model for creating a new user properties: password: type: string description: A Base64 encoded password expiry: type: string description: The date and time when this account will expire V4AddCredentialsRequest: type: object required: - provider description: Request model for adding a set of credentials properties: provider: type: string aws: type: object description: Credentials specific to an AWS account required: - roles properties: roles: type: object description: IAM roles to assume by certain entities required: - awsoperator - admin properties: admin: type: string description: ARN of the IAM role to assume by Giant Swarm support staff awsoperator: type: string description: ARN of the IAM role to assume by the software operating clusters # A request for an auth token V4CreateAuthTokenRequest: type: object properties: email: type: string description: Your email address password_base64: type: string description: Your password as a base64 encoded string # A response to a successful auth token request V4CreateAuthTokenResponse: type: object properties: auth_token: type: string description: The newly created API token validate-0.24.0/fixtures/bugs/1621/fixture-1621.yaml000066400000000000000000001462511457312750000215460ustar00rootroot00000000000000swagger: "2.0" info: title: The Giant Swarm API v4 description: | This is the documentation for the Giant Swarm API starting at version `v4`. For an introduction to Giant Swarm, refer to the [documentation site](https://docs.giantswarm.io/). The Giant Swarm API attempts to behave in a __restful__ way. As a developer, you access resources using the `GET` method and, for example, delete them using the same path and the `DELETE` method. Accessing resources via GET usually returns all information available about a resource, while collections, like for example the list of all clusters you have access to, only contain a selected few attributes of each member item. Some requests, like for example the request to create a new cluster, don't return the resource itself. Instead, the response delivers a standard message body, showing a `code` and a `message` part. The `message` contains information for you or a client's end user. The `code` attribute contains some string (example: `RESOURCE_CREATED`) that is supposed to give you details on the state of the operation, in addition to standard HTTP status codes. This message format is also used in the case of errors. We provide a [list of all response codes](https://github.com/giantswarm/api-spec/blob/master/details/RESPONSE_CODES.md) outside this documentation. Feedback on the API as well as this documentation is welcome via `support@giantswarm.io` or on IRC channel [#giantswarm](irc://irc.freenode.org:6667/#giantswarm) on freenode. ## Source The source of this documentation is available on [GitHub](https://github.com/giantswarm/api-spec). termsOfService: https://giantswarm.io/terms/ version: 4.0.0 license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html consumes: - application/json produces: - application/json tags: - name: auth tokens description: | Auth Tokens are your way of authenticating against this API. You can create one by passing your email and base64 encoded password to the create auth token endpoint. The auth token never expires, in case you want to invalidate it you need to delete it (logout). - name: clusters description: | Clusters are a central resource of the Giant Swarm API. As a user or team using Giant Swarm, you set up Kubernetes clusters to run your own workloads. The API currently provides operations to create and delete clusters, as well as list all available clusters and get details on specific clusters. - name: info description: Information about the Giant Swarm installation - name: key pairs description: A key pair is a unique combination of a X.509 certificate and a private key. Key pairs are used to access the Kubernetes API of a cluster, both using `kubectl` and any standard web browser. externalDocs: url: https://docs.giantswarm.io/guides/accessing-services-from-the-outside/ description: "User guide: Accessing Pods and Services from the Outside" - name: organizations description: Organizations are groups of users who own resources like clusters. - name: users description: A user represents a person that should have access to the Giant Swarm API. Users can belong to many groups, and are identified by email address. - name: releases description: | A release is a software bundle that constitutes a cluster. Releases are identified by their [semantic version number](http://semver.org/) in the `MAJOR.MINOR.PATCH` format. A release provides _components_, like for example Kubernetes. For each release the contained components are listed. Changes in components are detailed in the _changelog_ of a release. securityDefinitions: AuthorizationHeaderToken: description: | Clients authenticate by passing an auth token via the `Authorization` header with a value of the format `giantswarm `. Auth tokens can be obtained using the [createAuthToken](#operation/createAuthToken) operation. type: apiKey name: Authorization in: header security: - AuthorizationHeaderToken: [] paths: /v4/info/: get: operationId: getInfo tags: - info summary: Get information on the installation description: | Returns a set of details on the installation. The output varies based on the provider used in the installation. This information is useful for example when creating new cluster, to prevent creating clusters with more worker nodes than possible. ### Example for an AWS-based installation ```json { "general": { "installation_name": "shire", "provider": "aws", "datacenter": "eu-central-1" }, "workers": { "count_per_cluster": { "max": 20, "default": 3 }, "instance_type": { "options": [ "m3.medium", "m3.large", "m3.xlarge" ], "default": "m3.large" } } } ``` ### Example for a KVM-based installation ```json { "general": { "installation_name": "isengard", "provider": "kvm", "datacenter": "string" }, "workers": { "count_per_cluster": { "max": 8, "default": 3 }, } } ``` parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' responses: "200": description: Information schema: $ref: "./definitions.yaml#/definitions/V4InfoResponse" examples: application/json: { "general": { "installation_name": "shire", "provider": "aws", "datacenter": "eu-central-1" }, "workers": { "count_per_cluster": { "max": 20, "default": 3 }, "instance_type": { "options": [ "m3.medium", "m3.large", "m3.xlarge" ], "default": "m3.large" } } } "401": $ref: "./responses.yaml#/responses/V4Generic401Response" default: description: Error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" /v4/auth-tokens/: post: operationId: createAuthToken tags: - auth tokens summary: Create Auth Token (Login) description: | Creates a Auth Token for a given user. Must authenticate with email and password. parameters: - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' - name: body in: body required: true description: Create Auth Token Request schema: $ref: 'definitions.yaml#/definitions/V4CreateAuthTokenRequest' x-examples: application/json: { "email": "developer@example.com", "password_base64": "cGFzc3dvcmQ=" } responses: "200": description: Success schema: $ref: "./definitions.yaml#/definitions/V4CreateAuthTokenResponse" examples: application/json: { "auth_token": "e5239484-2299-41df-b901-d0568db7e3f9" } "401": $ref: "./responses.yaml#/responses/V4Generic401Response" delete: operationId: deleteAuthToken tags: - auth tokens summary: Delete Auth Token (Logout) description: | Deletes the authentication token provided in the Authorization header. This effectively logs you out. parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' responses: "200": description: Success schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_DELETED", "message": "The authentication token has been succesfully deleted." } "401": $ref: "./responses.yaml#/responses/V4Generic401Response" /v4/users/: get: operationId: getUsers tags: - users summary: Get users description: | Returns a list of all users in the system. Currently this endpoint is only available to users with admin permissions. parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' responses: "200": description: Success schema: type: array items: $ref: "./definitions.yaml#/definitions/V4UserListItem" examples: application/json: [ {"email": "andy@example.com", "created": "2017-01-15T12:00:00Z", "expiry": "2019-01-15T00:00:00Z"}, {"email": "bob@example.com", "created": "2017-02-15T12:30:00Z", "expiry": "2020-01-15T00:00:00Z"}, {"email": "charles@example.com", "created": "2017-03-15T13:00:00Z", "expiry": "2021-01-15T00:00:00Z"} ] "401": $ref: "./responses.yaml#/responses/V4Generic401Response" default: description: Error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" /v4/user/: get: operationId: getCurrentUser tags: - users summary: Get current user description: | Returns details about the currently authenticated user parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' responses: "200": description: Success schema: $ref: "./definitions.yaml#/definitions/V4UserListItem" examples: application/json: {"email": "andy@example.com", "created": "2017-01-15T12:00:00Z", "expiry": "2019-01-15T00:00:00Z"} "401": $ref: "./responses.yaml#/responses/V4Generic401Response" default: description: Error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" /v4/users/{email}/: get: operationId: getUser parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' - $ref: "./parameters.yaml#/parameters/UserEmailPathParameter" tags: - users summary: Get user description: | Returns details about a specific user responses: "200": description: Success schema: $ref: "./definitions.yaml#/definitions/V4UserListItem" examples: application/json: {"email": "andy@example.com", "created": "2017-01-15T12:00:00Z", "expiry": "2019-01-15T00:00:00Z"} "401": $ref: "./responses.yaml#/responses/V4Generic401Response" "404": description: User not found schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_NOT_FOUND", "message": "The user could not be found. (not found: user with email 'bob@example.com' could not be found)" } default: description: Error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" put: operationId: createUser parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' - $ref: "./parameters.yaml#/parameters/UserEmailPathParameter" - name: body in: body required: true description: User account details schema: $ref: "./definitions.yaml#/definitions/V4CreateUserRequest" x-examples: application/json: { "password": "cGFzc3dvcmQ=", "expiry": "2020-01-01T12:00:00.000Z" } tags: - users summary: Create user description: | Creates a users in the system. Currently this endpoint is only available to users with admin permissions. responses: "201": description: User created schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_CREATED", "message": "The user with email 'bob@example.com' has been created." } "400": description: User already exists schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_ALREADY_EXISTS", "message": "The user could not be created. (invalid input: email 'bob@example.com' already exists)" } "401": $ref: "./responses.yaml#/responses/V4Generic401Response" default: description: Error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" delete: operationId: deleteUser parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' - $ref: "./parameters.yaml#/parameters/UserEmailPathParameter" tags: - users summary: Delete user description: | Deletes a users in the system. Currently this endpoint is only available to users with admin permissions. responses: "200": description: User deleted schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_DELETED", "message": "The user with email 'bob@example.com' has been deleted." } "401": $ref: "./responses.yaml#/responses/V4Generic401Response" "404": description: User not found schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_NOT_FOUND", "message": "The user could not be deleted. (not found: user with email 'bob@example.com' could not be found)" } default: description: Error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" /v4/clusters/: get: operationId: getClusters tags: - clusters summary: Get clusters description: | This operation fetches a list of clusters. The result depends on the permissions of the user. A normal user will get all the clusters the user has access to, via organization membership. A user with admin permission will receive a list of all existing clusters. The result array items are sparse representations of the cluster objects. To fetch more details on a cluster, use the [getCluster](#operation/getCluster) operation. parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' responses: "200": description: Success schema: type: array items: $ref: "./definitions.yaml#/definitions/V4ClusterListItem" examples: application/json: [ { "id": "g8s3o", "create_date": "2017-06-08T12:31:47.215Z", "name": "Staging Cluster", "owner": "acme" }, { "id": "3dkr6", "create_date": "2017-05-22T13:58:02.024Z", "name": "Test Cluster", "owner": "testorg" } ] "401": $ref: "./responses.yaml#/responses/V4Generic401Response" default: description: Error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" post: operationId: addCluster tags: - clusters summary: Create cluster description: | This operation is used to create a new Kubernetes cluster for an organization. The desired configuration can be specified using the __cluster definition format__ (see [external documentation](https://github.com/giantswarm/api-spec/blob/master/details/CLUSTER_DEFINITION.md) for details). The cluster definition format allows to set a number of optional configuration details, like memory size and number of CPU cores. However, one attribute is __mandatory__ upon creation: The `owner` attribute must carry the name of the organization the cluster will belong to. Note that the acting user must be a member of that organization in order to create a cluster. It is *recommended* to also specify the `name` attribute to give the cluster a friendly name, like e. g. "Development Cluster". Additional definition attributes can be used. Where attributes are omitted, default configuration values will be applied. For example, if no `release_version` is specified, the most recent version is used. The `workers` attribute, if present, must contain an array of node definition objects. The number of objects given determines the number of workers created. For example, requesting three worker nodes with default configuration can be achieved by submitting an array of three empty objects: ```"workers": [{}, {}, {}]``` For clusters on AWS, note that all worker nodes must use the same instance type. parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' - name: body in: body required: true description: New cluster definition schema: $ref: "./definitions.yaml#/definitions/V4AddClusterRequest" x-examples: application/json: { "owner": "myteam", "release_version": "1.4.2", "name": "Example cluster with 3 default worker nodes", "workers": [{}, {}, {}] } responses: "201": description: Cluster created headers: Location: type: string description: URI to obtain details on the new cluster using the [getCluster](#operation/getCluster) operation schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_CREATED", "message": "A new cluster has been created with ID 'wqtlq'" } "401": $ref: "./responses.yaml#/responses/V4Generic401Response" default: description: error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" /v4/clusters/{cluster_id}/: get: operationId: getCluster tags: - clusters parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' - $ref: "./parameters.yaml#/parameters/ClusterIdPathParameter" summary: Get cluster details description: | This operation allows to obtain all available details on a particular cluster. responses: "200": description: Cluster details schema: $ref: "./definitions.yaml#/definitions/V4ClusterDetailsResponse" examples: application/json: { "id": "wqtlq", "create_date": "2017-03-03T10:50:45.949270905Z", "api_endpoint": "https://api.wqtlq.example.com", "name": "Just a Standard Cluster", "release_version": "2.5.16", "kubernetes_version": "", "owner": "acme", "workers": [ { "memory": {"size_gb": 2.0}, "storage": {"size_gb": 20.0}, "cpu": {"cores": 4}, "labels": { "beta.kubernetes.io/arch": "amd64", "beta.kubernetes.io/os": "linux", "ip": "10.3.11.2", "kubernetes.io/hostname": "worker-1.x882ofna.k8s.gigantic.io", "nodetype": "hicpu" } }, { "memory": {"size_gb": 8.0}, "storage": {"size_gb": 20.0}, "cpu": {"cores": 2}, "labels": { "beta.kubernetes.io/arch": "amd64", "beta.kubernetes.io/os": "linux", "ip": "10.3.62.2", "kubernetes.io/hostname": "worker-2.x882ofna.k8s.gigantic.io", "nodetype": "hiram" } } ], "kvm": { "port_mappings": [ { "port": 30020, "protocol": "http" }, { "port": 30021, "protocol": "https" }, ] } } "401": $ref: "./responses.yaml#/responses/V4Generic401Response" "404": description: Cluster not found schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_NOT_FOUND", "message": "The cluster with ID 'wqtlq' could not be found, or perhaps you do not have access to it. Please make sure the cluster ID is correct, and that you are a member of the organization that it belongs to." } default: description: error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" patch: operationId: modifyCluster tags: - clusters parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' - name: body in: body required: true description: Merge-patch body schema: $ref: "./definitions.yaml#/definitions/V4ModifyClusterRequest" x-examples: application/merge-patch+json: { "name": "New cluster name" } - $ref: "./parameters.yaml#/parameters/ClusterIdPathParameter" summary: Modify cluster description: | This operation allows to modify an existing cluster. A cluster modification is performed by submitting a `PATCH` request to the cluster resource (as described in the [addCluster](#operation/addCluster) and [getCluster](#operation/getCluster)) in form of a [JSON Patch Merge (RFC 7386)](https://tools.ietf.org/html/rfc7386). This means, only the attributes to be modified have to be contained in the request body. The following attributes can be modified: - `name`: Rename the cluster to something more fitting. - `owner`: Changing the owner organization name means to change cluster ownership from one organization to another. The user performing the request has to be a member of both organizations. - `release_version`: By changing this attribute you can upgrade a cluster to a newer [release](https://docs.giantswarm.io/api/#tag/releases). - `workers`: By modifying the array of workers, nodes can be added to increase the cluster's capacity. See details below. ### Adding and Removing Worker Nodes (Scaling) Adding worker nodes to a cluster or removing worker nodes from a cluster works by submitting the `workers` attribute, which contains a (sparse) array of worker node defintions. _Sparse_ here means that all configuration details are optional. In the case that worker nodes are added to a cluster, wherever a configuration detail is missing, defaults will be applied. See [Creating a cluster](#operation/addCluster) for details. When modifying the cluster resource, you describe the desired state. For scaling, this means that the worker node array submitted must contain as many elements as the cluster should have worker nodes. If your cluster currently has five nodes and you submit a workers array with four elements, this means that one worker node will be removed. If your submitted workers array has six elements, this means one will be added. As an example, this request body could be used to scale a cluster to three worker nodes: ```json { "workers": [{}, {}, {}] } ``` If the scaled cluster had four worker nodes before, one would be removed. If it had two worker nodes before, one with default settings would be added. ### Limitations - As of now, existing worker nodes cannot be modified. - When removing nodes (scaling down), it is not possible to determine which nodes will be removed. - On AWS based clusters, all worker nodes must use the same EC2 instance type (`instance_type` node attribute). By not setting an `instance_type` when submitting a PATCH request, you ensure that the right instance type is used automatically. responses: "200": description: Cluster modified schema: $ref: "./definitions.yaml#/definitions/V4ClusterDetailsResponse" "401": $ref: "./responses.yaml#/responses/V4Generic401Response" "404": description: Cluster not found schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_NOT_FOUND", "message": "The cluster with ID 'wqtlq' could not be found, or perhaps you do not have access to it. Please make sure the cluster ID is correct, and that you are a member of the organization that it belongs to." } default: description: error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" delete: operationId: deleteCluster tags: - clusters parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' - $ref: "./parameters.yaml#/parameters/ClusterIdPathParameter" summary: Delete cluster description: | This operation allows to delete a cluster. __Caution:__ Deleting a cluster causes the termination of all workloads running on the cluster. Data stored on the worker nodes will be lost. There is no way to undo this operation. The response is sent as soon as the request is validated. At that point, workloads might still be running on the cluster and may be accessible for a little wile, until the cluster is actually deleted. responses: "202": description: Deleting cluster schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_DELETION_STARTED", "message": "The cluster with ID 'wqtlq' is being deleted." } "401": $ref: "./responses.yaml#/responses/V4Generic401Response" "404": description: Cluster not found schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_NOT_FOUND", "message": "The cluster with ID 'wqtlq' could not be found, or perhaps you do not have access to it. Please make sure the cluster ID is correct, and that you are a member of the organization that it belongs to." } default: description: error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" /v4/clusters/{cluster_id}/key-pairs/: get: operationId: getKeyPairs tags: - key pairs summary: Get key pairs description: | Returns a list of information on all key pairs of a cluster as an array. The individual array items contain metadata on the key pairs, but neither the key nor the certificate. These can only be obtained upon creation, using the [addKeypair](#operation/addKeyPair) operation. parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' - $ref: "./parameters.yaml#/parameters/ClusterIdPathParameter" responses: "200": description: Key pairs schema: $ref: "./definitions.yaml#/definitions/V4GetKeyPairsResponse" "401": $ref: "./responses.yaml#/responses/V4Generic401Response" default: description: error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" post: operationId: addKeyPair tags: - key pairs summary: Create key pair parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' - $ref: "./parameters.yaml#/parameters/ClusterIdPathParameter" - name: body in: body required: true description: | While the `ttl_hours` attribute is optional and will be set to a default value when omitted, the `description` is mandatory. schema: $ref: "./definitions.yaml#/definitions/V4AddKeyPairRequest" x-examples: application/json: { "description": "Admin key pair lasting twelve hours", "ttl_hours": 12, "certificate_organizations": "system:masters" } description: | This operation allows to create a new key pair for accessing a specific cluster. A key pair consists of an unencrypted private RSA key and an X.509 certificate. In addition, when obtaining a key pair for a cluster, the cluster's certificate authority file (CA certificate) is delivered, which is required by TLS clients to establish trust to the cluster. In addition to the credentials itself, a key pair has some metadata like a unique ID, a creation timestamp and a free text `description` that you can use at will, for example to note for whom a key pair has been issued. ### Customizing the certificate's subject for K8s RBAC It is possible to set the Common Name and Organization fields of the generated certificate's subject. - `cn_prefix`: The certificate's common name uses this format: `.user.`. `clusterdomain` is specific to your cluster and is not editable. The `cn_prefix` however is editable. When left blank it will default to the email address of the Giant Swarm user that is performing the create key pair request. The common name is used as the username for requests to the Kubernetes API. This allows you to set up role-based access controls. - `certificate_organizations`: This will set the certificate's `organization` fields. Use a comma separated list of values. The Kubernetes API will use these values as group memberships. __Note:__ The actual credentials coming with the key pair (key, certificate) can only be accessed once, as the result of the `POST` request that triggers their creation. This restriction exists to minimize the risk of credentials being leaked. If you fail to capture the credentials upon creation, you'll have to repeat the creation request. responses: "200": description: Success schema: $ref: "./definitions.yaml#/definitions/V4AddKeyPairResponse" examples: application/json: { "certificate_authority_data": "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----", "client_key_data": "-----BEGIN RSA PRIVATE KEY-----...-----END RSA PRIVATE KEY-----", "client_certificate_data": "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----", "create_date": "2016-06-01T12:00:00.000Z", "description": "Key pair description", "id": "02:cc:da:f9:fb:ce:c3:e5:e1:f6:27:d8:43:48:0d:37:4a:ee:b9:67", "ttl_hours": 8640 } "401": $ref: "./responses.yaml#/responses/V4Generic401Response" /v4/organizations/: get: operationId: getOrganizations tags: - organizations summary: Get organizations description: | This operation allows to fetch a list of organizations the user is a member of. In the case of an admin user, the result includes all existing organizations. parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' responses: "200": description: Success schema: type: array items: $ref: "./definitions.yaml#/definitions/V4OrganizationListItem" examples: application/json: [ {"id": "acme"}, {"id": "giantswarm"}, {"id": "testorg"} ] "401": $ref: "./responses.yaml#/responses/V4Generic401Response" default: description: Error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" /v4/organizations/{organization_id}/: get: operationId: getOrganization tags: - organizations summary: Get organization details description: | This operation fetches organization details. parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' - $ref: "./parameters.yaml#/parameters/OrganizationIdPathParameter" responses: "200": description: Organization details schema: $ref: "./definitions.yaml#/definitions/V4Organization" examples: application/json: { "id": "acme", "members": [ {"email": "user1@example.com"}, {"email": "user2@example.com"} ] } "401": $ref: "./responses.yaml#/responses/V4Generic401Response" "404": description: Organization not found schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_NOT_FOUND", "message": "The organization could not be found. (not found: the organization with id 'acme' could not be found)" } default: description: Error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" put: operationId: addOrganization tags: - organizations summary: Create an organization description: | This operation allows a user to create an organization. parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' - $ref: "./parameters.yaml#/parameters/OrganizationIdPathParameter" - name: body in: body required: true schema: $ref: "./definitions.yaml#/definitions/V4Organization" x-examples: application/json: { "id": "string", "members": [ {"email": "myself@example.com"}, {"email": "colleague@example.com"} ] } responses: "201": description: Organization created schema: $ref: "./definitions.yaml#/definitions/V4Organization" examples: application/json: { "id": "acme", "members": [ {"email": "user1@example.com"}, {"email": "user2@example.com"} ] } "401": $ref: "./responses.yaml#/responses/V4Generic401Response" "409": description: Organization already exists schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_ALREADY_EXISTS", "message": "The organization could not be created. (org already exists)" } default: description: Error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" patch: operationId: modifyOrganization tags: - organizations parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' - $ref: "./parameters.yaml#/parameters/OrganizationIdPathParameter" - name: body in: body required: true schema: type: object properties: members: type: array description: List of members that belong to this organization items: $ref: "./definitions.yaml#/definitions/V4OrganizationMember" x-examples: application/merge-patch+json: { "members": [{"email": "myself@example.com"}] } summary: Modify organization description: | This operation allows you to modify an existing organization. You must be a member of the organization or an admin in order to use this endpoint. The following attributes can be modified: - `members`: By modifying the array of members, members can be added to or removed from the organization The request body must conform with the [JSON Patch Merge (RFC 7386)](https://tools.ietf.org/html/rfc7386) standard. Requests have to be sent with the `Content-Type: application/merge-patch+json` header. The full request must be valid before it will be executed, currently this means every member you attempt to add to the organization must actually exist in the system. If any member you attempt to add is invalid, the entire patch operation will fail, no members will be added or removed, and an error message will explain which members in your request are invalid. responses: "200": description: Organization modified schema: $ref: "./definitions.yaml#/definitions/V4Organization" "400": description: Invalid input schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "INVALID_INPUT", "message": "The organization could not be modified. (invalid input: user 'invalid-email' does not exist or is invalid)" } "401": $ref: "./responses.yaml#/responses/V4Generic401Response" "404": description: Organization not found schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_NOT_FOUND", "message": "The organization could not be modified. (not found: the organization with id 'acme' could not be found)" } default: description: error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" delete: operationId: deleteOrganization tags: - organizations summary: Delete an organization description: | This operation allows a user to delete an organization that they are a member of. Admin users can delete any organization. parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' - $ref: "./parameters.yaml#/parameters/OrganizationIdPathParameter" responses: "200": description: Organization deleted schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_DELETED", "message": "The organization with ID 'acme' has been deleted." } "401": $ref: "./responses.yaml#/responses/V4Generic401Response" "404": description: Organization not found schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_NOT_FOUND", "message": "The organization could not be deleted. (not found: the organization with id 'acme' could not be found)" } default: description: Error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" /v4/organizations/{organization_id}/credentials/: post: operationId: addCredentials tags: - organizations summary: Set credentials description: | Add a set of credentials to the organization allowing the creation and operation of clusters within a cloud provider account/subscription. The actual type of these credentials depends on the cloud provider the installation is running on. Currently, only AWS is supported, with support for Azure being planned for the near future. Credentials in an organization are immutable. Each organization can only have one set of credentials. Once credentials have been set for an organization, they are used for every new cluster that will be created for the organization. ### Example request body for AWS ```json { "provider": "aws", "aws": { "roles": { "admin": "arn:aws:iam::123456789012:role/GiantSwarmAdmin", "awsoperator": "arn:aws:iam::123456789012:role/GiantSwarmAWSOperator" } } } ``` parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' - $ref: "./parameters.yaml#/parameters/OrganizationIdPathParameter" - name: body in: body required: true schema: $ref: "./definitions.yaml#/definitions/V4AddCredentialsRequest" x-examples: application/json: { "provider": "aws", "aws": { "roles": { "admin": "arn:aws:iam::123456789012:role/GiantSwarmAdmin", "awsoperator": "arn:aws:iam::123456789012:role/GiantSwarmAWSOperator" } } } responses: "201": description: Credentials created headers: Location: type: string description: URI of the new credentials resource schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_CREATED", "message": "A new set of credentials has been created with ID '5d9h4'" } "401": $ref: "./responses.yaml#/responses/V4Generic401Response" "409": description: Conflict schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "RESOURCE_ALREADY_EXISTS", "message": "The organisation already has a set of credentials" } default: description: error schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" /v4/releases/: get: operationId: getReleases tags: - releases summary: Get releases description: | Lists all releases available for new clusters or for upgrading existing clusters. Might also serve as an archive to obtain details on older releases. parameters: - $ref: './parameters.yaml#/parameters/RequiredGiantSwarmAuthorizationHeader' - $ref: './parameters.yaml#/parameters/XRequestIDHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmActivityHeader' - $ref: './parameters.yaml#/parameters/XGiantSwarmCmdLineHeader' responses: "200": description: Releases list schema: type: array items: $ref: "./definitions.yaml#/definitions/V4ReleaseListItem" examples: application/json: [ { "version": "1.14.9", "timestamp": "2017-09-21T08:14:03.37759Z", "changelog": [ { "component": "kubernetes", "description": "Security fixes" }, { "component": "calico", "description": "Security fixes" } ], "components": [ { "name": "kubernetes", "version": "1.5.8" }, { "name": "calico", "version": "0.9.1" } ], "active": false }, { "version": "2.8.4", "timestamp": "2017-11-11T12:24:56.59969Z", "changelog": [ { "component": "calico", "description": "Bugfix" } ], "components": [ { "name": "kubernetes", "version": "1.7.3" }, { "name": "calico", "version": "1.1.1" } ], "active": true } ] "401": $ref: "./responses.yaml#/responses/V4Generic401Response" validate-0.24.0/fixtures/bugs/1621/parameters.yaml000066400000000000000000000027031457312750000216250ustar00rootroot00000000000000parameters: RequiredGiantSwarmAuthorizationHeader: name: Authorization type: string in: header required: true description: As described in the [authentication](#section/Authentication) section ClusterIdPathParameter: name: cluster_id in: path required: true type: string description: Cluster ID UserEmailPathParameter: name: email in: path required: true type: string description: The user's email address OrganizationIdPathParameter: name: organization_id in: path required: true type: string description: | An ID for the organization. This ID must be unique and match this regular expression: ^[a-z0-9_]{4,30}$ XRequestIDHeader: name: X-Request-ID in: header type: string required: false description: | A randomly generated key that can be used to track a request throughout services of Giant Swarm. XGiantSwarmActivityHeader: name: X-Giant-Swarm-Activity in: header type: string required: false description: | Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. XGiantSwarmCmdLineHeader: name: X-Giant-Swarm-CmdLine in: header type: string required: false description: | If activity has been issued by a CLI, this header can contain the command line validate-0.24.0/fixtures/bugs/1621/responses.yaml000066400000000000000000000005411457312750000215010ustar00rootroot00000000000000responses: V4Generic401Response: description: Permission denied schema: $ref: "./definitions.yaml#/definitions/V4GenericResponse" examples: application/json: { "code": "PERMISSION_DENIED", "message": "The requested resource cannot be accessed using the provided authentication details." } validate-0.24.0/fixtures/bugs/18/000077500000000000000000000000001457312750000164335ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/18/headerItems.json000066400000000000000000000011111457312750000215520ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "0.0.1", "title": "test of Swagger invalid pattern in headers" }, "paths": { "/foo": { "get": { "responses": { "default": { "headers": { "X-Foo": { "type": "array", "items": { "type": "string", "pattern": ")<-- bad pattern" } } }, "description": "Generic Error" } } } } } } validate-0.24.0/fixtures/bugs/18/headers.json000066400000000000000000000013471457312750000207460ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "0.0.1", "title": "test of Swagger invalid pattern in headers" }, "paths": { "/foo": { "get": { "responses": { "default": { "headers": { "X-Foo": { "type": "string", "pattern": ")<-- bad pattern" } }, "description": "Generic Error" }, "402": { "headers": { "X-Foo": { "type": "string", "pattern": ")<-- bad pattern" } }, "description": "Generic Error" } } } } } } validate-0.24.0/fixtures/bugs/18/paramItems.json000066400000000000000000000012411457312750000214260ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "0.0.1", "title": "test of Swagger invalid pattern in items" }, "parameters": { "fooBody": { "name": "user", "in": "body", "description": "user to add to the system", "required": true, "schema": { "type": "array", "items": { "type": "string", "pattern": ")<-- bad pattern" } } } }, "paths": { "/foo": { "parameters": [ { "$ref": "#/parameters/fooBody" } ], "get": { "responses": { "200": { "description": "Successful" } } } } } } validate-0.24.0/fixtures/bugs/18/parameters.json000066400000000000000000000010421457312750000214660ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "0.0.1", "title": "test of Swagger invalid pattern in parameter" }, "parameters": { "userId": { "name": "userId", "in": "path", "type": "string", "pattern": ")<-- bad pattern", "required": true } }, "paths": { "/users/{userId}": { "parameters": [ { "$ref": "#/parameters/userId" } ], "get": { "responses": { "200": { "description": "Successful" } } } } } } validate-0.24.0/fixtures/bugs/18/schema.json000066400000000000000000000007151457312750000205710ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "0.0.1", "title": "test of Swagger invalid pattern in schema" }, "paths": { "/foo": { "get": { "produces": [ "text/plain" ], "responses": { "200": { "description": "Successful", "schema": { "type": "string", "pattern": ")<-- bad pattern" } } } } } } } validate-0.24.0/fixtures/bugs/2137/000077500000000000000000000000001457312750000165775ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/2137/fixture-2137.yaml000066400000000000000000000004461457312750000215470ustar00rootroot00000000000000swagger: "2.0" info: description: Test title: Test version: "0.0.1" basePath: /v1 consumes: - application/json produces: - application/json paths: /test/a: $ref: "#/paths/~1test" /test: get: operationId: test responses: 200: description: OK validate-0.24.0/fixtures/bugs/2527/000077500000000000000000000000001457312750000166025ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/2527/swagger-fixed.yml000066400000000000000000000162321457312750000220650ustar00rootroot00000000000000swagger: '2.0' info: title: Exchange Automator 2 version: '1.0' description: Exchange trading automator. Internal only service. host: localhost basePath: /api/v1 securityDefinitions: ApiKeyAuth: name: X-API-Key description: 'API keys are all predefined for all internal services' type: apiKey in: header security: - ApiKeyAuth: [] schemes: - https consumes: - application/json produces: - application/json responses: 401: description: Not authorized schema: $ref: '#/definitions/Error' 422: description: Unprocessable entity schema: $ref: '#/definitions/Error' 503: description: Service temporarily unavailable schema: $ref: '#/definitions/Error' tags: - name: Currency exchange rate description: Get exchange currency rate info - name: Deposit - name: Trading parameters: Exchange: name: exchange in: query type: string enum: [kraken, globitex, binance, cex] description: Exchange Id definitions: Exchange: type: string enum: [kraken, globitex, binance, cex] description: Exchange Id CurrencyRate: type: object properties: exchange: type: string timestamp: description: Most likely near to current moment type: integer format: int64 source: type: string description: Source currency ticker target: type: string description: Target currency ticker rate: type: number format: double sourceAmount: type: number format: double targetAmount: type: number format: double Deposit: type: object description: Field list is not final, will be added during development properties: exchange: $ref: '#/definitions/Exchange' accountId: type: string format: uuid txId: description: Transaction Id type: string clientId: description: Client Id, identified via external system, after receiving ticker: type: string amount: type: number format: double ExchangeOrder: type: object required: - exchange - incomingTxId - source - target - sourceAmount properties: id: type: string description: Created order Id type: type: string description: defaults to 'market' enum: [market, limit] exchange: $ref: '#/definitions/Exchange' incomingTxId: type: string description: Incoming deposit transaction id source: type: string target: type: string sourceAmount: type: number format: double targetAmount: description: Target currency amount after or during exchange processing. Total of transactions amounts type: number format: double status: type: string enum: [pending, processing, executed] transactions: type: array items: type: string Error: type: object required: - message properties: message: type: string description: Error description paths: /swagger.yml: get: description: Returns swagger api specs tags: - Swagger responses: 200: description: Swagger specs contents /exchange_rate: get: description: Returns currency exchange rate. If both sourceAmount and targetAmount is provided, targetAmount will be ignored. tags: - Currency exchange rate parameters: - name: exchange description: Exchange to query in: query type: string required: true - name: source description: Source currency to be converted from in: query type: string required: true - name: target description: Target currency to be converted to in: query type: string required: true - name: sourceAmount description: If set, returns target currency amount, selling this amount of source currency, default 1 in: query type: number format: double - name: targetAmount description: If set, returns source currency amount, buying this amount of target currency in: query type: number format: double responses: 200: description: Currency rate object schema: $ref: '#/definitions/CurrencyRate' 401: $ref: '#/responses/401' 422: $ref: '#/responses/422' 503: $ref: '#/responses/503' /deposits: get: description: Returns deposits list across all exchanges tags: - Deposit parameters: - name: accountId description: Filter by account ID in: query type: string format: uuid - $ref: '#/parameters/Exchange' - name: status description: Filter by deposit transaction status type: string in: query enum: [pending, mempool, something, else] responses: 200: description: Deposit list schema: type: object properties: deposits: type: array items: $ref: '#/definitions/Deposit' 401: $ref: '#/responses/401' /exchange_order/{exchangeOrderId}: get: description: Returns exchange order tags: - Trading parameters: - name: exchangeOrderId in: path type: string required: true responses: 200: description: Exchange order schema: $ref: '#/definitions/ExchangeOrder' 401: $ref: '#/responses/401' /exchange_order: post: description: Creates a currency exchange order, depending on order type, might be async tags: - Trading parameters: - name: X-Idempotency-Token description: Client generated idempotency token for operation deduplication in: header type: string required: true - name: exchangeOrder in: body required: true schema: type: object required: - exchange - incomingTxId - source - target - sourceAmount properties: type: type: string description: defaults to 'market' enum: [market, limit] exchange: $ref: '#/definitions/Exchange' incomingTxId: type: string description: Incoming deposit transaction id source: type: string target: type: string sourceAmount: type: number format: double responses: 200: description: Exchange order schema: $ref: '#/definitions/ExchangeOrder' 401: $ref: '#/responses/401' validate-0.24.0/fixtures/bugs/2527/swagger-other.yml000066400000000000000000000165301457312750000221100ustar00rootroot00000000000000swagger: '2.0' info: title: Exchange Automator 2 version: '1.0' description: Exchange trading automator. Internal only service. host: localhost basePath: /api/v1 securityDefinitions: ApiKeyAuth: name: X-API-Key description: 'API keys are all predefined for all internal services' type: apiKey in: header security: - ApiKeyAuth: [] schemes: - https consumes: - application/json produces: - application/json responses: 401: description: Not authorized schema: $ref: '#/definitions/Error' 422: description: Unprocessable entity schema: $ref: '#/definitions/Error' 503: description: Service temporarily unavailable schema: $ref: '#/definitions/Error' tags: - name: Currency exchange rate description: Get exchange currency rate info - name: Deposit - name: Trading parameters: missingName: in: query type: string enum: [kraken, globitex, binance, cex] description: Exchange Id missingIn: name: missingIn type: string enum: [kraken, globitex, binance, cex] description: Exchange Id definitions: Exchange: type: string enum: [kraken, globitex, binance, cex] description: Exchange Id CurrencyRate: type: object properties: exchange: type: string timestamp: description: Most likely near to current moment type: integer format: int64 source: type: string description: Source currency ticker target: type: string description: Target currency ticker rate: type: number format: double sourceAmount: type: number format: double targetAmount: type: number format: double Deposit: type: object description: Field list is not final, will be added during development properties: exchange: $ref: '#/definitions/Exchange' accountId: type: string format: uuid txId: description: Transaction Id type: string clientId: description: Client Id, identified via external system, after receiving ticker: type: string amount: type: number format: double ExchangeOrder: type: object required: - exchange - incomingTxId - source - target - sourceAmount properties: id: type: string description: Created order Id type: type: string description: defaults to 'market' enum: [market, limit] exchange: $ref: '#/definitions/Exchange' incomingTxId: type: string description: Incoming deposit transaction id source: type: string target: type: string sourceAmount: type: number format: double targetAmount: description: Target currency amount after or during exchange processing. Total of transactions amounts type: number format: double status: type: string enum: [pending, processing, executed] transactions: type: array items: type: string Error: type: object required: - message properties: message: type: string description: Error description paths: /swagger.yml: get: description: Returns swagger api specs tags: - Swagger responses: 200: description: Swagger specs contents /exchange_rate: get: description: Returns currency exchange rate. If both sourceAmount and targetAmount is provided, targetAmount will be ignored. tags: - Currency exchange rate parameters: - name: exchange description: Exchange to query in: query type: string required: true - name: source description: Source currency to be converted from in: query type: string required: true - name: target description: Target currency to be converted to in: query type: string required: true - name: sourceAmount description: If set, returns target currency amount, selling this amount of source currency, default 1 in: query type: number format: double - name: targetAmount description: If set, returns source currency amount, buying this amount of target currency in: query type: number format: double responses: 200: description: Currency rate object schema: $ref: '#/definitions/CurrencyRate' 401: $ref: '#/responses/401' 422: $ref: '#/responses/422' 503: $ref: '#/responses/503' /deposits: get: description: Returns deposits list across all exchanges tags: - Deposit parameters: - name: accountId description: Filter by account ID in: query type: string format: uuid - $ref: '#/parameters/Exchange' - $ref: '#/parameters/missingName' - $ref: '#/parameters/missingIn' - name: status description: Filter by deposit transaction status type: string in: query enum: [pending, mempool, something, else] responses: 200: description: Deposit list schema: type: object properties: deposits: type: array items: $ref: '#/definitions/Deposit' 401: $ref: '#/responses/401' /exchange_order/{exchangeOrderId}: get: description: Returns exchange order tags: - Trading parameters: - name: exchangeOrderId in: path type: string required: true responses: 200: description: Exchange order schema: $ref: '#/definitions/ExchangeOrder' 401: $ref: '#/responses/401' /exchange_order: post: description: Creates a currency exchange order, depending on order type, might be async tags: - Trading parameters: - name: X-Idempotency-Token description: Client generated idempotency token for operation deduplication in: header type: string required: true - name: exchangeOrder in: body required: true schema: type: object required: - exchange - incomingTxId - source - target - sourceAmount properties: type: type: string description: defaults to 'market' enum: [market, limit] exchange: $ref: '#/definitions/Exchange' incomingTxId: type: string description: Incoming deposit transaction id source: type: string target: type: string sourceAmount: type: number format: double responses: 200: description: Exchange order schema: $ref: '#/definitions/ExchangeOrder' 401: $ref: '#/responses/401' validate-0.24.0/fixtures/bugs/2527/swagger-schema-error.yml000066400000000000000000000163261457312750000233610ustar00rootroot00000000000000swagger: '2.0' info: title: Exchange Automator 2 version: '1.0' description: Exchange trading automator. Internal only service. host: localhost basePath: /api/v1 securityDefinitions: ApiKeyAuth: name: X-API-Key description: 'API keys are all predefined for all internal services' type: apiKey in: header security: - ApiKeyAuth: [] schemes: - https consumes: - application/json produces: - application/json responses: 401: description: Not authorized schema: $ref: '#/definitions/Error' 422: description: Unprocessable entity schema: $ref: '#/definitions/Error' 503: description: Service temporarily unavailable schema: $ref: '#/definitions/Error' tags: - name: Currency exchange rate description: Get exchange currency rate info - name: Deposit - name: Trading parameters: wrongSchema: name: wrongSchema in: body required: true schema: $ref: '#/definitions/WrongSchema' definitions: WrongSchema: descriptions: this is wrong type: [zilk, zork] Exchange: description: Exchange Id type: string enum: [kraken, globitex, binance, cex] CurrencyRate: type: object properties: exchange: type: string timestamp: description: Most likely near to current moment type: integer format: int64 source: type: string description: Source currency ticker target: type: string description: Target currency ticker rate: type: number format: double sourceAmount: type: number format: double targetAmount: type: number format: double Deposit: type: object description: Field list is not final, will be added during development properties: exchange: $ref: '#/definitions/Exchange' accountId: type: string format: uuid txId: description: Transaction Id type: string clientId: description: Client Id, identified via external system, after receiving ticker: type: string amount: type: number format: double ExchangeOrder: type: object required: - exchange - incomingTxId - source - target - sourceAmount properties: id: type: string description: Created order Id type: type: string description: defaults to 'market' enum: [market, limit] exchange: $ref: '#/definitions/Exchange' incomingTxId: type: string description: Incoming deposit transaction id source: type: string target: type: string sourceAmount: type: number format: double targetAmount: description: Target currency amount after or during exchange processing. Total of transactions amounts type: number format: double status: type: string enum: [pending, processing, executed] transactions: type: array items: type: string Error: type: object required: - message properties: message: type: string description: Error description paths: /swagger.yml: get: description: Returns swagger api specs tags: - Swagger responses: 200: description: Swagger specs contents /exchange_rate: get: description: Returns currency exchange rate. If both sourceAmount and targetAmount is provided, targetAmount will be ignored. tags: - Currency exchange rate parameters: - name: exchange description: Exchange to query in: query type: string required: true - name: source description: Source currency to be converted from in: query type: string required: true - name: target description: Target currency to be converted to in: query type: string required: true - name: sourceAmount description: If set, returns target currency amount, selling this amount of source currency, default 1 in: query type: number format: double - name: targetAmount description: If set, returns source currency amount, buying this amount of target currency in: query type: number format: double responses: 200: description: Currency rate object schema: $ref: '#/definitions/CurrencyRate' 401: $ref: '#/responses/401' 422: $ref: '#/responses/422' 503: $ref: '#/responses/503' /deposits: put: description: Returns deposits list across all exchanges tags: - Deposit parameters: - name: accountId description: Filter by account ID in: query type: string format: uuid - $ref: '#/parameters/wrongSchema' - name: status description: Filter by deposit transaction status type: string in: query enum: [pending, mempool, something, else] responses: 200: description: Deposit list schema: type: object properties: deposits: type: array items: $ref: '#/definitions/Deposit' 401: $ref: '#/responses/401' /exchange_order/{exchangeOrderId}: get: description: Returns exchange order tags: - Trading parameters: - name: exchangeOrderId in: path type: string required: true responses: 200: description: Exchange order schema: $ref: '#/definitions/ExchangeOrder' 401: $ref: '#/responses/401' /exchange_order: post: description: Creates a currency exchange order, depending on order type, might be async tags: - Trading parameters: - name: X-Idempotency-Token description: Client generated idempotency token for operation deduplication in: header type: string required: true - name: exchangeOrder in: body required: true schema: type: object required: - exchange - incomingTxId - source - target - sourceAmount properties: type: type: string description: defaults to 'market' enum: [market, limit] exchange: $ref: '#/definitions/Exchange' incomingTxId: type: string description: Incoming deposit transaction id source: type: string target: type: string sourceAmount: type: number format: double responses: 200: description: Exchange order schema: $ref: '#/definitions/ExchangeOrder' 401: $ref: '#/responses/401' validate-0.24.0/fixtures/bugs/2527/swagger.yml000066400000000000000000000160111457312750000207630ustar00rootroot00000000000000swagger: '2.0' info: title: Exchange Automator 2 version: '1.0' description: Exchange trading automator. Internal only service. host: localhost basePath: /api/v1 securityDefinitions: ApiKeyAuth: name: X-API-Key description: 'API keys are all predefined for all internal services' type: apiKey in: header security: - ApiKeyAuth: [] schemes: - https consumes: - application/json produces: - application/json responses: 401: description: Not authorized schema: $ref: '#/definitions/Error' 422: description: Unprocessable entity schema: $ref: '#/definitions/Error' 503: description: Service temporarily unavailable schema: $ref: '#/definitions/Error' tags: - name: Currency exchange rate description: Get exchange currency rate info - name: Deposit - name: Trading definitions: Exchange: type: string enum: [kraken, globitex, binance, cex] description: Exchange Id CurrencyRate: type: object properties: exchange: type: string timestamp: description: Most likely near to current moment type: integer format: int64 source: type: string description: Source currency ticker target: type: string description: Target currency ticker rate: type: number format: double sourceAmount: type: number format: double targetAmount: type: number format: double Deposit: type: object description: Field list is not final, will be added during development properties: exchange: $ref: '#/definitions/Exchange' accountId: type: string format: uuid txId: description: Transaction Id type: string clientId: description: Client Id, identified via external system, after receiving ticker: type: string amount: type: number format: double ExchangeOrder: type: object required: - exchange - incomingTxId - source - target - sourceAmount properties: id: type: string description: Created order Id type: type: string description: defaults to 'market' enum: [market, limit] exchange: $ref: '#/definitions/Exchange' incomingTxId: type: string description: Incoming deposit transaction id source: type: string target: type: string sourceAmount: type: number format: double targetAmount: description: Target currency amount after or during exchange processing. Total of transactions amounts type: number format: double status: type: string enum: [pending, processing, executed] transactions: type: array items: type: string Error: type: object required: - message properties: message: type: string description: Error description paths: /swagger.yml: get: description: Returns swagger api specs tags: - Swagger responses: 200: description: Swagger specs contents /exchange_rate: get: description: Returns currency exchange rate. If both sourceAmount and targetAmount is provided, targetAmount will be ignored. tags: - Currency exchange rate parameters: - name: exchange description: Exchange to query in: query type: string required: true - name: source description: Source currency to be converted from in: query type: string required: true - name: target description: Target currency to be converted to in: query type: string required: true - name: sourceAmount description: If set, returns target currency amount, selling this amount of source currency, default 1 in: query type: number format: double - name: targetAmount description: If set, returns source currency amount, buying this amount of target currency in: query type: number format: double responses: 200: description: Currency rate object schema: $ref: '#/definitions/CurrencyRate' 401: $ref: '#/responses/401' 422: $ref: '#/responses/422' 503: $ref: '#/responses/503' /deposits: get: description: Returns deposits list across all exchanges tags: - Deposit parameters: - name: accountId description: Filter by account ID in: query type: string format: uuid - $ref: '#/definitions/Exchange' - name: status description: Filter by deposit transaction status type: string in: query enum: [pending, mempool, something, else] responses: 200: description: Deposit list schema: type: object properties: deposits: type: array items: $ref: '#/definitions/Deposit' 401: $ref: '#/responses/401' /exchange_order/{exchangeOrderId}: get: description: Returns exchange order tags: - Trading parameters: - name: exchangeOrderId in: path type: string required: true responses: 200: description: Exchange order schema: $ref: '#/definitions/ExchangeOrder' 401: $ref: '#/responses/401' /exchange_order: post: description: Creates a currency exchange order, depending on order type, might be async tags: - Trading parameters: - name: X-Idempotency-Token description: Client generated idempotency token for operation deduplication in: header type: string required: true - name: exchangeOrder in: body required: true schema: type: object required: - exchange - incomingTxId - source - target - sourceAmount properties: type: type: string description: defaults to 'market' enum: [market, limit] exchange: $ref: '#/definitions/Exchange' incomingTxId: type: string description: Incoming deposit transaction id source: type: string target: type: string sourceAmount: type: number format: double responses: 200: description: Exchange order schema: $ref: '#/definitions/ExchangeOrder' 401: $ref: '#/responses/401' validate-0.24.0/fixtures/bugs/2649/000077500000000000000000000000001457312750000166075ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/2649/swagger.yaml000066400000000000000000007131241457312750000211420ustar00rootroot00000000000000basePath: / definitions: EmojiUpdateType: title: EmojiUpdateType models an admin update action to take on a custom emoji. type: string x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model InstanceConfigurationEmojis: properties: emoji_size_limit: description: Max allowed emoji image size in bytes. example: 51200 format: int64 type: integer x-go-name: EmojiSizeLimit title: InstanceConfigurationEmojis models instance emoji config parameters. type: object x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model Link: description: See https://webfinger.net/ properties: href: type: string x-go-name: Href rel: type: string x-go-name: Rel template: type: string x-go-name: Template type: type: string x-go-name: Type title: Link represents one 'link' in a slice of links returned from a lookup request. type: object x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model Mention: properties: acct: description: |- The account URI as discovered via webfinger. Equal to username for local users, or username@domain for remote users. example: some_user@example.org type: string x-go-name: Acct id: description: The ID of the mentioned account. example: 01FBYJHQWQZAVWFRK9PDYTKGMB type: string x-go-name: ID url: description: The web URL of the mentioned account's profile. example: https://example.org/@some_user type: string x-go-name: URL username: description: The username of the mentioned account. example: some_user type: string x-go-name: Username title: Mention represents a mention of another account. type: object x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model NodeInfoServices: properties: inbound: items: type: string type: array x-go-name: Inbound outbound: items: type: string type: array x-go-name: Outbound title: NodeInfoServices represents inbound and outbound services that this node offers connections to. type: object x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model NodeInfoSoftware: properties: name: example: gotosocial type: string x-go-name: Name version: example: 0.1.2 1234567 type: string x-go-name: Version title: NodeInfoSoftware represents the name and version number of the software of this node. type: object x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model NodeInfoUsage: properties: localPosts: format: int64 type: integer x-go-name: LocalPosts users: $ref: '#/definitions/NodeInfoUsers' title: NodeInfoUsage represents usage information about this server, such as number of users. type: object x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model NodeInfoUsers: properties: total: format: int64 type: integer x-go-name: Total title: NodeInfoUsers represents aggregate information about the users on the server. type: object x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model Source: description: Returned as an additional entity when verifying and updated credentials, as an attribute of Account. properties: fields: description: Metadata about the account. items: $ref: '#/definitions/field' type: array x-go-name: Fields follow_requests_count: description: The number of pending follow requests. format: int64 type: integer x-go-name: FollowRequestsCount language: description: The default posting language for new statuses. type: string x-go-name: Language note: description: Profile bio. type: string x-go-name: Note privacy: description: |- The default post privacy to be used for new statuses. public = Public post unlisted = Unlisted post private = Followers-only post direct = Direct post type: string x-go-name: Privacy sensitive: description: Whether new statuses should be marked sensitive by default. type: boolean x-go-name: Sensitive status_format: description: The default posting format for new statuses. type: string x-go-name: StatusFormat title: Source represents display or publishing preferences of user's own account. type: object x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model account: description: The modelled account can be either a remote account, or one on this instance. properties: acct: description: |- The account URI as discovered via webfinger. Equal to username for local users, or username@domain for remote users. example: some_user@example.org type: string x-go-name: Acct avatar: description: Web location of the account's avatar. example: https://example.org/media/some_user/avatar/original/avatar.jpeg type: string x-go-name: Avatar avatar_static: description: |- Web location of a static version of the account's avatar. Only relevant when the account's main avatar is a video or a gif. example: https://example.org/media/some_user/avatar/static/avatar.png type: string x-go-name: AvatarStatic bot: description: Account identifies as a bot. type: boolean x-go-name: Bot created_at: description: When the account was created (ISO 8601 Datetime). example: "2021-07-30T09:20:25+00:00" type: string x-go-name: CreatedAt custom_css: description: CustomCSS to include when rendering this account's profile or statuses. type: string x-go-name: CustomCSS discoverable: description: Account has opted into discovery features. type: boolean x-go-name: Discoverable display_name: description: The account's display name. example: big jeff (he/him) type: string x-go-name: DisplayName emojis: description: Array of custom emojis used in this account's note or display name. items: $ref: '#/definitions/emoji' type: array x-go-name: Emojis enable_rss: description: Account has enabled RSS feed. type: boolean x-go-name: EnableRSS fields: description: Additional metadata attached to this account's profile. items: $ref: '#/definitions/field' type: array x-go-name: Fields followers_count: description: Number of accounts following this account, according to our instance. format: int64 type: integer x-go-name: FollowersCount following_count: description: Number of account's followed by this account, according to our instance. format: int64 type: integer x-go-name: FollowingCount header: description: Web location of the account's header image. example: https://example.org/media/some_user/header/original/header.jpeg type: string x-go-name: Header header_static: description: |- Web location of a static version of the account's header. Only relevant when the account's main header is a video or a gif. example: https://example.org/media/some_user/header/static/header.png type: string x-go-name: HeaderStatic id: description: The account id. example: 01FBVD42CQ3ZEEVMW180SBX03B type: string x-go-name: ID last_status_at: description: When the account's most recent status was posted (ISO 8601 Datetime). example: "2021-07-30T09:20:25+00:00" type: string x-go-name: LastStatusAt locked: description: Account manually approves follow requests. type: boolean x-go-name: Locked mute_expires_at: description: If this account has been muted, when will the mute expire (ISO 8601 Datetime). example: "2021-07-30T09:20:25+00:00" type: string x-go-name: MuteExpiresAt note: description: Bio/description of this account. type: string x-go-name: Note role: $ref: '#/definitions/accountRole' source: $ref: '#/definitions/Source' statuses_count: description: Number of statuses posted by this account, according to our instance. format: int64 type: integer x-go-name: StatusesCount suspended: description: Account has been suspended by our instance. type: boolean x-go-name: Suspended url: description: Web location of the account's profile page. example: https://example.org/@some_user type: string x-go-name: URL username: description: The username of the account, not including domain. example: some_user type: string x-go-name: Username title: Account models a fediverse account. type: object x-go-name: Account x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model accountRelationship: properties: blocked_by: description: This account is blocking you. type: boolean x-go-name: BlockedBy blocking: description: You are blocking this account. type: boolean x-go-name: Blocking domain_blocking: description: You are blocking this account's domain. type: boolean x-go-name: DomainBlocking endorsed: description: You are featuring this account on your profile. type: boolean x-go-name: Endorsed followed_by: description: This account follows you. type: boolean x-go-name: FollowedBy following: description: You are following this account. type: boolean x-go-name: Following id: description: The account id. example: 01FBW9XGEP7G6K88VY4S9MPE1R type: string x-go-name: ID muting: description: You are muting this account. type: boolean x-go-name: Muting muting_notifications: description: You are muting notifications from this account. type: boolean x-go-name: MutingNotifications note: description: Your note on this account. type: string x-go-name: Note notifying: description: You are seeing notifications when this account posts. type: boolean x-go-name: Notifying requested: description: You have requested to follow this account, and the request is pending. type: boolean x-go-name: Requested showing_reblogs: description: You are seeing reblogs/boosts from this account in your home timeline. type: boolean x-go-name: ShowingReblogs title: Relationship represents a relationship between accounts. type: object x-go-name: Relationship x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model accountRole: properties: name: type: string x-go-name: Name title: AccountRole models the role of an account. type: object x-go-name: AccountRole x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model adminAccountInfo: properties: account: $ref: '#/definitions/account' approved: description: Whether the account is currently approved. type: boolean x-go-name: Approved confirmed: description: Whether the account has confirmed their email address. type: boolean x-go-name: Confirmed created_at: description: When the account was first discovered. (ISO 8601 Datetime) example: "2021-07-30T09:20:25+00:00" type: string x-go-name: CreatedAt created_by_application_id: description: The ID of the application that created this account. type: string x-go-name: CreatedByApplicationID disabled: description: Whether the account is currently disabled. type: boolean x-go-name: Disabled domain: description: |- The domain of the account. Null for local accounts. example: example.org type: string x-go-name: Domain email: description: |- The email address associated with the account. Empty string for remote accounts or accounts with no known email address. example: someone@somewhere.com type: string x-go-name: Email id: description: The ID of the account in the database. example: 01GQ4PHNT622DQ9X95XQX4KKNR type: string x-go-name: ID invite_request: description: |- The reason given when requesting an invite. Null if not known / remote account. example: Pleaaaaaaaaaaaaaaase!! type: string x-go-name: InviteRequest invited_by_account_id: description: The ID of the account that invited this user type: string x-go-name: InvitedByAccountID ip: description: |- The IP address last used to login to this account. Null if not known. example: 192.0.2.1 type: string x-go-name: IP ips: description: |- All known IP addresses associated with this account. NOT IMPLEMENTED (will always be empty array). example: [] items: {} type: array x-go-name: IPs locale: description: The locale of the account. (ISO 639 Part 1 two-letter language code) example: en type: string x-go-name: Locale role: $ref: '#/definitions/accountRole' silenced: description: Whether the account is currently silenced type: boolean x-go-name: Silenced suspended: description: Whether the account is currently suspended. type: boolean x-go-name: Suspended username: description: The username of the account. example: dril type: string x-go-name: Username title: AdminAccountInfo models the admin view of an account's details. type: object x-go-name: AdminAccountInfo x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model adminEmojiCategory: description: Used for sorting custom emoji in the picker. example: blobcats type: string x-go-name: Category adminEmoji: properties: category: $ref: '#/definitions/adminEmojiCategory' content_type: description: The MIME content type of the emoji. example: image/png type: string x-go-name: ContentType disabled: description: True if this emoji has been disabled by an admin action. example: false type: boolean x-go-name: Disabled domain: description: The domain from which the emoji originated. Only defined for remote domains, otherwise key will not be set. example: example.org type: string x-go-name: Domain id: description: The ID of the emoji. example: 01GEM7SFDZ7GZNRXFVZ3X4E4N1 type: string x-go-name: ID shortcode: description: The name of the custom emoji. example: blobcat_uwu type: string x-go-name: Shortcode static_url: description: A link to a static copy of the custom emoji. example: https://example.org/fileserver/emojis/blogcat_uwu.png type: string x-go-name: StaticURL total_file_size: description: The total file size taken up by the emoji in bytes, including static and animated versions. example: 69420 format: int64 type: integer x-go-name: TotalFileSize updated_at: description: Time when the emoji image was last updated. example: "2022-10-05T09:21:26.419Z" type: string x-go-name: UpdatedAt uri: description: The ActivityPub URI of the emoji. example: https://example.org/emojis/016T5Q3SQKBT337DAKVSKNXXW1 type: string x-go-name: URI url: description: Web URL of the custom emoji. example: https://example.org/fileserver/emojis/blogcat_uwu.gif type: string x-go-name: URL visible_in_picker: description: Emoji is visible in the emoji picker of the instance. example: true type: boolean x-go-name: VisibleInPicker title: AdminEmoji models the admin view of a custom emoji. type: object x-go-name: AdminEmoji x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model adminReport: properties: account: $ref: '#/definitions/adminAccountInfo' action_taken: description: Whether an action has been taken by an admin in response to this report. example: false type: boolean x-go-name: ActionTaken action_taken_at: description: |- If an action was taken, at what time was this done? (ISO 8601 Datetime) Will be null if not set / no action yet taken. example: "2021-07-30T09:20:25+00:00" type: string x-go-name: ActionTakenAt action_taken_by_account: $ref: '#/definitions/adminAccountInfo' action_taken_comment: description: |- If an action was taken, what comment was made by the admin on the taken action? Will be null if not set / no action yet taken. example: Account was suspended. type: string x-go-name: ActionTakenComment assigned_account: $ref: '#/definitions/adminAccountInfo' category: description: Under what category was this report created? example: spam type: string x-go-name: Category comment: description: |- Comment submitted when the report was created. Will be empty if no comment was submitted. example: This person has been harassing me. type: string x-go-name: Comment created_at: description: The date when this report was created (ISO 8601 Datetime). example: "2021-07-30T09:20:25+00:00" type: string x-go-name: CreatedAt forwarded: description: Bool to indicate that report should be federated to remote instance. example: true type: boolean x-go-name: Forwarded id: description: ID of the report. example: 01FBVD42CQ3ZEEVMW180SBX03B type: string x-go-name: ID rule_ids: description: |- Array of rule IDs that were submitted along with this report. NOT IMPLEMENTED, will always be empty array. items: {} type: array x-go-name: Rules statuses: description: |- Array of statuses that were submitted along with this report. Will be empty if no status IDs were submitted with the report. items: $ref: '#/definitions/status' type: array x-go-name: Statuses target_account: $ref: '#/definitions/adminAccountInfo' updated_at: description: Time of last action on this report (ISO 8601 Datetime). example: "2021-07-30T09:20:25+00:00" type: string x-go-name: UpdatedAt title: AdminReport models the admin view of a report. type: object x-go-name: AdminReport x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model advancedVisibilityFlagsForm: description: |- AdvancedVisibilityFlagsForm allows a few more advanced flags to be set on new statuses, in addition to the standard mastodon-compatible ones. properties: boostable: description: This status can be boosted/reblogged. type: boolean x-go-name: Boostable federated: description: This status will be federated beyond the local timeline(s). type: boolean x-go-name: Federated likeable: description: This status can be liked/faved. type: boolean x-go-name: Likeable replyable: description: This status can be replied to. type: boolean x-go-name: Replyable type: object x-go-name: AdvancedVisibilityFlagsForm x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model announcement: properties: all_day: description: Announcement doesn't have begin time and end time, but begin day and end day. type: boolean x-go-name: AllDay content: description: |- The body of the announcement. Should be HTML formatted. example:

This is an announcement. No malarky.

type: string x-go-name: Content emoji: description: Emojis used in this announcement. items: $ref: '#/definitions/emoji' type: array x-go-name: Emojis ends_at: description: |- When the announcement should stop being displayed (ISO 8601 Datetime). If the announcement has no end time, this will be omitted or empty. example: "2021-07-30T09:20:25+00:00" type: string x-go-name: EndsAt id: description: The ID of the announcement. example: 01FC30T7X4TNCZK0TH90QYF3M4 type: string x-go-name: ID mentions: description: Mentions this announcement contains. items: $ref: '#/definitions/Mention' type: array x-go-name: Mentions published: description: |- Announcement is 'published', ie., visible to users. Announcements that are not published should be shown only to admins. type: boolean x-go-name: Published published_at: description: When the announcement was first published (ISO 8601 Datetime). example: "2021-07-30T09:20:25+00:00" type: string x-go-name: PublishedAt reactions: description: Reactions to this announcement. items: $ref: '#/definitions/announcementReaction' type: array x-go-name: Reactions read: description: Requesting account has seen this announcement. type: boolean x-go-name: Read starts_at: description: |- When the announcement should begin to be displayed (ISO 8601 Datetime). If the announcement has no start time, this will be omitted or empty. example: "2021-07-30T09:20:25+00:00" type: string x-go-name: StartsAt statuses: description: Statuses contained in this announcement. items: $ref: '#/definitions/status' type: array x-go-name: Statuses tags: description: Tags used in this announcement. items: $ref: '#/definitions/tag' type: array x-go-name: Tags updated_at: description: When the announcement was last updated (ISO 8601 Datetime). example: "2021-07-30T09:20:25+00:00" type: string x-go-name: UpdatedAt title: Announcement models an admin announcement for the instance. type: object x-go-name: Announcement x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model announcementReaction: properties: count: description: The total number of users who have added this reaction. example: 5 format: int64 type: integer x-go-name: Count me: description: This reaction belongs to the account viewing it. type: boolean x-go-name: Me name: description: The emoji used for the reaction. Either a unicode emoji, or a custom emoji's shortcode. example: blobcat_uwu type: string x-go-name: Name static_url: description: |- Web link to a non-animated image of the custom emoji. Empty for unicode emojis. example: https://example.org/custom_emojis/statuc/blobcat_uwu.png type: string x-go-name: StaticURL url: description: |- Web link to the image of the custom emoji. Empty for unicode emojis. example: https://example.org/custom_emojis/original/blobcat_uwu.png type: string x-go-name: URL title: AnnouncementReaction models a user reaction to an announcement. type: object x-go-name: AnnouncementReaction x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model application: properties: client_id: description: Client ID associated with this application. type: string x-go-name: ClientID client_secret: description: Client secret associated with this application. type: string x-go-name: ClientSecret id: description: The ID of the application. example: 01FBVD42CQ3ZEEVMW180SBX03B type: string x-go-name: ID name: description: The name of the application. example: Tusky type: string x-go-name: Name redirect_uri: description: Post-authorization redirect URI for the application (OAuth2). example: https://example.org/callback?some=query type: string x-go-name: RedirectURI vapid_key: description: Push API key for this application. type: string x-go-name: VapidKey website: description: The website associated with the application (url) example: https://tusky.app type: string x-go-name: Website title: Application models an api application. type: object x-go-name: Application x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model attachment: properties: blurhash: description: |- A hash computed by the BlurHash algorithm, for generating colorful preview thumbnails when media has not been downloaded yet. See https://github.com/woltapp/blurhash type: string x-go-name: Blurhash description: description: Alt text that describes what is in the media attachment. example: This is a picture of a kitten. type: string x-go-name: Description id: description: The ID of the attachment. example: 01FC31DZT1AYWDZ8XTCRWRBYRK type: string x-go-name: ID meta: $ref: '#/definitions/mediaMeta' preview_remote_url: description: |- The location of a scaled-down preview of the attachment on the remote server. Only defined for instances other than our own. example: https://some-other-server.org/attachments/small/ahhhhh.jpeg type: string x-go-name: PreviewRemoteURL preview_url: description: The location of a scaled-down preview of the attachment. example: https://example.org/fileserver/some_id/attachments/some_id/small/attachment.jpeg type: string x-go-name: PreviewURL remote_url: description: |- The location of the full-size original attachment on the remote server. Only defined for instances other than our own. example: https://some-other-server.org/attachments/original/ahhhhh.jpeg type: string x-go-name: RemoteURL text_url: description: |- A shorter URL for the attachment. In our case, we just give the URL again since we don't create smaller URLs. type: string x-go-name: TextURL type: description: The type of the attachment. example: image type: string x-go-name: Type url: description: The location of the original full-size attachment. example: https://example.org/fileserver/some_id/attachments/some_id/original/attachment.jpeg type: string x-go-name: URL title: Attachment models a media attachment. type: object x-go-name: Attachment x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model card: properties: author_name: description: The author of the original resource. example: weewee@buzzfeed.com type: string x-go-name: AuthorName author_url: description: A link to the author of the original resource. example: https://buzzfeed.com/authors/weewee type: string x-go-name: AuthorURL blurhash: description: A hash computed by the BlurHash algorithm, for generating colorful preview thumbnails when media has not been downloaded yet. type: string x-go-name: Blurhash description: description: Description of preview. example: Is water wet? We're not sure. In this article, we ask an expert... type: string x-go-name: Description embed_url: description: Used for photo embeds, instead of custom html. type: string x-go-name: EmbedURL height: description: Height of preview, in pixels. format: int64 type: integer x-go-name: Height html: description: HTML to be used for generating the preview card. type: string x-go-name: HTML image: description: Preview thumbnail. example: https://example.org/fileserver/preview/thumb.jpg type: string x-go-name: Image provider_name: description: The provider of the original resource. example: Buzzfeed type: string x-go-name: ProviderName provider_url: description: A link to the provider of the original resource. example: https://buzzfeed.com type: string x-go-name: ProviderURL title: description: Title of linked resource. example: Buzzfeed - Is Water Wet? type: string x-go-name: Title type: description: The type of the preview card. example: link type: string x-go-name: Type url: description: Location of linked resource. example: https://buzzfeed.com/some/fuckin/buzzfeed/article type: string x-go-name: URL width: description: Width of preview, in pixels. format: int64 type: integer x-go-name: Width title: Card represents a rich preview card that is generated using OpenGraph tags from a URL. type: object x-go-name: Card x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model domain: description: Domain represents a remote domain properties: domain: description: The hostname of the domain. example: example.org type: string x-go-name: Domain public_comment: description: If the domain is blocked, what's the publicly-stated reason for the block. example: they smell type: string x-go-name: PublicComment silenced_at: description: Time at which this domain was silenced. Key will not be present on open domains. example: "2021-07-30T09:20:25+00:00" type: string x-go-name: SilencedAt suspended_at: description: Time at which this domain was suspended. Key will not be present on open domains. example: "2021-07-30T09:20:25+00:00" type: string x-go-name: SuspendedAt type: object x-go-name: Domain x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model domainBlock: description: DomainBlock represents a block on one domain properties: created_at: description: Time at which this block was created (ISO 8601 Datetime). example: "2021-07-30T09:20:25+00:00" type: string x-go-name: CreatedAt created_by: description: ID of the account that created this domain block. example: 01FBW2758ZB6PBR200YPDDJK4C type: string x-go-name: CreatedBy domain: description: The hostname of the domain. example: example.org type: string x-go-name: Domain id: description: The ID of the domain block. example: 01FBW21XJA09XYX51KV5JVBW0F readOnly: true type: string x-go-name: ID obfuscate: description: |- Obfuscate the domain name when serving this domain block publicly. A useful anti-harassment tool. example: false type: boolean x-go-name: Obfuscate private_comment: description: Private comment for this block, visible to our instance admins only. example: they are poopoo type: string x-go-name: PrivateComment public_comment: description: If the domain is blocked, what's the publicly-stated reason for the block. example: they smell type: string x-go-name: PublicComment silenced_at: description: Time at which this domain was silenced. Key will not be present on open domains. example: "2021-07-30T09:20:25+00:00" type: string x-go-name: SilencedAt subscription_id: description: The ID of the subscription that created/caused this domain block. example: 01FBW25TF5J67JW3HFHZCSD23K type: string x-go-name: SubscriptionID suspended_at: description: Time at which this domain was suspended. Key will not be present on open domains. example: "2021-07-30T09:20:25+00:00" type: string x-go-name: SuspendedAt type: object x-go-name: DomainBlock x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model domainBlockCreateRequest: properties: domain: description: hostname/domain to block type: string x-go-name: Domain domains: description: A list of domains to block. Only used if import=true is specified. x-go-name: Domains obfuscate: description: whether the domain should be obfuscated when being displayed publicly type: boolean x-go-name: Obfuscate private_comment: description: private comment for other admins on why the domain was blocked type: string x-go-name: PrivateComment public_comment: description: public comment on the reason for the domain block type: string x-go-name: PublicComment title: DomainBlockCreateRequest is the form submitted as a POST to /api/v1/admin/domain_blocks to create a new block. type: object x-go-name: DomainBlockCreateRequest x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model emoji: properties: category: description: Used for sorting custom emoji in the picker. example: blobcats type: string x-go-name: Category shortcode: description: The name of the custom emoji. example: blobcat_uwu type: string x-go-name: Shortcode static_url: description: A link to a static copy of the custom emoji. example: https://example.org/fileserver/emojis/blogcat_uwu.png type: string x-go-name: StaticURL url: description: Web URL of the custom emoji. example: https://example.org/fileserver/emojis/blogcat_uwu.gif type: string x-go-name: URL visible_in_picker: description: Emoji is visible in the emoji picker of the instance. example: true type: boolean x-go-name: VisibleInPicker title: Emoji represents a custom emoji. type: object x-go-name: Emoji x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model emojiCategory: properties: id: description: The ID of the custom emoji category. type: string x-go-name: ID name: description: The name of the custom emoji category. type: string x-go-name: Name title: EmojiCategory represents a custom emoji category. type: object x-go-name: EmojiCategory x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model emojiCreateRequest: properties: CategoryName: description: |- Category in which to place the new emoji. Will be uncategorized by default. CategoryName length should not exceed 64 characters. type: string Image: description: Image file to use for the emoji. Must be png or gif and no larger than 50kb. Shortcode: description: Desired shortcode for the emoji, without surrounding colons. This must be unique for the domain. example: blobcat_uwu type: string title: EmojiCreateRequest represents a request to create a custom emoji made through the admin API. type: object x-go-name: EmojiCreateRequest x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model emojiUpdateRequest: properties: CategoryName: description: Category in which to place the emoji. type: string Image: description: |- Image file to use for the emoji. Must be png or gif and no larger than 50kb. Shortcode: description: Desired shortcode for the emoji, without surrounding colons. This must be unique for the domain. example: blobcat_uwu type: string type: $ref: '#/definitions/EmojiUpdateType' title: EmojiUpdateRequest represents a request to update a custom emoji, made through the admin API. type: object x-go-name: EmojiUpdateRequest x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model field: properties: name: description: The key/name of this field. example: pronouns type: string x-go-name: Name value: description: The value of this field. example: they/them type: string x-go-name: Value verified_at: description: If this field has been verified, when did this occur? (ISO 8601 Datetime). example: "2021-07-30T09:20:25+00:00" type: string x-go-name: VerifiedAt title: Field represents a name/value pair to display on an account's profile. type: object x-go-name: Field x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceConfigurationAccounts: properties: allow_custom_css: description: Whether or not accounts on this instance are allowed to upload custom CSS for profiles and statuses. example: false type: boolean x-go-name: AllowCustomCSS max_featured_tags: description: |- The maximum number of featured tags allowed for each account. Currently not implemented, so this is hardcoded to 10. format: int64 type: integer x-go-name: MaxFeaturedTags title: InstanceConfigurationAccounts models instance account config parameters. type: object x-go-name: InstanceConfigurationAccounts x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceConfigurationMediaAttachments: properties: image_matrix_limit: description: |- Max allowed image size in pixels as height*width. GtS doesn't set a limit on this, but for compatibility we give Mastodon's 4096x4096px value here. example: 16777216 format: int64 type: integer x-go-name: ImageMatrixLimit image_size_limit: description: Max allowed image size in bytes example: 2097152 format: int64 type: integer x-go-name: ImageSizeLimit supported_mime_types: description: List of mime types that it's possible to upload to this instance. example: - image/jpeg - image/gif items: type: string type: array x-go-name: SupportedMimeTypes video_frame_rate_limit: description: Max allowed video frame rate. example: 60 format: int64 type: integer x-go-name: VideoFrameRateLimit video_matrix_limit: description: |- Max allowed video size in pixels as height*width. GtS doesn't set a limit on this, but for compatibility we give Mastodon's 4096x4096px value here. example: 16777216 format: int64 type: integer x-go-name: VideoMatrixLimit video_size_limit: description: Max allowed video size in bytes example: 10485760 format: int64 type: integer x-go-name: VideoSizeLimit title: InstanceConfigurationMediaAttachments models instance media attachment config parameters. type: object x-go-name: InstanceConfigurationMediaAttachments x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceConfigurationPolls: properties: max_characters_per_option: description: Number of characters allowed per option in the poll. example: 50 format: int64 type: integer x-go-name: MaxCharactersPerOption max_expiration: description: Maximum expiration time of the poll in seconds. example: 2629746 format: int64 type: integer x-go-name: MaxExpiration max_options: description: Number of options permitted in a poll on this instance. example: 4 format: int64 type: integer x-go-name: MaxOptions min_expiration: description: Minimum expiration time of the poll in seconds. example: 300 format: int64 type: integer x-go-name: MinExpiration title: InstanceConfigurationPolls models instance poll config parameters. type: object x-go-name: InstanceConfigurationPolls x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceConfigurationStatuses: properties: characters_reserved_per_url: description: Amount of characters clients should assume a url takes up. example: 25 format: int64 type: integer x-go-name: CharactersReservedPerURL max_characters: description: Maximum allowed length of a post on this instance, in characters. example: 5000 format: int64 type: integer x-go-name: MaxCharacters max_media_attachments: description: Max number of attachments allowed on a status. example: 4 format: int64 type: integer x-go-name: MaxMediaAttachments title: InstanceConfigurationStatuses models instance status config parameters. type: object x-go-name: InstanceConfigurationStatuses x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceV1: properties: account_domain: description: |- The domain of accounts on this instance. This will not necessarily be the same as simply the Host part of the URI. example: example.org type: string x-go-name: AccountDomain approval_required: description: New account registrations require admin approval. type: boolean x-go-name: ApprovalRequired configuration: $ref: '#/definitions/instanceV1Configuration' contact_account: $ref: '#/definitions/account' description: description: |- Description of the instance. Should be HTML formatted, but might be plaintext. This should be displayed on the 'about' page for an instance. type: string x-go-name: Description email: description: An email address that may be used for inquiries. example: admin@example.org type: string x-go-name: Email invites_enabled: description: Invites are enabled on this instance. type: boolean x-go-name: InvitesEnabled languages: description: Primary language of the instance. example: en items: type: string type: array x-go-name: Languages max_toot_chars: description: |- Maximum allowed length of a post on this instance, in characters. This is provided for compatibility with Tusky and other apps. example: 5000 format: uint64 type: integer x-go-name: MaxTootChars registrations: description: New account registrations are enabled on this instance. type: boolean x-go-name: Registrations short_description: description: |- A shorter description of the instance. Should be HTML formatted, but might be plaintext. This should be displayed on the instance splash/landing page. type: string x-go-name: ShortDescription stats: additionalProperties: format: int64 type: integer description: 'Statistics about the instance: number of posts, accounts, etc.' type: object x-go-name: Stats thumbnail: description: URL of the instance avatar/banner image. example: https://example.org/files/instance/thumbnail.jpeg type: string x-go-name: Thumbnail thumbnail_description: description: Description of the instance thumbnail. example: picture of a cute lil' friendly sloth type: string x-go-name: ThumbnailDescription thumbnail_type: description: MIME type of the instance thumbnail. example: image/png type: string x-go-name: ThumbnailType title: description: The title of the instance. example: GoToSocial Example Instance type: string x-go-name: Title uri: description: The URI of the instance. example: https://gts.example.org type: string x-go-name: URI urls: $ref: '#/definitions/instanceV1URLs' version: description: |- The version of GoToSocial installed on the instance. This will contain at least a semantic version number. It may also contain, after a space, the short git commit ID of the running software. example: 0.1.1 cb85f65 type: string x-go-name: Version title: InstanceV1 models information about this instance. type: object x-go-name: InstanceV1 x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceV1Configuration: properties: accounts: $ref: '#/definitions/instanceConfigurationAccounts' emojis: $ref: '#/definitions/InstanceConfigurationEmojis' media_attachments: $ref: '#/definitions/instanceConfigurationMediaAttachments' polls: $ref: '#/definitions/instanceConfigurationPolls' statuses: $ref: '#/definitions/instanceConfigurationStatuses' title: InstanceV1Configuration models instance configuration parameters. type: object x-go-name: InstanceV1Configuration x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceV1URLs: properties: streaming_api: description: Websockets address for status and notification streaming. example: wss://example.org type: string x-go-name: StreamingAPI title: InstanceV1URLs models instance-relevant URLs for client application consumption. type: object x-go-name: InstanceV1URLs x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceV2: properties: account_domain: description: |- The domain of accounts on this instance. This will not necessarily be the same as domain. example: example.org type: string x-go-name: AccountDomain configuration: $ref: '#/definitions/instanceV2Configuration' contact: $ref: '#/definitions/instanceV2Contact' description: description: |- Description of the instance. Should be HTML formatted, but might be plaintext. This should be displayed on the 'about' page for an instance. type: string x-go-name: Description domain: description: The domain of the instance. example: gts.example.org type: string x-go-name: Domain languages: description: Primary languages of the instance + moderators/admins. example: - en items: type: string type: array x-go-name: Languages registrations: $ref: '#/definitions/instanceV2Registrations' rules: description: |- An itemized list of rules for this website. Currently not implemented (will always be empty array). items: {} type: array x-go-name: Rules source_url: description: The URL for the source code of the software running on this instance, in keeping with AGPL license requirements. example: https://github.com/superseriousbusiness/gotosocial type: string x-go-name: SourceURL thumbnail: $ref: '#/definitions/instanceV2Thumbnail' title: description: The title of the instance. example: GoToSocial Example Instance type: string x-go-name: Title usage: $ref: '#/definitions/instanceV2Usage' version: description: |- The version of GoToSocial installed on the instance. This will contain at least a semantic version number. It may also contain, after a space, the short git commit ID of the running software. example: 0.1.1 cb85f65 type: string x-go-name: Version title: InstanceV2 models information about this instance. type: object x-go-name: InstanceV2 x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceV2Configuration: properties: accounts: $ref: '#/definitions/instanceConfigurationAccounts' emojis: $ref: '#/definitions/InstanceConfigurationEmojis' media_attachments: $ref: '#/definitions/instanceConfigurationMediaAttachments' polls: $ref: '#/definitions/instanceConfigurationPolls' statuses: $ref: '#/definitions/instanceConfigurationStatuses' translation: $ref: '#/definitions/instanceV2ConfigurationTranslation' urls: $ref: '#/definitions/instanceV1URLs' title: Configured values and limits for this instance. type: object x-go-name: InstanceV2Configuration x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceV2ConfigurationTranslation: properties: enabled: description: |- Whether the Translations API is available on this instance. Not implemented so this value is always false. type: boolean x-go-name: Enabled title: Hints related to translation. type: object x-go-name: InstanceV2ConfigurationTranslation x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceV2Contact: properties: account: $ref: '#/definitions/account' email: description: |- An email address that can be messaged regarding inquiries or issues. Empty string if no email address set. example: someone@example.org type: string x-go-name: Email title: Hints related to contacting a representative of the instance. type: object x-go-name: InstanceV2Contact x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceV2Registrations: properties: approval_required: description: Whether registrations require moderator approval. example: true type: boolean x-go-name: ApprovalRequired enabled: description: Whether registrations are enabled. example: false type: boolean x-go-name: Enabled message: description: |- A custom message (html string) to be shown when registrations are closed. Value will be null if no message is set. example:

Registrations are currently closed on example.org because of spam bots!

type: string x-go-name: Message title: Information about registering for this instance. type: object x-go-name: InstanceV2Registrations x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceV2Thumbnail: properties: blurhash: description: |- A hash computed by the BlurHash algorithm, for generating colorful preview thumbnails when media has not been downloaded yet. Key/value not set if no blurhash available. example: UeKUpFxuo~R%0nW;WCnhF6RjaJt757oJodS$ type: string x-go-name: Blurhash thumbnail_description: description: |- Description of the instance thumbnail. Key/value not set if no description available. example: picture of a cute lil' friendly sloth type: string x-go-name: Description thumbnail_type: description: |- MIME type of the instance thumbnail. Key/value not set if thumbnail image type unknown. example: image/png type: string x-go-name: Type url: description: The URL for the thumbnail image. example: https://example.org/fileserver/01BPSX2MKCRVMD4YN4D71G9CP5/attachment/original/01H88X0KQ2DFYYDSWYP93VDJZA.png type: string x-go-name: URL versions: $ref: '#/definitions/instanceV2ThumbnailVersions' title: An image used to represent this instance. type: object x-go-name: InstanceV2Thumbnail x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceV2ThumbnailVersions: properties: '@1x': description: |- The URL for the thumbnail image at 1x resolution. Key/value not set if scaled versions not available. type: string x-go-name: Size1URL '@2x': description: |- The URL for the thumbnail image at 2x resolution. Key/value not set if scaled versions not available. type: string x-go-name: Size2URL title: Links to scaled resolution images, for high DPI screens. type: object x-go-name: InstanceV2ThumbnailVersions x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceV2Usage: properties: users: $ref: '#/definitions/instanceV2Users' title: Usage data for this instance. type: object x-go-name: InstanceV2Usage x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model instanceV2Users: properties: active_month: description: |- The number of active users in the past 4 weeks. Currently not implemented: will always be 0. example: 0 format: int64 type: integer x-go-name: ActiveMonth title: Usage data related to users on this instance. type: object x-go-name: InstanceV2Users x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model mediaDimensions: properties: aspect: description: |- Aspect ratio of the media. Equal to width / height. example: 1.777777778 format: float type: number x-go-name: Aspect bitrate: description: Bitrate of the media in bits per second. example: 1000000 format: int64 type: integer x-go-name: Bitrate duration: description: |- Duration of the media in seconds. Only set for video and audio. example: 5.43 format: float type: number x-go-name: Duration frame_rate: description: |- Framerate of the media. Only set for video and gifs. example: "30" type: string x-go-name: FrameRate height: description: |- Height of the media in pixels. Not set for audio. example: 1080 format: int64 type: integer x-go-name: Height size: description: |- Size of the media, in the format `[width]x[height]`. Not set for audio. example: 1920x1080 type: string x-go-name: Size width: description: |- Width of the media in pixels. Not set for audio. example: 1920 format: int64 type: integer x-go-name: Width title: MediaDimensions models detailed properties of a piece of media. type: object x-go-name: MediaDimensions x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model mediaFocus: properties: x: description: |- x position of the focus should be between -1 and 1 format: float type: number x-go-name: X "y": description: |- y position of the focus should be between -1 and 1 format: float type: number x-go-name: "Y" title: MediaFocus models the focal point of a piece of media. type: object x-go-name: MediaFocus x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model mediaMeta: description: This can be metadata about an image, an audio file, video, etc. properties: focus: $ref: '#/definitions/mediaFocus' original: $ref: '#/definitions/mediaDimensions' small: $ref: '#/definitions/mediaDimensions' title: MediaMeta models media metadata. type: object x-go-name: MediaMeta x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model nodeinfo: description: 'See: https://nodeinfo.diaspora.software/schema.html' properties: metadata: additionalProperties: {} description: Free form key value pairs for software specific values. Clients should not rely on any specific key present. type: object x-go-name: Metadata openRegistrations: description: Whether this server allows open self-registration. example: false type: boolean x-go-name: OpenRegistrations protocols: description: The protocols supported on this server. items: type: string type: array x-go-name: Protocols services: $ref: '#/definitions/NodeInfoServices' software: $ref: '#/definitions/NodeInfoSoftware' usage: $ref: '#/definitions/NodeInfoUsage' version: description: The schema version example: "2.0" type: string x-go-name: Version title: Nodeinfo represents a version 2.1 or version 2.0 nodeinfo schema. type: object x-go-name: Nodeinfo x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model notification: properties: account: $ref: '#/definitions/account' created_at: description: The timestamp of the notification (ISO 8601 Datetime) type: string x-go-name: CreatedAt id: description: The id of the notification in the database. type: string x-go-name: ID status: $ref: '#/definitions/status' type: description: |- The type of event that resulted in the notification. follow = Someone followed you follow_request = Someone requested to follow you mention = Someone mentioned you in their status reblog = Someone boosted one of your statuses favourite = Someone favourited one of your statuses poll = A poll you have voted in or created has ended status = Someone you enabled notifications for has posted a status type: string x-go-name: Type title: Notification represents a notification of an event relevant to the user. type: object x-go-name: Notification x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model oauthToken: properties: access_token: description: Access token used for authorization. type: string x-go-name: AccessToken created_at: description: When the OAuth token was generated (UNIX timestamp seconds). example: 1627644520 format: int64 type: integer x-go-name: CreatedAt scope: description: OAuth scopes granted by this token, space-separated. example: read write admin type: string x-go-name: Scope token_type: description: OAuth token type. Will always be 'Bearer'. example: bearer type: string x-go-name: TokenType title: Token represents an OAuth token used for authenticating with the GoToSocial API and performing actions. type: object x-go-name: Token x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model poll: properties: emojis: description: Custom emoji to be used for rendering poll options. items: $ref: '#/definitions/emoji' type: array x-go-name: Emojis expired: description: Is the poll currently expired? type: boolean x-go-name: Expired expires_at: description: When the poll ends. (ISO 8601 Datetime), or null if the poll does not end type: string x-go-name: ExpiresAt id: description: The ID of the poll in the database. example: 01FBYKMD1KBMJ0W6JF1YZ3VY5D type: string x-go-name: ID multiple: description: Does the poll allow multiple-choice answers? type: boolean x-go-name: Multiple options: description: Possible answers for the poll. items: $ref: '#/definitions/pollOptions' type: array x-go-name: Options own_votes: description: When called with a user token, which options has the authorized user chosen? Contains an array of index values for options. items: format: int64 type: integer type: array x-go-name: OwnVotes voted: description: When called with a user token, has the authorized user voted? type: boolean x-go-name: Voted voters_count: description: How many unique accounts have voted on a multiple-choice poll. Null if multiple is false. format: int64 type: integer x-go-name: VotersCount votes_count: description: How many votes have been received. format: int64 type: integer x-go-name: VotesCount title: Poll represents a poll attached to a status. type: object x-go-name: Poll x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model pollOptions: properties: title: description: The text value of the poll option. String. type: string x-go-name: Title votes_count: description: |- The number of received votes for this option. Number, or null if results are not published yet. format: int64 type: integer x-go-name: VotesCount title: PollOptions represents the current vote counts for different poll options. type: object x-go-name: PollOptions x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model report: properties: action_taken: description: Whether an action has been taken by an admin in response to this report. example: false type: boolean x-go-name: ActionTaken action_taken_at: description: |- If an action was taken, at what time was this done? (ISO 8601 Datetime) Will be null if not set / no action yet taken. example: "2021-07-30T09:20:25+00:00" type: string x-go-name: ActionTakenAt action_taken_comment: description: |- If an action was taken, what comment was made by the admin on the taken action? Will be null if not set / no action yet taken. example: Account was suspended. type: string x-go-name: ActionTakenComment category: description: Under what category was this report created? example: spam type: string x-go-name: Category comment: description: |- Comment submitted when the report was created. Will be empty if no comment was submitted. example: This person has been harassing me. type: string x-go-name: Comment created_at: description: The date when this report was created (ISO 8601 Datetime). example: "2021-07-30T09:20:25+00:00" type: string x-go-name: CreatedAt forwarded: description: Bool to indicate that report should be federated to remote instance. example: true type: boolean x-go-name: Forwarded id: description: ID of the report. example: 01FBVD42CQ3ZEEVMW180SBX03B type: string x-go-name: ID rule_ids: description: |- Array of rule IDs that were submitted along with this report. Will be empty if no rule IDs were submitted. example: - 1 - 2 items: format: int64 type: integer type: array x-go-name: RuleIDs status_ids: description: |- Array of IDs of statuses that were submitted along with this report. Will be empty if no status IDs were submitted. example: - 01GPBN5YDY6JKBWE44H7YQBDCQ - 01GPBN65PDWSBPWVDD0SQCFFY3 items: type: string type: array x-go-name: StatusIDs target_account: $ref: '#/definitions/account' title: Report models a moderation report submitted to the instance, either via the client API or via the federated API. type: object x-go-name: Report x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model searchResult: properties: accounts: items: $ref: '#/definitions/account' type: array x-go-name: Accounts hashtags: items: $ref: '#/definitions/tag' type: array x-go-name: Hashtags statuses: items: $ref: '#/definitions/status' type: array x-go-name: Statuses title: SearchResult models a search result. type: object x-go-name: SearchResult x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model status: properties: account: $ref: '#/definitions/account' application: $ref: '#/definitions/application' bookmarked: description: This status has been bookmarked by the account viewing it. type: boolean x-go-name: Bookmarked card: $ref: '#/definitions/card' content: description: The content of this status. Should be HTML, but might also be plaintext in some cases. example:

Hey this is a status!

type: string x-go-name: Content created_at: description: The date when this status was created (ISO 8601 Datetime). example: "2021-07-30T09:20:25+00:00" type: string x-go-name: CreatedAt emojis: description: Custom emoji to be used when rendering status content. items: $ref: '#/definitions/emoji' type: array x-go-name: Emojis favourited: description: This status has been favourited by the account viewing it. type: boolean x-go-name: Favourited favourites_count: description: Number of favourites/likes this status has received, according to our instance. format: int64 type: integer x-go-name: FavouritesCount id: description: ID of the status. example: 01FBVD42CQ3ZEEVMW180SBX03B type: string x-go-name: ID in_reply_to_account_id: description: ID of the account being replied to. example: 01FBVD42CQ3ZEEVMW180SBX03B type: string x-go-name: InReplyToAccountID in_reply_to_id: description: ID of the status being replied to. example: 01FBVD42CQ3ZEEVMW180SBX03B type: string x-go-name: InReplyToID language: description: |- Primary language of this status (ISO 639 Part 1 two-letter language code). Will be null if language is not known. example: en type: string x-go-name: Language media_attachments: description: Media that is attached to this status. items: $ref: '#/definitions/attachment' type: array x-go-name: MediaAttachments mentions: description: Mentions of users within the status content. items: $ref: '#/definitions/Mention' type: array x-go-name: Mentions muted: description: Replies to this status have been muted by the account viewing it. type: boolean x-go-name: Muted pinned: description: This status has been pinned by the account viewing it (only relevant for your own statuses). type: boolean x-go-name: Pinned poll: $ref: '#/definitions/poll' reblog: $ref: '#/definitions/statusReblogged' reblogged: description: This status has been boosted/reblogged by the account viewing it. type: boolean x-go-name: Reblogged reblogs_count: description: Number of times this status has been boosted/reblogged, according to our instance. format: int64 type: integer x-go-name: ReblogsCount replies_count: description: Number of replies to this status, according to our instance. format: int64 type: integer x-go-name: RepliesCount sensitive: description: Status contains sensitive content. example: false type: boolean x-go-name: Sensitive spoiler_text: description: Subject, summary, or content warning for the status. example: warning nsfw type: string x-go-name: SpoilerText tags: description: Hashtags used within the status content. items: $ref: '#/definitions/tag' type: array x-go-name: Tags text: description: |- Plain-text source of a status. Returned instead of content when status is deleted, so the user may redraft from the source text without the client having to reverse-engineer the original text from the HTML content. type: string x-go-name: Text uri: description: ActivityPub URI of the status. Equivalent to the status's activitypub ID. example: https://example.org/users/some_user/statuses/01FBVD42CQ3ZEEVMW180SBX03B type: string x-go-name: URI url: description: The status's publicly available web URL. This link will only work if the visibility of the status is 'public'. example: https://example.org/@some_user/statuses/01FBVD42CQ3ZEEVMW180SBX03B type: string x-go-name: URL visibility: description: Visibility of this status. example: unlisted type: string x-go-name: Visibility title: Status models a status or post. type: object x-go-name: Status x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model statusContext: properties: ancestors: description: Parents in the thread. items: $ref: '#/definitions/status' type: array x-go-name: Ancestors descendants: description: Children in the thread. items: $ref: '#/definitions/status' type: array x-go-name: Descendants title: Context models the tree around a given status. type: object x-go-name: Context x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model statusCreateRequest: properties: format: description: |- Format to use when parsing this status. in: formData type: string x-go-name: Format in_reply_to_id: description: |- ID of the status being replied to, if status is a reply. in: formData type: string x-go-name: InReplyToID language: description: |- ISO 639 language code for this status. in: formData type: string x-go-name: Language media_ids: description: |- Array of Attachment ids to be attached as media. If provided, status becomes optional, and poll cannot be used. If the status is being submitted as a form, the key is 'media_ids[]', but if it's json or xml, the key is 'media_ids'. in: formData items: type: string type: array x-go-name: MediaIDs scheduled_at: description: |- ISO 8601 Datetime at which to schedule a status. Providing this parameter will cause ScheduledStatus to be returned instead of Status. Must be at least 5 minutes in the future. in: formData type: string x-go-name: ScheduledAt sensitive: description: |- Status and attached media should be marked as sensitive. in: formData type: boolean x-go-name: Sensitive spoiler_text: description: |- Text to be shown as a warning or subject before the actual content. Statuses are generally collapsed behind this field. in: formData type: string x-go-name: SpoilerText status: description: |- Text content of the status. If media_ids is provided, this becomes optional. Attaching a poll is optional while status is provided. in: formData type: string x-go-name: Status visibility: description: |- Visibility of the posted status. in: formData type: string x-go-name: Visibility title: StatusCreateRequest models status creation parameters. type: object x-go-name: StatusCreateRequest x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model statusReblogged: properties: account: $ref: '#/definitions/account' application: $ref: '#/definitions/application' bookmarked: description: This status has been bookmarked by the account viewing it. type: boolean x-go-name: Bookmarked card: $ref: '#/definitions/card' content: description: The content of this status. Should be HTML, but might also be plaintext in some cases. example:

Hey this is a status!

type: string x-go-name: Content created_at: description: The date when this status was created (ISO 8601 Datetime). example: "2021-07-30T09:20:25+00:00" type: string x-go-name: CreatedAt emojis: description: Custom emoji to be used when rendering status content. items: $ref: '#/definitions/emoji' type: array x-go-name: Emojis favourited: description: This status has been favourited by the account viewing it. type: boolean x-go-name: Favourited favourites_count: description: Number of favourites/likes this status has received, according to our instance. format: int64 type: integer x-go-name: FavouritesCount id: description: ID of the status. example: 01FBVD42CQ3ZEEVMW180SBX03B type: string x-go-name: ID in_reply_to_account_id: description: ID of the account being replied to. example: 01FBVD42CQ3ZEEVMW180SBX03B type: string x-go-name: InReplyToAccountID in_reply_to_id: description: ID of the status being replied to. example: 01FBVD42CQ3ZEEVMW180SBX03B type: string x-go-name: InReplyToID language: description: |- Primary language of this status (ISO 639 Part 1 two-letter language code). Will be null if language is not known. example: en type: string x-go-name: Language media_attachments: description: Media that is attached to this status. items: $ref: '#/definitions/attachment' type: array x-go-name: MediaAttachments mentions: description: Mentions of users within the status content. items: $ref: '#/definitions/Mention' type: array x-go-name: Mentions muted: description: Replies to this status have been muted by the account viewing it. type: boolean x-go-name: Muted pinned: description: This status has been pinned by the account viewing it (only relevant for your own statuses). type: boolean x-go-name: Pinned poll: $ref: '#/definitions/poll' reblog: $ref: '#/definitions/statusReblogged' reblogged: description: This status has been boosted/reblogged by the account viewing it. type: boolean x-go-name: Reblogged reblogs_count: description: Number of times this status has been boosted/reblogged, according to our instance. format: int64 type: integer x-go-name: ReblogsCount replies_count: description: Number of replies to this status, according to our instance. format: int64 type: integer x-go-name: RepliesCount sensitive: description: Status contains sensitive content. example: false type: boolean x-go-name: Sensitive spoiler_text: description: Subject, summary, or content warning for the status. example: warning nsfw type: string x-go-name: SpoilerText tags: description: Hashtags used within the status content. items: $ref: '#/definitions/tag' type: array x-go-name: Tags text: description: |- Plain-text source of a status. Returned instead of content when status is deleted, so the user may redraft from the source text without the client having to reverse-engineer the original text from the HTML content. type: string x-go-name: Text uri: description: ActivityPub URI of the status. Equivalent to the status's activitypub ID. example: https://example.org/users/some_user/statuses/01FBVD42CQ3ZEEVMW180SBX03B type: string x-go-name: URI url: description: The status's publicly available web URL. This link will only work if the visibility of the status is 'public'. example: https://example.org/@some_user/statuses/01FBVD42CQ3ZEEVMW180SBX03B type: string x-go-name: URL visibility: description: Visibility of this status. example: unlisted type: string x-go-name: Visibility title: StatusReblogged represents a reblogged status. type: object x-go-name: StatusReblogged x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model swaggerCollection: properties: '@context': description: ActivityStreams context. example: https://www.w3.org/ns/activitystreams type: string x-go-name: Context first: $ref: '#/definitions/swaggerCollectionPage' id: description: ActivityStreams ID. example: https://example.org/users/some_user/statuses/106717595988259568/replies type: string x-go-name: ID last: $ref: '#/definitions/swaggerCollectionPage' type: description: ActivityStreams type. example: Collection type: string x-go-name: Type title: SwaggerCollection represents an activitypub collection. type: object x-go-name: SwaggerCollection x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/activitypub/users swaggerCollectionPage: properties: id: description: ActivityStreams ID. example: https://example.org/users/some_user/statuses/106717595988259568/replies?page=true type: string x-go-name: ID items: description: Items on this page. example: - https://example.org/users/some_other_user/statuses/086417595981111564 - https://another.example.com/users/another_user/statuses/01FCN8XDV3YG7B4R42QA6YQZ9R items: type: string type: array x-go-name: Items next: description: Link to the next page. example: https://example.org/users/some_user/statuses/106717595988259568/replies?only_other_accounts=true&page=true type: string x-go-name: Next partOf: description: Collection this page belongs to. example: https://example.org/users/some_user/statuses/106717595988259568/replies type: string x-go-name: PartOf type: description: ActivityStreams type. example: CollectionPage type: string x-go-name: Type title: SwaggerCollectionPage represents one page of a collection. type: object x-go-name: SwaggerCollectionPage x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/activitypub/users tag: properties: name: description: 'The value of the hashtag after the # sign.' example: helloworld type: string x-go-name: Name url: description: Web link to the hashtag. example: https://example.org/tags/helloworld type: string x-go-name: URL title: Tag represents a hashtag used within the content of a status. type: object x-go-name: Tag x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model updateField: description: By default, max 4 fields and 255 characters per property/value. properties: name: description: Name of the field type: string x-go-name: Name value: description: Value of the field type: string x-go-name: Value title: UpdateField is to be used specifically in an UpdateCredentialsRequest. type: object x-go-name: UpdateField x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model updateSource: properties: language: description: Default language to use for authored statuses. (ISO 6391) type: string x-go-name: Language privacy: description: Default post privacy for authored statuses. type: string x-go-name: Privacy sensitive: description: Mark authored statuses as sensitive by default. type: boolean x-go-name: Sensitive status_format: description: Default format for authored statuses (plain or markdown). type: string x-go-name: StatusFormat title: UpdateSource is to be used specifically in an UpdateCredentialsRequest. type: object x-go-name: UpdateSource x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model wellKnownResponse: description: See https://webfinger.net/ properties: aliases: items: type: string type: array x-go-name: Aliases links: items: $ref: '#/definitions/Link' type: array x-go-name: Links subject: type: string x-go-name: Subject title: |- WellKnownResponse represents the response to either a webfinger request for an 'acct' resource, or a request to nodeinfo. For example, it would be returned from https://example.org/.well-known/webfinger?resource=acct:some_username@example.org type: object x-go-name: WellKnownResponse x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model host: example.org info: contact: email: admin@gotosocial.org name: GoToSocial Authors license: name: AGPL3 url: https://www.gnu.org/licenses/agpl-3.0.en.html title: GoToSocial Swagger documentation. version: REPLACE_ME paths: /.well-known/nodeinfo: get: description: |- eg. `{"links":[{"rel":"http://nodeinfo.diaspora.software/ns/schema/2.0","href":"http://example.org/nodeinfo/2.0"}]}` See: https://nodeinfo.diaspora.software/protocol.html operationId: nodeInfoWellKnownGet produces: - application/json responses: "200": description: "" schema: $ref: '#/definitions/wellKnownResponse' summary: Returns a well-known response which redirects callers to `/nodeinfo/2.0`. tags: - .well-known /.well-known/webfinger: get: description: |- For example, a GET to `https://goblin.technology/.well-known/webfinger?resource=acct:tobi@goblin.technology` would return: ``` {"subject":"acct:tobi@goblin.technology","aliases":["https://goblin.technology/users/tobi","https://goblin.technology/@tobi"],"links":[{"rel":"http://webfinger.net/rel/profile-page","type":"text/html","href":"https://goblin.technology/@tobi"},{"rel":"self","type":"application/activity+json","href":"https://goblin.technology/users/tobi"}]} ``` See: https://webfinger.net/ operationId: webfingerGet produces: - application/json responses: "200": description: "" schema: $ref: '#/definitions/wellKnownResponse' summary: Handles webfinger account lookup requests. tags: - .well-known /api/{api_version}/media: post: consumes: - multipart/form-data operationId: mediaCreate parameters: - description: Version of the API to use. Must be either `v1` or `v2`. in: path name: api_version required: true type: string - description: Image or media description to use as alt-text on the attachment. This is very useful for users of screenreaders! May or may not be required, depending on your instance settings. in: formData name: description type: string - default: 0,0 description: 'Focus of the media file. If present, it should be in the form of two comma-separated floats between -1 and 1. For example: `-0.5,0.25`.' in: formData name: focus type: string - description: The media attachment to upload. in: formData name: file required: true type: file produces: - application/json responses: "200": description: The newly-created media attachment. schema: $ref: '#/definitions/attachment' "400": description: bad request "401": description: unauthorized "422": description: unprocessable "500": description: internal server error security: - OAuth2 Bearer: - write:media summary: Upload a new media attachment. tags: - media /api/v1/accounts: post: consumes: - application/json - application/xml - application/x-www-form-urlencoded description: |- The parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'. The parameters can also be given in the body of the request, as XML, if the content-type is set to 'application/xml'. operationId: accountCreate parameters: - description: Text that will be reviewed by moderators if registrations require manual approval. in: query name: reason type: string x-go-name: Reason - description: The desired username for the account. in: query name: username type: string x-go-name: Username - description: The email address to be used for login. in: query name: email type: string x-go-name: Email - description: The password to be used for login. This will be hashed before storage. in: query name: password type: string x-go-name: Password - description: The user agrees to the terms, conditions, and policies of the instance. in: query name: agreement type: boolean x-go-name: Agreement - description: The language of the confirmation email that will be sent. in: query name: locale type: string x-go-name: Locale produces: - application/json responses: "200": description: An OAuth2 access token for the newly-created account. schema: $ref: '#/definitions/oauthToken' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Application: - write:accounts summary: Create a new account using an application token. tags: - accounts /api/v1/accounts/{id}: get: operationId: accountGet parameters: - description: The id of the requested account. in: path name: id required: true type: string produces: - application/json responses: "200": description: The requested account. schema: $ref: '#/definitions/account' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:accounts summary: Get information about an account with the given ID. tags: - accounts /api/v1/accounts/{id}/block: post: operationId: accountBlock parameters: - description: The id of the account to block. in: path name: id required: true type: string produces: - application/json responses: "200": description: Your relationship to the account. schema: $ref: '#/definitions/accountRelationship' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:blocks summary: Block account with id. tags: - accounts /api/v1/accounts/{id}/follow: post: consumes: - application/json - application/xml - application/x-www-form-urlencoded description: |- The parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'. The parameters can also be given in the body of the request, as XML, if the content-type is set to 'application/xml'. operationId: accountFollow parameters: - description: ID of the account to follow. in: path name: id required: true type: string - default: true description: Show reblogs from this account. in: formData name: reblogs type: boolean - default: false description: Notify when this account posts. in: formData name: notify type: boolean produces: - application/json responses: "200": description: Your relationship to this account. schema: $ref: '#/definitions/accountRelationship' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:follows summary: Follow account with id. tags: - accounts /api/v1/accounts/{id}/followers: get: operationId: accountFollowers parameters: - description: Account ID. in: path name: id required: true type: string produces: - application/json responses: "200": description: Array of accounts that follow this account. schema: items: $ref: '#/definitions/account' type: array "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:accounts summary: See followers of account with given id. tags: - accounts /api/v1/accounts/{id}/following: get: operationId: accountFollowing parameters: - description: Account ID. in: path name: id required: true type: string produces: - application/json responses: "200": description: Array of accounts that are followed by this account. "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:accounts summary: See accounts followed by given account id. tags: - accounts /api/v1/accounts/{id}/statuses: get: description: The statuses will be returned in descending chronological order (newest first), with sequential IDs (bigger = newer). operationId: accountStatuses parameters: - description: Account ID. in: path name: id required: true type: string - default: 30 description: Number of statuses to return. in: query name: limit type: integer - default: false description: Exclude statuses that are a reply to another status. in: query name: exclude_replies type: boolean - default: false description: Exclude statuses that are a reblog/boost of another status. in: query name: exclude_reblogs type: boolean - description: Return only statuses *OLDER* than the given max status ID. The status with the specified ID will not be included in the response. in: query name: max_id type: string - description: Return only statuses *NEWER* than the given min status ID. The status with the specified ID will not be included in the response. in: query name: min_id type: string - default: false description: Show only pinned statuses. In other words, exclude statuses that are not pinned to the given account ID. in: query name: pinned_only type: boolean - default: false description: Show only statuses with media attachments. in: query name: only_media type: boolean - default: false description: Show only statuses with a privacy setting of 'public'. in: query name: only_public type: boolean produces: - application/json responses: "200": description: Array of statuses. schema: items: $ref: '#/definitions/status' type: array "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:accounts summary: See statuses posted by the requested account. tags: - accounts /api/v1/accounts/{id}/unblock: post: operationId: accountUnblock parameters: - description: The id of the account to unblock. in: path name: id required: true type: string produces: - application/json responses: "200": description: Your relationship to this account. schema: $ref: '#/definitions/accountRelationship' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:blocks summary: Unblock account with ID. tags: - accounts /api/v1/accounts/{id}/unfollow: post: operationId: accountUnfollow parameters: - description: The id of the account to unfollow. in: path name: id required: true type: string produces: - application/json responses: "200": description: Your relationship to this account. schema: $ref: '#/definitions/accountRelationship' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:follows summary: Unfollow account with id. tags: - accounts /api/v1/accounts/delete: post: consumes: - multipart/form-data operationId: accountDelete parameters: - description: Password of the account user, for confirmation. in: formData name: password required: true type: string responses: "202": description: The account deletion has been accepted and the account will be deleted. "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:accounts summary: Delete your account. tags: - accounts /api/v1/accounts/relationships: get: operationId: accountRelationships parameters: - description: Account IDs. in: query items: type: string name: id required: true type: array produces: - application/json responses: "200": description: Array of account relationships. schema: items: $ref: '#/definitions/accountRelationship' type: array "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:accounts summary: See your account's relationships with the given account IDs. tags: - accounts /api/v1/accounts/update_credentials: patch: consumes: - multipart/form-data operationId: accountUpdate parameters: - description: Account should be made discoverable and shown in the profile directory (if enabled). in: formData name: discoverable type: boolean - description: Account is flagged as a bot. in: formData name: bot type: boolean - allowEmptyValue: true description: The display name to use for the account. in: formData name: display_name type: string - allowEmptyValue: true description: Bio/description of this account. in: formData name: note type: string - description: Avatar of the user. in: formData name: avatar type: file - description: Header of the user. in: formData name: header type: file - description: Require manual approval of follow requests. in: formData name: locked type: boolean - description: Default post privacy for authored statuses. in: formData name: source[privacy] type: string - description: Mark authored statuses as sensitive by default. in: formData name: source[sensitive] type: boolean - description: Default language to use for authored statuses (ISO 6391). in: formData name: source[language] type: string - description: Default format to use for authored statuses (plain or markdown). in: formData name: source[status_format] type: string - description: Custom CSS to use when rendering this account's profile or statuses. String must be no more than 5,000 characters (~5kb). in: formData name: custom_css type: string - description: Enable RSS feed for this account's Public posts at `/[username]/feed.rss` in: formData name: enable_rss type: boolean produces: - application/json responses: "200": description: The newly updated account. schema: $ref: '#/definitions/account' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:accounts summary: Update your account. tags: - accounts /api/v1/accounts/verify_credentials: get: operationId: accountVerify produces: - application/json responses: "200": description: "" schema: $ref: '#/definitions/account' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:accounts summary: Verify a token by returning account details pertaining to it. tags: - accounts /api/v1/admin/accounts/{id}/action: post: consumes: - multipart/form-data operationId: adminAccountAction parameters: - description: ID of the account. in: path name: id required: true type: string - description: Type of action to be taken (`disable`, `silence`, or `suspend`). in: formData name: type required: true type: string - description: Optional text describing why this action was taken. in: formData name: text type: string produces: - application/json responses: "200": description: OK "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - admin summary: Perform an admin action on an account. tags: - admin /api/v1/admin/custom_emojis: get: description: |- The next and previous queries can be parsed from the returned Link header. Example: `; rel="next", ; rel="prev"` operationId: emojisGet parameters: - default: domain:all description: |- Comma-separated list of filters to apply to results. Recognized filters are: `domain:[domain]` -- show emojis from the given domain, eg `?filter=domain:example.org` will show emojis from `example.org` only. Instead of giving a specific domain, you can also give either one of the key words `local` or `all` to show either local emojis only (`domain:local`) or show all emojis from all domains (`domain:all`). Note: `domain:*` is equivalent to `domain:all` (including local). If no domain filter is provided, `domain:all` will be assumed. `disabled` -- include emojis that have been disabled. `enabled` -- include emojis that are enabled. `shortcode:[shortcode]` -- show only emojis with the given shortcode, eg `?filter=shortcode:blob_cat_uwu` will show only emojis with the shortcode `blob_cat_uwu` (case sensitive). If neither `disabled` or `enabled` are provided, both disabled and enabled emojis will be shown. If no filter query string is provided, the default `domain:all` will be used, which will show all emojis from all domains. in: query name: filter type: string - default: 50 description: Number of emojis to return. Less than 1, or not set, means unlimited (all emojis). in: query name: limit type: integer - description: |- Return only emojis with `[shortcode]@[domain]` *LOWER* (alphabetically) than given `[shortcode]@[domain]`. For example, if `max_shortcode_domain=beep@example.org`, then returned values might include emojis with `[shortcode]@[domain]`s like `car@example.org`, `debian@aaa.com`, `test@` (local emoji), etc. Emoji with the given `[shortcode]@[domain]` will not be included in the result set. in: query name: max_shortcode_domain type: string - description: |- Return only emojis with `[shortcode]@[domain]` *HIGHER* (alphabetically) than given `[shortcode]@[domain]`. For example, if `max_shortcode_domain=beep@example.org`, then returned values might include emojis with `[shortcode]@[domain]`s like `arse@test.com`, `0101_binary@hackers.net`, `bee@` (local emoji), etc. Emoji with the given `[shortcode]@[domain]` will not be included in the result set. in: query name: min_shortcode_domain type: string produces: - application/json responses: "200": description: An array of emojis, arranged alphabetically by shortcode and domain. headers: Link: description: Links to the next and previous queries. type: string schema: items: $ref: '#/definitions/adminEmoji' type: array "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error summary: View local and remote emojis available to / known by this instance. tags: - admin post: consumes: - multipart/form-data operationId: emojiCreate parameters: - description: The code to use for the emoji, which will be used by instance denizens to select it. This must be unique on the instance. in: formData name: shortcode pattern: \w{2,30} required: true type: string - description: A png or gif image of the emoji. Animated pngs work too! To ensure compatibility with other fedi implementations, emoji size limit is 50kb by default. in: formData name: image required: true type: file - description: Category in which to place the new emoji. 64 characters or less. If left blank, emoji will be uncategorized. If a category with the given name doesn't exist yet, it will be created. in: formData name: category type: string produces: - application/json responses: "200": description: The newly-created emoji. schema: $ref: '#/definitions/emoji' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "409": description: conflict -- shortcode for this emoji is already in use "500": description: internal server error security: - OAuth2 Bearer: - admin summary: Upload and create a new instance emoji. tags: - admin /api/v1/admin/custom_emojis/{id}: delete: description: |- Emoji with the given ID will no longer be available to use on the instance. If you just want to update the emoji image instead, use the `/api/v1/admin/custom_emojis/{id}` PATCH route. To disable emojis from **remote** instances, use the `/api/v1/admin/custom_emojis/{id}` PATCH route. operationId: emojiDelete parameters: - description: The id of the emoji. in: path name: id required: true type: string produces: - application/json responses: "200": description: The deleted emoji will be returned to the caller in case further processing is necessary. schema: $ref: '#/definitions/adminEmoji' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - admin summary: Delete a **local** emoji with the given ID from the instance. tags: - admin get: operationId: emojiGet parameters: - description: The id of the emoji. in: path name: id required: true type: string produces: - application/json responses: "200": description: A single emoji. schema: $ref: '#/definitions/adminEmoji' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error summary: Get the admin view of a single emoji. tags: - admin patch: consumes: - multipart/form-data description: |- Action performed depends upon the action `type` provided. `disable`: disable a REMOTE emoji from being used/displayed on this instance. Does not work for local emojis. `copy`: copy a REMOTE emoji to this instance. When doing this action, a shortcode MUST be provided, and it must be unique among emojis already present on this instance. A category MAY be provided, and the copied emoji will then be put into the provided category. `modify`: modify a LOCAL emoji. You can provide a new image for the emoji and/or update the category. Local emojis cannot be deleted using this endpoint. To delete a local emoji, check DELETE /api/v1/admin/custom_emojis/{id} instead. operationId: emojiUpdate parameters: - description: The id of the emoji. in: path name: id required: true type: string - description: |- Type of action to be taken. One of: (`disable`, `copy`, `modify`). For REMOTE emojis, `copy` or `disable` are supported. For LOCAL emojis, only `modify` is supported. in: formData name: type required: true type: string - description: The code to use for the emoji, which will be used by instance denizens to select it. This must be unique on the instance. Works for the `copy` action type only. in: formData name: shortcode pattern: \w{2,30} type: string - description: A new png or gif image to use for the emoji. Animated pngs work too! To ensure compatibility with other fedi implementations, emoji size limit is 50kb by default. Works for LOCAL emojis only. in: formData name: image type: file - description: Category in which to place the emoji. 64 characters or less. If a category with the given name doesn't exist yet, it will be created. in: formData name: category type: string produces: - application/json responses: "200": description: The updated emoji. schema: $ref: '#/definitions/adminEmoji' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - admin summary: Perform admin action on a local or remote emoji known to this instance. tags: - admin /api/v1/admin/custom_emojis/{id}/categories: get: operationId: emojiCategoriesGet parameters: - description: The id of the emoji. in: path name: id required: true type: string produces: - application/json responses: "200": description: Array of existing emoji categories. schema: items: $ref: '#/definitions/adminEmojiCategory' type: array "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error summary: Get a list of existing emoji categories. tags: - admin /api/v1/admin/domain_blocks: get: operationId: domainBlocksGet parameters: - description: If set to `true`, then each entry in the returned list of domain blocks will only consist of the fields `domain` and `public_comment`. This is perfect for when you want to save and share a list of all the domains you have blocked on your instance, so that someone else can easily import them, but you don't want them to see the database IDs of your blocks, or private comments etc. in: query name: export type: boolean produces: - application/json responses: "200": description: All domain blocks currently in place. schema: items: $ref: '#/definitions/domainBlock' type: array "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - admin summary: View all domain blocks currently in place. tags: - admin post: consumes: - multipart/form-data description: |- You have two options when using this endpoint: either you can set `import` to `true` and upload a file containing multiple domain blocks, JSON-formatted, or you can leave import as `false`, and just add one domain block. The format of the json file should be something like: `[{"domain":"example.org"},{"domain":"whatever.com","public_comment":"they smell"}]` operationId: domainBlockCreate parameters: - default: false description: Signal that a list of domain blocks is being imported as a file. If set to `true`, then 'domains' must be present as a JSON-formatted file. If set to `false`, then `domains` will be ignored, and `domain` must be present. in: query name: import type: boolean - description: JSON-formatted list of domain blocks to import. This is only used if `import` is set to `true`. in: formData name: domains type: file - description: Single domain to block. Used only if `import` is not `true`. in: formData name: domain type: string - description: Obfuscate the name of the domain when serving it publicly. Eg., `example.org` becomes something like `ex***e.org`. Used only if `import` is not `true`. in: formData name: obfuscate type: boolean - description: Public comment about this domain block. This will be displayed alongside the domain block if you choose to share blocks. Used only if `import` is not `true`. in: formData name: public_comment type: string - description: Private comment about this domain block. Will only be shown to other admins, so this is a useful way of internally keeping track of why a certain domain ended up blocked. Used only if `import` is not `true`. in: formData name: private_comment type: string produces: - application/json responses: "200": description: The newly created domain block, if `import` != `true`. If a list has been imported, then an `array` of newly created domain blocks will be returned instead. schema: $ref: '#/definitions/domainBlock' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - admin summary: Create one or more domain blocks, from a string or a file. tags: - admin /api/v1/admin/domain_blocks/{id}: delete: operationId: domainBlockDelete parameters: - description: The id of the domain block. in: path name: id required: true type: string produces: - application/json responses: "200": description: The domain block that was just deleted. schema: $ref: '#/definitions/domainBlock' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - admin summary: Delete domain block with the given ID. tags: - admin get: operationId: domainBlockGet parameters: - description: The id of the domain block. in: path name: id required: true type: string produces: - application/json responses: "200": description: The requested domain block. schema: $ref: '#/definitions/domainBlock' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - admin summary: View domain block with the given ID. tags: - admin /api/v1/admin/media_cleanup: post: consumes: - application/json - application/xml - application/x-www-form-urlencoded description: Also cleans up unused headers + avatars from the media cache and prunes orphaned items from storage. operationId: mediaCleanup parameters: - description: |- Number of days of remote media to keep. Native values will be treated as 0. If value is not specified, the value of media-remote-cache-days in the server config will be used. format: int64 in: query name: remote_cache_days type: integer x-go-name: RemoteCacheDays produces: - application/json responses: "200": description: Echos the number of days requested. The cleanup is performed asynchronously after the request completes. "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - admin summary: Clean up remote media older than the specified number of days. tags: - admin /api/v1/admin/media_refetch: post: description: |- Currently, this only includes remote emojis. This endpoint is useful when data loss has occurred, and you want to try to recover to a working state. operationId: mediaRefetch parameters: - description: Domain to refetch media from. If empty, all domains will be refetched. in: query name: domain type: string produces: - application/json responses: "202": description: Request accepted and will be processed. Check the logs for progress / errors. "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - admin summary: Refetch media specified in the database but missing from storage. tags: - admin /api/v1/admin/reports: get: description: |- The reports will be returned in descending chronological order (newest first), with sequential IDs (bigger = newer). The next and previous queries can be parsed from the returned Link header. Example: ``` ; rel="next", ; rel="prev" ```` operationId: adminReports parameters: - description: If set to true, only resolved reports will be returned. If false, only unresolved reports will be returned. If unset, reports will not be filtered on their resolved status. in: query name: resolved type: boolean - description: Return only reports created by the given account id. in: query name: account_id type: string - description: Return only reports that target the given account id. in: query name: target_account_id type: string - description: Return only reports *OLDER* than the given max ID. The report with the specified ID will not be included in the response. in: query name: max_id type: string - description: Return only reports *NEWER* than the given since ID. The report with the specified ID will not be included in the response. This parameter is functionally equivalent to min_id. in: query name: since_id type: string - description: Return only reports *NEWER* than the given min ID. The report with the specified ID will not be included in the response. This parameter is functionally equivalent to since_id. in: query name: min_id type: string - default: 20 description: Number of reports to return. If less than 1, will be clamped to 1. If more than 100, will be clamped to 100. in: query name: limit type: integer produces: - application/json responses: "200": description: Array of reports. schema: items: $ref: '#/definitions/adminReport' type: array "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - admin summary: View user moderation reports. tags: - admin /api/v1/admin/reports/{id}: get: operationId: adminReportGet parameters: - description: The id of the report. in: path name: id required: true type: string produces: - application/json responses: "200": description: The requested report. schema: $ref: '#/definitions/adminReport' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - admin summary: View user moderation report with the given id. tags: - admin /api/v1/admin/reports/{id}/resolve: post: consumes: - application/json - application/xml - multipart/form-data operationId: adminReportResolve parameters: - description: The id of the report. in: path name: id required: true type: string - description: Optional admin comment on the action taken in response to this report. Useful for providing an explanation about what action was taken (if any) before the report was marked as resolved. This will be visible to the user that created the report! x-example: The reported account was suspended. in: formData name: action_taken_comment type: string produces: - application/json responses: "200": description: The resolved report. schema: $ref: '#/definitions/adminReport' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - admin summary: Mark a report as resolved. tags: - admin /api/v1/apps: post: consumes: - application/json - application/xml - application/x-www-form-urlencoded description: |- The registered application can be used to obtain an application token. This can then be used to register a new account, or (through user auth) obtain an access token. The parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'. The parameters can also be given in the body of the request, as XML, if the content-type is set to 'application/xml'. operationId: appCreate parameters: - description: The name of the application. in: formData name: client_name required: true type: string x-go-name: ClientName - description: |- Where the user should be redirected after authorization. To display the authorization code to the user instead of redirecting to a web page, use `urn:ietf:wg:oauth:2.0:oob` in this parameter. in: formData name: redirect_uris required: true type: string x-go-name: RedirectURIs - description: |- Space separated list of scopes. If no scopes are provided, defaults to `read`. in: formData name: scopes type: string x-go-name: Scopes - description: A URL to the web page of the app (optional). in: formData name: website type: string x-go-name: Website produces: - application/json responses: "200": description: The newly-created application. schema: $ref: '#/definitions/application' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error summary: Register a new application on this instance. tags: - apps /api/v1/blocks: get: description: |- The next and previous queries can be parsed from the returned Link header. Example: ``` ; rel="next", ; rel="prev" ```` operationId: blocksGet parameters: - default: 20 description: Number of blocks to return. in: query name: limit type: integer - description: Return only blocks *OLDER* than the given block ID. The block with the specified ID will not be included in the response. in: query name: max_id type: string - description: Return only blocks *NEWER* than the given block ID. The block with the specified ID will not be included in the response. in: query name: since_id type: string produces: - application/json responses: "200": description: "" headers: Link: description: Links to the next and previous queries. type: string schema: items: $ref: '#/definitions/account' type: array "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:blocks summary: Get an array of accounts that requesting account has blocked. tags: - blocks /api/v1/bookmarks: get: description: Get an array of statuses bookmarked in the instance operationId: bookmarksGet produces: - application/json responses: "200": description: Array of bookmarked statuses headers: Link: description: Links to the next and previous queries. type: string schema: items: $ref: '#/definitions/status' type: array "401": description: unauthorized "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:bookmarks tags: - bookmarks /api/v1/custom_emojis: get: operationId: customEmojisGet produces: - application/json responses: "200": description: Array of custom emojis. schema: items: $ref: '#/definitions/emoji' type: array "401": description: unauthorized "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:custom_emojis summary: Get an array of custom emojis available on the instance. tags: - custom_emojis /api/v1/favourites: get: description: |- The next and previous queries can be parsed from the returned Link header. Example: ``` ; rel="next", ; rel="prev" ```` operationId: favouritesGet parameters: - default: 20 description: Number of statuses to return. in: query name: limit type: integer - description: Return only favourited statuses *OLDER* than the given favourite ID. The status with the corresponding fave ID will not be included in the response. in: query name: max_id type: string - description: Return only favourited statuses *NEWER* than the given favourite ID. The status with the corresponding fave ID will not be included in the response. in: query name: min_id type: string produces: - application/json responses: "200": description: "" headers: Link: description: Links to the next and previous queries. type: string schema: items: $ref: '#/definitions/status' type: array "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:favourites summary: Get an array of statuses that the requesting account has favourited. tags: - favourites /api/v1/featured_tags: get: description: 'THIS ENDPOINT IS CURRENTLY NOT FULLY IMPLEMENTED: it will always return an empty array.' operationId: getFeaturedTags produces: - application/json responses: "200": description: "" schema: items: type: object type: array "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:accounts summary: Get an array of all hashtags that you currently have featured on your profile. tags: - featured_tags /api/v1/follow_requests: get: description: Accounts will be sorted in order of follow request date descending (newest first). operationId: getFollowRequests parameters: - default: 40 description: Number of accounts to return. in: query name: limit type: integer produces: - application/json responses: "200": description: "" headers: Link: description: Links to the next and previous queries. type: string schema: items: $ref: '#/definitions/account' type: array "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:follows summary: Get an array of accounts that have requested to follow you. tags: - follow_requests /api/v1/follow_requests/{account_id}/authorize: post: description: Accept a follow request and put the requesting account in your 'followers' list. operationId: authorizeFollowRequest parameters: - description: ID of the account requesting to follow you. in: path name: account_id required: true type: string produces: - application/json responses: "200": description: Your relationship to this account. schema: $ref: '#/definitions/accountRelationship' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:follows summary: Accept/authorize follow request from the given account ID. tags: - follow_requests /api/v1/follow_requests/{account_id}/reject: post: operationId: rejectFollowRequest parameters: - description: ID of the account requesting to follow you. in: path name: account_id required: true type: string produces: - application/json responses: "200": description: Your relationship to this account. schema: $ref: '#/definitions/accountRelationship' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:follows summary: Reject/deny follow request from the given account ID. tags: - follow_requests /api/v1/instance: get: operationId: instanceGetV1 produces: - application/json responses: "200": description: Instance information. schema: $ref: '#/definitions/instanceV1' "406": description: not acceptable "500": description: internal error summary: View instance information. tags: - instance patch: consumes: - multipart/form-data description: This requires admin permissions on the instance. operationId: instanceUpdate parameters: - allowEmptyValue: true description: Title to use for the instance. in: formData maximum: 40 name: title type: string - allowEmptyValue: true description: Username of the contact account. This must be the username of an instance admin. in: formData name: contact_username type: string - allowEmptyValue: true description: Email address to use as the instance contact. in: formData name: contact_email type: string - allowEmptyValue: true description: Short description of the instance. in: formData maximum: 500 name: short_description type: string - allowEmptyValue: true description: Longer description of the instance. in: formData maximum: 5000 name: description type: string - allowEmptyValue: true description: Terms and conditions of the instance. in: formData maximum: 5000 name: terms type: string - description: Thumbnail image to use for the instance. in: formData name: thumbnail type: file - description: Image description of the submitted instance thumbnail. in: formData name: thumbnail_description type: string - description: Header image to use for the instance. in: formData name: header type: file produces: - application/json responses: "200": description: The newly updated instance. schema: $ref: '#/definitions/instanceV1' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - admin summary: Update your instance information and/or upload a new avatar/header for the instance. tags: - instance /api/v1/instance/peers: get: operationId: instancePeersGet parameters: - default: open description: |- Comma-separated list of filters to apply to results. Recognized filters are: - `open` -- include peers that are not suspended or silenced - `suspended` -- include peers that have been suspended. If filter is `open`, only instances that haven't been suspended or silenced will be returned. If filter is `suspended`, only suspended instances will be shown. If filter is `open,suspended`, then all known instances will be returned. If filter is an empty string or not set, then `open` will be assumed as the default. in: query name: filter type: string produces: - application/json responses: "200": description: |- If no filter parameter is provided, or filter is empty, then a legacy, Mastodon-API compatible response will be returned. This will consist of just a 'flat' array of strings like `["example.com", "example.org"]`, which corresponds to domains this instance peers with. If a filter parameter is provided, then an array of objects with at least a `domain` key set on each object will be returned. Domains that are silenced or suspended will also have a key `suspended_at` or `silenced_at` that contains an iso8601 date string. If one of these keys is not present on the domain object, it is open. Suspended instances may in some cases be obfuscated, which means they will have some letters replaced by `*` to make it more difficult for bad actors to target instances with harassment. Whether a flat response or a more detailed response is returned, domains will be sorted alphabetically by hostname. schema: items: $ref: '#/definitions/domain' type: array "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error tags: - instance /api/v1/media/{id}: get: operationId: mediaGet parameters: - description: id of the attachment in: path name: id required: true type: string produces: - application/json responses: "200": description: The requested media attachment. schema: $ref: '#/definitions/attachment' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:media summary: Get a media attachment that you own. tags: - media put: consumes: - application/json - application/xml - application/x-www-form-urlencoded description: |- You must own the media attachment, and the attachment must not yet be attached to a status. The parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'. The parameters can also be given in the body of the request, as XML, if the content-type is set to 'application/xml'. operationId: mediaUpdate parameters: - description: id of the attachment to update in: path name: id required: true type: string - allowEmptyValue: true description: Image or media description to use as alt-text on the attachment. This is very useful for users of screenreaders! May or may not be required, depending on your instance settings. in: formData name: description type: string - allowEmptyValue: true default: 0,0 description: 'Focus of the media file. If present, it should be in the form of two comma-separated floats between -1 and 1. For example: `-0.5,0.25`.' in: formData name: focus type: string produces: - application/json responses: "200": description: The newly-updated media attachment. schema: $ref: '#/definitions/attachment' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:media summary: Update a media attachment. tags: - media /api/v1/notifications: get: description: |- The notifications will be returned in descending chronological order (newest first), with sequential IDs (bigger = newer). The next and previous queries can be parsed from the returned Link header. Example: ``` ; rel="next", ; rel="prev" ```` operationId: notifications parameters: - default: 20 description: Number of notifications to return. in: query name: limit type: integer - in: query items: type: string name: exclude_types type: array - description: Return only notifications *OLDER* than the given max status ID. The status with the specified ID will not be included in the response. in: query name: max_id type: string - description: |- Return only notifications *NEWER* than the given since status ID. The status with the specified ID will not be included in the response. in: query name: since_id type: string produces: - application/json responses: "200": description: Array of notifications. headers: Link: description: Links to the next and previous queries. type: string schema: items: $ref: '#/definitions/notification' type: array "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:notifications summary: Get notifications for currently authorized user. tags: - notifications post: description: Will return an empty object `{}` to indicate success. operationId: clearNotifications produces: - application/json responses: "200": description: "" schema: type: object "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:notifications summary: Clear/delete all notifications for currently authorized user. tags: - notifications /api/v1/reports: get: description: |- The reports will be returned in descending chronological order (newest first), with sequential IDs (bigger = newer). The next and previous queries can be parsed from the returned Link header. Example: ``` ; rel="next", ; rel="prev" ```` operationId: reports parameters: - description: If set to true, only resolved reports will be returned. If false, only unresolved reports will be returned. If unset, reports will not be filtered on their resolved status. in: query name: resolved type: boolean - description: Return only reports that target the given account id. in: query name: target_account_id type: string - description: Return only reports *OLDER* than the given max ID. The report with the specified ID will not be included in the response. in: query name: max_id type: string - description: Return only reports *NEWER* than the given since ID. The report with the specified ID will not be included in the response. This parameter is functionally equivalent to min_id. in: query name: since_id type: string - description: Return only reports *NEWER* than the given min ID. The report with the specified ID will not be included in the response. This parameter is functionally equivalent to since_id. in: query name: min_id type: string - default: 20 description: Number of reports to return. If less than 1, will be clamped to 1. If more than 100, will be clamped to 100. in: query name: limit type: integer produces: - application/json responses: "200": description: Array of reports. schema: items: $ref: '#/definitions/report' type: array "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:reports summary: See reports created by the requesting account. tags: - reports post: consumes: - application/json - application/xml - application/x-www-form-urlencoded operationId: reportCreate parameters: - description: ID of the account to report. x-example: 01GPE75FXSH2EGFBF85NXPH3KP in: formData name: account_id required: true type: string x-go-name: AccountID - description: IDs of statuses to attach to the report to provide additional context. x-example: - 01GPE76N4SBVRZ8K24TW51ZZQ4 - 01GPE76WN9JZE62EPT3Q9FRRD4 in: formData items: type: string name: status_ids type: array x-go-name: StatusIDs - description: The reason for the report. Default maximum of 1000 characters. x-example: Anti-Blackness, transphobia. in: formData name: comment type: string x-go-name: Comment - default: false description: If the account is remote, should the report be forwarded to the remote admin? x-example: true in: formData name: forward type: boolean x-go-name: Forward - default: other description: |- Specify if the report is due to spam, violation of enumerated instance rules, or some other reason. Currently only 'other' is supported. x-example: other in: formData name: category type: string x-go-name: Category - description: |- IDs of rules on this instance which have been broken according to the reporter. This is currently not supported, provided only for API compatibility. x-example: - 1 - 2 - 3 in: formData items: format: int64 type: integer name: rule_ids type: array x-go-name: RuleIDs produces: - application/json responses: "200": description: The created report. schema: $ref: '#/definitions/report' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:reports summary: Create a new user report with the given parameters. tags: - reports /api/v1/reports/{id}: get: operationId: reportGet parameters: - description: ID of the report in: path name: id required: true type: string produces: - application/json responses: "200": description: The requested report. schema: $ref: '#/definitions/report' "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:reports summary: Get one report with the given id. tags: - reports /api/v1/search: get: description: If statuses are in the result, they will be returned in descending chronological order (newest first), with sequential IDs (bigger = newer). operationId: searchGet parameters: - description: If type is `statuses`, then statuses returned will be authored only by this account. in: query name: account_id type: string x-go-name: AccountID - description: |- Return results *older* than this id. The entry with this ID will not be included in the search results. in: query name: max_id type: string x-go-name: MaxID - description: |- Return results *newer* than this id. The entry with this ID will not be included in the search results. in: query name: min_id type: string x-go-name: MinID - description: |- Type of the search query to perform. Must be one of: `accounts`, `hashtags`, `statuses`. in: query name: type required: true type: string x-go-name: Type - default: false description: Filter out tags that haven't been reviewed and approved by an instance admin. in: query name: exclude_unreviewed type: boolean x-go-name: ExcludeUnreviewed - description: |- String to use as a search query. For accounts, this should be in the format `@someaccount@some.instance.com`, or the format `https://some.instance.com/@someaccount` For a status, this can be in the format: `https://some.instance.com/@someaccount/SOME_ID_OF_A_STATUS` in: query name: q required: true type: string x-go-name: Query - default: false description: Attempt to resolve the query by performing a remote webfinger lookup, if the query includes a remote host. in: query name: resolve type: boolean x-go-name: Resolve - default: 20 description: Maximum number of results to load, per type. format: int64 in: query maximum: 40 minimum: 1 name: limit type: integer x-go-name: Limit - default: 0 description: Offset for paginating search results. format: int64 in: query name: offset type: integer x-go-name: Offset - default: false description: Only include accounts that the searching account is following. in: query name: following type: boolean x-go-name: Following responses: "200": description: Results of the search. schema: items: $ref: '#/definitions/searchResult' type: array "400": description: bad request "401": description: unauthorized "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:search summary: Search for statuses, accounts, or hashtags, on this instance or elsewhere. tags: - search /api/v1/statuses: post: consumes: - application/json - application/xml - application/x-www-form-urlencoded description: |- The parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'. The parameters can also be given in the body of the request, as XML, if the content-type is set to 'application/xml'. operationId: statusCreate parameters: - description: |- Text content of the status. If media_ids is provided, this becomes optional. Attaching a poll is optional while status is provided. in: formData name: status type: string x-go-name: Status - description: |- Array of Attachment ids to be attached as media. If provided, status becomes optional, and poll cannot be used. If the status is being submitted as a form, the key is 'media_ids[]', but if it's json or xml, the key is 'media_ids'. in: formData items: type: string name: media_ids type: array x-go-name: MediaIDs - description: ID of the status being replied to, if status is a reply. in: formData name: in_reply_to_id type: string x-go-name: InReplyToID - description: Status and attached media should be marked as sensitive. in: formData name: sensitive type: boolean x-go-name: Sensitive - description: |- Text to be shown as a warning or subject before the actual content. Statuses are generally collapsed behind this field. in: formData name: spoiler_text type: string x-go-name: SpoilerText - description: Visibility of the posted status. in: formData name: visibility type: string x-go-name: Visibility - description: |- ISO 8601 Datetime at which to schedule a status. Providing this parameter will cause ScheduledStatus to be returned instead of Status. Must be at least 5 minutes in the future. in: formData name: scheduled_at type: string x-go-name: ScheduledAt - description: ISO 639 language code for this status. in: formData name: language type: string x-go-name: Language - description: Format to use when parsing this status. in: formData name: format type: string x-go-name: Format - description: This status will be federated beyond the local timeline(s). in: query name: federated type: boolean x-go-name: Federated - description: This status can be boosted/reblogged. in: query name: boostable type: boolean x-go-name: Boostable - description: This status can be replied to. in: query name: replyable type: boolean x-go-name: Replyable - description: This status can be liked/faved. in: query name: likeable type: boolean x-go-name: Likeable produces: - application/json responses: "200": description: The newly created status. schema: $ref: '#/definitions/status' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:statuses summary: Create a new status. tags: - statuses /api/v1/statuses/{id}: delete: description: |- The deleted status will be returned in the response. The `text` field will contain the original text of the status as it was submitted. This is useful when doing a 'delete and redraft' type operation. operationId: statusDelete parameters: - description: Target status ID. in: path name: id required: true type: string produces: - application/json responses: "200": description: The status that was just deleted. schema: $ref: '#/definitions/status' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:statuses summary: Delete status with the given ID. The status must belong to you. tags: - statuses get: operationId: statusGet parameters: - description: Target status ID. in: path name: id required: true type: string produces: - application/json responses: "200": description: The requested status. schema: $ref: '#/definitions/status' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:statuses summary: View status with the given ID. tags: - statuses /api/v1/statuses/{id}/bookmark: post: operationId: statusBookmark parameters: - description: Target status ID. in: path name: id required: true type: string produces: - application/json responses: "200": description: The status. schema: $ref: '#/definitions/status' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:statuses summary: Bookmark status with the given ID. tags: - statuses /api/v1/statuses/{id}/context: get: description: The returned statuses will be ordered in a thread structure, so they are suitable to be displayed in the order in which they were returned. operationId: statusContext parameters: - description: Target status ID. in: path name: id required: true type: string produces: - application/json responses: "200": description: Status context object. schema: $ref: '#/definitions/statusContext' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:statuses summary: Return ancestors and descendants of the given status. tags: - statuses /api/v1/statuses/{id}/favourite: post: operationId: statusFave parameters: - description: Target status ID. in: path name: id required: true type: string produces: - application/json responses: "200": description: The newly faved status. schema: $ref: '#/definitions/status' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:statuses summary: Star/like/favourite the given status, if permitted. tags: - statuses /api/v1/statuses/{id}/favourited_by: get: operationId: statusFavedBy parameters: - description: Target status ID. in: path name: id required: true type: string produces: - application/json responses: "200": description: "" schema: items: $ref: '#/definitions/account' type: array "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - read:accounts summary: View accounts that have faved/starred/liked the target status. tags: - statuses /api/v1/statuses/{id}/reblog: post: description: |- If the target status is rebloggable/boostable, it will be shared with your followers. This is equivalent to an ActivityPub 'Announce' activity. operationId: statusReblog parameters: - description: Target status ID. in: path name: id required: true type: string produces: - application/json responses: "200": description: The boost of the status. schema: $ref: '#/definitions/status' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:statuses summary: Reblog/boost status with the given ID. tags: - statuses /api/v1/statuses/{id}/reblogged_by: get: operationId: statusBoostedBy parameters: - description: Target status ID. in: path name: id required: true type: string produces: - application/json responses: "200": description: "" schema: items: $ref: '#/definitions/account' type: array "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found security: - OAuth2 Bearer: - read:accounts summary: View accounts that have reblogged/boosted the target status. tags: - statuses /api/v1/statuses/{id}/unbookmark: post: operationId: statusUnbookmark parameters: - description: Target status ID. in: path name: id required: true type: string produces: - application/json responses: "200": description: The status. schema: $ref: '#/definitions/status' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:statuses summary: Unbookmark status with the given ID. tags: - statuses /api/v1/statuses/{id}/unfavourite: post: operationId: statusUnfave parameters: - description: Target status ID. in: path name: id required: true type: string produces: - application/json responses: "200": description: The unfaved status. schema: $ref: '#/definitions/status' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:statuses summary: Unstar/unlike/unfavourite the given status. tags: - statuses /api/v1/statuses/{id}/unreblog: post: operationId: statusUnreblog parameters: - description: Target status ID. in: path name: id required: true type: string produces: - application/json responses: "200": description: The unboosted status. schema: $ref: '#/definitions/status' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found "406": description: not acceptable "500": description: internal server error security: - OAuth2 Bearer: - write:statuses summary: Unreblog/unboost status with the given ID. tags: - statuses /api/v1/streaming: get: description: |- The scheme used should *always* be `wss`. The streaming basepath can be viewed at `/api/v1/instance`. On a successful connection, a code `101` will be returned, which indicates that the connection is being upgraded to a secure websocket connection. As long as the connection is open, various message types will be streamed into it. GoToSocial will ping the connection every 30 seconds to check whether the client is still receiving. If the ping fails, or something else goes wrong during transmission, then the connection will be dropped, and the client will be expected to start it again. operationId: streamGet parameters: - description: Access token for the requesting account. in: query name: access_token required: true type: string - description: |- Type of stream to request. Options are: `user`: receive updates for the account's home timeline. `public`: receive updates for the public timeline. `public:local`: receive updates for the local timeline. `hashtag`: receive updates for a given hashtag. `hashtag:local`: receive local updates for a given hashtag. `list`: receive updates for a certain list of accounts. `direct`: receive updates for direct messages. in: query name: stream required: true type: string produces: - application/json responses: "101": description: "" schema: properties: event: description: |- The type of event being received. `update`: a new status has been received. `notification`: a new notification has been received. `delete`: a status has been deleted. `filters_changed`: not implemented. enum: - update - notification - delete - filters_changed type: string payload: description: |- The payload of the streamed message. Different depending on the `event` type. If present, it should be parsed as a string. If `event` = `update`, then the payload will be a JSON string of a status. If `event` = `notification`, then the payload will be a JSON string of a notification. If `event` = `delete`, then the payload will be a status ID. example: '{"id":"01FC3TZ5CFG6H65GCKCJRKA669","created_at":"2021-08-02T16:25:52Z","sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"https://gts.superseriousbusiness.org/users/dumpsterqueer/statuses/01FC3TZ5CFG6H65GCKCJRKA669","url":"https://gts.superseriousbusiness.org/@dumpsterqueer/statuses/01FC3TZ5CFG6H65GCKCJRKA669","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":fals…//gts.superseriousbusiness.org/fileserver/01JNN207W98SGG3CBJ76R5MVDN/header/original/019036W043D8FXPJKSKCX7G965.png","header_static":"https://gts.superseriousbusiness.org/fileserver/01JNN207W98SGG3CBJ76R5MVDN/header/small/019036W043D8FXPJKSKCX7G965.png","followers_count":33,"following_count":28,"statuses_count":126,"last_status_at":"2021-08-02T16:25:52Z","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null,"text":"a"}' type: string stream: items: enum: - user - public - public:local - hashtag - hashtag:local - list - direct type: string type: array type: object "400": description: bad request "401": description: unauthorized schemes: - wss security: - OAuth2 Bearer: - read:streaming summary: Initiate a websocket connection for live streaming of statuses and notifications. tags: - streaming /api/v1/timelines/home: get: description: |- The statuses will be returned in descending chronological order (newest first), with sequential IDs (bigger = newer). The returned Link header can be used to generate the previous and next queries when scrolling up or down a timeline. Example: ``` ; rel="next", ; rel="prev" ```` operationId: homeTimeline parameters: - description: Return only statuses *OLDER* than the given max status ID. The status with the specified ID will not be included in the response. in: query name: max_id type: string - description: Return only statuses *NEWER* than the given since status ID. The status with the specified ID will not be included in the response. in: query name: since_id type: string - description: Return only statuses *NEWER* than the given since status ID. The status with the specified ID will not be included in the response. in: query name: min_id type: string - default: 20 description: Number of statuses to return. in: query name: limit type: integer - default: false description: Show only statuses posted by local accounts. in: query name: local type: boolean produces: - application/json responses: "200": description: Array of statuses. headers: Link: description: Links to the next and previous queries. type: string schema: items: $ref: '#/definitions/status' type: array "400": description: bad request "401": description: unauthorized security: - OAuth2 Bearer: - read:statuses summary: See statuses/posts by accounts you follow. tags: - timelines /api/v1/timelines/public: get: description: |- The statuses will be returned in descending chronological order (newest first), with sequential IDs (bigger = newer). The returned Link header can be used to generate the previous and next queries when scrolling up or down a timeline. Example: ``` ; rel="next", ; rel="prev" ```` operationId: publicTimeline parameters: - description: Return only statuses *OLDER* than the given max status ID. The status with the specified ID will not be included in the response. in: query name: max_id type: string - description: Return only statuses *NEWER* than the given since status ID. The status with the specified ID will not be included in the response. in: query name: since_id type: string - description: Return only statuses *NEWER* than the given since status ID. The status with the specified ID will not be included in the response. in: query name: min_id type: string - default: 20 description: Number of statuses to return. in: query name: limit type: integer - default: false description: Show only statuses posted by local accounts. in: query name: local type: boolean produces: - application/json responses: "200": description: Array of statuses. headers: Link: description: Links to the next and previous queries. type: string schema: items: $ref: '#/definitions/status' type: array "400": description: bad request "401": description: unauthorized security: - OAuth2 Bearer: - read:statuses summary: See public statuses/posts that your instance is aware of. tags: - timelines /api/v1/user/password_change: post: consumes: - application/json - application/xml - application/x-www-form-urlencoded description: |- The parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'. The parameters can also be given in the body of the request, as XML, if the content-type is set to 'application/xml'. operationId: userPasswordChange parameters: - description: User's previous password. in: formData name: old_password required: true type: string x-go-name: OldPassword - description: |- Desired new password. If the password does not have high enough entropy, it will be rejected. See https://github.com/wagslane/go-password-validator in: formData name: new_password required: true type: string x-go-name: NewPassword produces: - application/json responses: "200": description: Change successful "400": description: bad request "401": description: unauthorized "403": description: forbidden "406": description: not acceptable "500": description: internal error security: - OAuth2 Bearer: - write:user summary: Change the password of authenticated user. tags: - user /api/v2/instance: get: operationId: instanceGetV2 produces: - application/json responses: "200": description: Instance information. schema: $ref: '#/definitions/instanceV2' "406": description: not acceptable "500": description: internal error summary: View instance information. tags: - instance /nodeinfo/2.0: get: description: 'See: https://nodeinfo.diaspora.software/schema.html' operationId: nodeInfoGet produces: - application/json; profile="http://nodeinfo.diaspora.software/ns/schema/2.0#" responses: "200": description: "" schema: $ref: '#/definitions/nodeinfo' summary: Returns a compliant nodeinfo response to node info queries. tags: - nodeinfo /users/{username}/outbox: get: description: |- Note that the response will be a Collection with a page as `first`, as shown below, if `page` is `false`. If `page` is `true`, then the response will be a single `CollectionPage` without the wrapping `Collection`. HTTP signature is required on the request. operationId: s2sOutboxGet parameters: - description: Username of the account. in: path name: username required: true type: string - default: false description: Return response as a CollectionPage. in: query name: page type: boolean - description: Minimum ID of the next status, used for paging. in: query name: min_id type: string - description: Maximum ID of the next status, used for paging. in: query name: max_id type: string produces: - application/activity+json responses: "200": description: "" schema: $ref: '#/definitions/swaggerCollection' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found summary: Get the public outbox collection for an actor. tags: - s2s/federation /users/{username}/statuses/{status}/replies: get: description: |- Note that the response will be a Collection with a page as `first`, as shown below, if `page` is `false`. If `page` is `true`, then the response will be a single `CollectionPage` without the wrapping `Collection`. HTTP signature is required on the request. operationId: s2sRepliesGet parameters: - description: Username of the account. in: path name: username required: true type: string - description: ID of the status. in: path name: status required: true type: string - default: false description: Return response as a CollectionPage. in: query name: page type: boolean - default: false description: Return replies only from accounts other than the status owner. in: query name: only_other_accounts type: boolean - description: Minimum ID of the next status, used for paging. in: query name: min_id type: string produces: - application/activity+json responses: "200": description: "" schema: $ref: '#/definitions/swaggerCollection' "400": description: bad request "401": description: unauthorized "403": description: forbidden "404": description: not found summary: Get the replies collection for a status. tags: - s2s/federation schemes: - https - http securityDefinitions: OAuth2 Application: flow: application scopes: write:accounts: grants write access to accounts tokenUrl: https://example.org/oauth/token type: oauth2 OAuth2 Bearer: authorizationUrl: https://example.org/oauth/authorize flow: accessCode scopes: admin: grants admin access to everything admin:accounts: grants admin access to accounts read: grants read access to everything read:accounts: grants read access to accounts read:blocks: grant read access to blocks read:custom_emojis: grant read access to custom_emojis read:favourites: grant read access to favourites read:follows: grant read access to follows read:media: grant read access to media read:notifications: grants read access to notifications read:search: grant read access to searches read:statuses: grants read access to statuses read:streaming: grants read access to streaming api read:user: grants read access to user-level info write: grants write access to everything write:accounts: grants write access to accounts write:blocks: grants write access to blocks write:follows: grants write access to follows write:media: grants write access to media write:statuses: grants write access to statuses write:user: grants write access to user-level info tokenUrl: https://example.org/oauth/token type: oauth2 swagger: "2.0" validate-0.24.0/fixtures/bugs/2866/000077500000000000000000000000001457312750000166105ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/2866/2866.yaml000066400000000000000000007677231457312750000201270ustar00rootroot00000000000000swagger: '2.0' info: version: '0.0.1' title: Planting Service description: Planting Service is the reference for all planting activities. contact: {} host: www.example.com basePath: / securityDefinitions: {} schemes: - https consumes: - application/json produces: - application/json paths: /healthz: get: description: Service health check summary: Service health check tags: - core operationId: Servicehealthcheck deprecated: false produces: - application/json parameters: [] responses: default: description: '' headers: {} /propertiez: get: description: Build/Runtime properties summary: Build/Runtime properties tags: - core operationId: Build/Runtimeproperties deprecated: false produces: - application/json parameters: [] responses: default: description: '' headers: {} /hystrixz: get: description: Hystrix event stream summary: Hystrix event stream tags: - core operationId: Hystrixeventstream deprecated: false produces: - application/json parameters: [] responses: default: description: '' headers: {} /prometheuz: get: description: Prometheus metrics summary: Prometheus metrics tags: - core operationId: Prometheusmetrics deprecated: false produces: - application/json parameters: [] responses: default: description: '' headers: {} /legacy/nitro/api/data/v1/planting_activities/{activity-id}: delete: description: 'GONE: Nitro Planting Activities API V1' summary: 'GONE: Delete a planting activity' tags: - legacy nitro operationId: GONE:Deleteaplantingactivity deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-user-email in: header required: true type: string description: email - name: user in: query required: false type: integer format: int64 description: '' - name: field_groups in: query required: false type: string description: '' - name: activity-id in: path required: true type: integer format: int64 description: '' responses: default: description: '' headers: {} get: description: 'GONE: Nitro Planting Activities API V1' summary: 'GONE: Get a planting activity' tags: - legacy nitro operationId: GONE:Getaplantingactivity deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-user-email in: header required: true type: string description: email - name: activity-id in: path required: true type: integer format: int64 description: '' - name: user in: query required: false type: integer format: int64 description: '' - name: field_groups in: query required: false type: string description: '' responses: default: description: '' headers: {} post: description: 'GONE: Nitro Planting Activities API V1' summary: 'GONE: Update a planting activity' tags: - legacy nitro operationId: GONE:Updateaplantingactivity deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-user-email in: header required: true type: string description: email - name: activity-id in: path required: true type: integer format: int64 description: '' - name: user in: query required: false type: integer format: int64 description: '' - name: field_groups in: query required: false type: string description: '' responses: default: description: '' headers: {} put: description: 'GONE: Nitro Planting Activities API V1' summary: 'GONE: Update a planting activity1' tags: - legacy nitro operationId: GONE:Updateaplantingactivity1 deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-user-email in: header required: true type: string description: email - name: activity-id in: path required: true type: integer format: int64 description: '' - name: user in: query required: false type: integer format: int64 description: '' - name: field_groups in: query required: false type: string description: '' responses: default: description: '' headers: {} /legacy/nitro/api/data/v1/planting_activities: get: description: 'GONE: Nitro Planting Activities API V1' summary: 'GONE: Get planting activites' tags: - legacy nitro operationId: GONE:Getplantingactivites deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-user-email in: header required: true type: string description: email - name: user in: query required: false type: integer format: int64 description: '' - name: field_groups in: query required: false type: string description: '' responses: default: description: '' headers: {} post: description: 'GONE: Nitro Planting Activities API V1' summary: 'GONE: Create planting activities' tags: - legacy nitro operationId: GONE:Createplantingactivities deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-user-email in: header required: true type: string description: email - name: user in: query required: false type: integer format: int64 description: '' - name: field_groups in: query required: false type: string description: '' responses: default: description: '' headers: {} put: description: 'GONE: Nitro Planting Activities API V1' summary: 'GONE: Update multiple planting activities' tags: - legacy nitro operationId: GONE:Updatemultipleplantingactivities deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-user-email in: header required: true type: string description: email - name: user in: query required: false type: integer format: int64 description: '' - name: field_groups in: query required: false type: string description: '' responses: default: description: '' headers: {} /legacy/umber/v1/programs.json: get: description: Umber API V1 summary: (Deprecated) Get all planting programs associated with a user tags: - legacy umber operationId: (Deprecated)Getallplantingprogramsassociatedwithauser deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: product-year in: query required: false type: integer format: int64 description: '' responses: '200': description: '' schema: $ref: '#/definitions/UmberPlantingProgramsResponse' headers: {} '500': description: Server Error headers: {} post: description: Umber API V1 summary: 'GONE: Create a new planting program' tags: - legacy umber operationId: GONE:Createanewplantingprogram deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' responses: '201': description: Created headers: {} '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /legacy/umber/v1/programs/{id}.json: delete: description: Umber API V1 summary: 'GONE: Delete a program' tags: - legacy umber operationId: GONE:Deleteaprogram deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: id in: path required: true type: integer format: int64 description: program id - name: last-updated-at in: query required: false type: string description: '' responses: '404': description: Not Found headers: {} '500': description: Server Error headers: {} get: description: Umber API V1 summary: (Deprecated) Get a program tags: - legacy umber operationId: (Deprecated)Getaprogram deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: id in: path required: true type: integer format: int64 description: program id responses: '200': description: '' schema: $ref: '#/definitions/UmberPlantingProgramResponse' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} patch: description: Umber API V1 summary: 'GONE: Update a planting program' tags: - legacy umber operationId: GONE:Updateaplantingprogram deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: id in: path required: true type: integer format: int64 description: program id - name: last-updated-at in: query required: false type: string description: '' responses: '400': description: Bad Request headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} put: description: Umber API V1 summary: 'GONE: Update a planting program1' tags: - legacy umber operationId: GONE:Updateaplantingprogram1 deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: id in: path required: true type: integer format: int64 description: program id - name: last-updated-at in: query required: false type: string description: '' responses: '400': description: Bad Request headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} /legacy/umber/v1/programs/query.json: post: description: Umber API V1 summary: (Deprecated) Get programs by id tags: - legacy umber operationId: (Deprecated)Getprogramsbyid deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: ProgramQuery in: body required: true description: '' schema: $ref: '#/definitions/ProgramQuery' responses: '200': description: '' schema: $ref: '#/definitions/UmberPlantingProgramsResponse' headers: {} '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /legacy/umber/v1/profiles/apply-program.json: post: description: Umber API V1 summary: 'GONE: Apply a program to a collection of field profiles' tags: - legacy umber operationId: GONE:Applyaprogramtoacollectionoffieldprofiles deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' responses: '400': description: Bad Request headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} /legacy/umber/v1/profiles/remove-program.json: post: description: Umber API V1 summary: 'GONE: Remove a program from a collection of profiles' tags: - legacy umber operationId: GONE:Removeaprogramfromacollectionofprofiles deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' responses: '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /legacy/umber/v1/profiles/programs/{program-id}.json: get: description: Umber API V1 summary: (Deprecated) Retrieve all profiles for a program tags: - legacy umber operationId: (Deprecated)Retrieveallprofilesforaprogram deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: program-id in: path required: true type: integer format: int64 description: program id responses: '200': description: '' schema: $ref: '#/definitions/UmberProgramFieldsResponse' headers: {} '404': description: NOT Found headers: {} '500': description: Server Error headers: {} /legacy/umber/v1/profiles/fields/query.json: post: description: Umber API V1 summary: (Deprecated) Query for profile information by field IDs tags: - legacy umber operationId: (Deprecated)QueryforprofileinformationbyfieldIDs deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: UmberFieldProfileQuery in: body required: true description: '' schema: $ref: '#/definitions/UmberFieldProfileQuery' - name: full-profile in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/UmberFieldPlantingProfiles' headers: {} '500': description: Server Error headers: {} /legacy/umber/v1/profiles/fields/{field_id}/product-years/{product_year}.json: delete: description: Umber API V1 summary: 'GONE: Delete a field profile' tags: - legacy umber operationId: GONE:Deleteafieldprofile deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: field_id in: path required: true type: string description: '' - name: product_year in: path required: true type: integer format: int64 description: '' - name: last-updated-at in: query required: false type: string description: '' responses: '404': description: Not Found headers: {} '500': description: Server Error headers: {} get: description: Umber API V1 summary: (Deprecated) Get a field profile tags: - legacy umber operationId: (Deprecated)Getafieldprofile deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: field_id in: path required: true type: string description: '' - name: product_year in: path required: true type: integer format: int64 description: '' - name: full-profile in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/UmberFieldPlantingProfile' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} put: description: Umber API V1 summary: 'GONE: Create or update a field profile' tags: - legacy umber operationId: GONE:Createorupdateafieldprofile deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: field_id in: path required: true type: string description: '' - name: product_year in: path required: true type: integer format: int64 description: '' - name: last-updated-at in: query required: false type: string description: '' responses: '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /legacy/umber/v1/profiles/fields/{field_id}/fmz/{fmz_id}/zones/query.json: post: description: Umber API V1 summary: (Deprecated) Query for profile information by zone IDs tags: - legacy umber operationId: (Deprecated)QueryforprofileinformationbyzoneIDs deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: field_id in: path required: true type: string description: '' - name: fmz_id in: path required: true type: string format: uuid description: '' - name: full-profile in: query required: false type: boolean description: '' - name: UmberZoneProfilesQuery in: body required: true description: '' schema: $ref: '#/definitions/UmberZoneProfilesQuery' responses: '200': description: '' schema: $ref: '#/definitions/UmberZoneProfileResponse' headers: {} '500': description: Sever Error headers: {} /legacy/umber/v1/profiles/fields/{field_id}/fmz/{fmz_id}/zones/{zone_id}/product-years/{product_year}.json: delete: description: Umber API V1 summary: 'GONE: Delete a zone profile' tags: - legacy umber operationId: GONE:Deleteazoneprofile deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: field_id in: path required: true type: string description: '' - name: fmz_id in: path required: true type: string format: uuid description: '' - name: zone_id in: path required: true type: string description: '' - name: product_year in: path required: true type: integer format: int64 description: '' - name: last-updated-at in: query required: false type: string description: '' responses: '404': description: Not Found headers: {} '500': description: Server Error headers: {} get: description: Umber API V1 summary: (Deprecated) Get a zone profile tags: - legacy umber operationId: (Deprecated)Getazoneprofile deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: field_id in: path required: true type: string description: '' - name: fmz_id in: path required: true type: string format: uuid description: '' - name: zone_id in: path required: true type: string description: '' - name: product_year in: path required: true type: integer format: int64 description: '' - name: full-profile in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/UmberZoneProfile' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} put: description: Umber API V1 summary: 'GONE: Create or update a zone profile' tags: - legacy umber operationId: GONE:Createorupdateazoneprofile deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: field_id in: path required: true type: string description: '' - name: fmz_id in: path required: true type: string format: uuid description: '' - name: zone_id in: path required: true type: string description: '' - name: product_year in: path required: true type: integer format: int64 description: '' - name: last-updated-at in: query required: false type: string description: '' responses: '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /legacy/umber/v1/profiles/fields/{field_id}/fmz/{fmz_id}/zones/edit-planting.json: post: description: Umber API V1 summary: (Deprecated) Update planting information for a zone in a field tags: - legacy umber operationId: (Deprecated)Updateplantinginformationforazoneinafield deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: '' - name: x-http-caller-id in: header required: false type: string description: '' - name: field_id in: path required: true type: string description: '' - name: fmz_id in: path required: true type: string format: uuid description: '' - name: UmberPlantingEdits in: body required: true description: '' schema: $ref: '#/definitions/UmberPlantingEdits' responses: '404': description: Not Found headers: {} '500': description: Server Error headers: {} /v1/validations/product-years/{product-year}: get: description: '**DEPRECATED - Please use GET /v3/validations**' summary: (Deprecated) Get planting-specific validations for a given product year tags: - v1 operationId: (Deprecated)Getplanting-specificvalidationsforagivenproductyear deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: if-none-match in: header required: false type: string description: Etag identifier - name: product-year in: path required: true type: integer format: int64 description: '' responses: '304': description: Not Modified headers: {} '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /v1/best/fields/{field-id}: get: description: '**DEPRECATED - Please use GET /v3/fields**' summary: (Deprecated) Best-available planting estimate for a field tags: - v1 operationId: (Deprecated)Best-availableplantingestimateforafield deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: field-id in: path required: true type: string description: '' - name: product-year in: query required: true type: integer format: int64 description: '' - name: event-type in: query required: false enum: - planned - recorded - all - actual type: string - name: include-plantings in: query required: false type: boolean description: If false, exclude "plantings" to save bandwidth responses: '200': description: '' schema: $ref: '#/definitions/BestResponse' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} /v1/best/fields/{field-id}/fmz/{fmz-id}: get: description: '**DEPRECATED - Please use GET /v3/fields/fmz/{fmz-id}**' summary: (Deprecated) Best-available planting estimate for a field's FMZ zones tags: - v1 operationId: (Deprecated)Best-availableplantingestimateforafield'sFMZzones deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: field-id in: path required: true type: string description: '' - name: fmz-id in: path required: true type: string format: uuid description: '' - name: product-year in: query required: true type: integer format: int64 description: '' - name: event-type in: query required: false enum: - planned - recorded - all - actual type: string - name: include-plantings in: query required: false type: boolean description: If false, exclude "plantings" to save bandwidth responses: '200': description: '' schema: $ref: '#/definitions/BestFmzResponse' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} /v1/best/fields/query: post: description: '**DEPRECATED - Please use POST /v3/fields**' summary: (Deprecated) Best-available planting estimate for a field tags: - v1 operationId: Post(Deprecated)Best-availableplantingestimateforafield deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: FieldsQuery in: body required: true description: '' schema: $ref: '#/definitions/FieldsQuery' - name: product-year in: query required: true type: integer format: int64 description: '' - name: event-type in: query required: false enum: - planned - recorded - all - actual type: string - name: include-plantings in: query required: false type: boolean description: If false, exclude "plantings" to save bandwidth responses: '200': description: '' schema: $ref: '#/definitions/BestQueryResponse' headers: {} '500': description: Server Error headers: {} /v1/best/fields/fmz/query: post: description: '**DEPRECATED - Please use POST /v3/fields/fmz/query**' summary: (Deprecated) Best-available planting estimate for a field's FMZ zones tags: - v1 operationId: Post(Deprecated)Best-availableplantingestimateforafield'sFMZzones deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: FieldsFmzsQuery in: body required: true description: '' schema: $ref: '#/definitions/FieldsFmzsQuery' - name: product-year in: query required: true type: integer format: int64 description: '' - name: event-type in: query required: false enum: - planned - recorded - all - actual type: string - name: include-plantings in: query required: false type: boolean description: If false, exclude "plantings" to save bandwidth responses: '200': description: '' schema: $ref: '#/definitions/BestFmzQueryResponse' headers: {} '500': description: Server Error headers: {} /v1/planned/programs: get: description: '**DEPRECATED - Please use GET /v3/programs**' summary: (Deprecated) Get all planned planting programs tags: - v1 operationId: (Deprecated)Getallplannedplantingprograms deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: product-year in: query required: false type: integer format: int64 description: '' - name: include-deleted in: query required: false type: boolean description: '' - name: include-invisible in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/ProgramsQueryResponse' headers: {} '500': description: Server Error headers: {} post: description: (Deprecated) Create a planned planting event summary: (Deprecated) Create a planned planting event tags: - v1 operationId: (Deprecated)Createaplannedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: NewProgram in: body required: true description: '' schema: $ref: '#/definitions/NewProgram' responses: '201': description: '' schema: $ref: '#/definitions/ProgramResponse' headers: {} '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /v1/planned/programs/query: post: description: '**DEPRECATED - Please use POST /v3/programs/query**' summary: (Deprecated) Get many planned planting programs by ID tags: - v1 operationId: (Deprecated)GetmanyplannedplantingprogramsbyID deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: include-deleted in: query required: false type: boolean description: '' - name: ProgramsQueryRequest in: body required: true description: '' schema: $ref: '#/definitions/ProgramsQueryRequest' responses: '200': description: '' schema: $ref: '#/definitions/ProgramsQueryResponse' headers: {} '500': description: Server Error headers: {} /v1/planned/programs/{id}: get: description: '**DEPRECATED - Please use GET /v3/programs/{id}**' summary: (Deprecated) Get an individual planned planting program tags: - v1 operationId: (Deprecated)Getanindividualplannedplantingprogram deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: include-deleted in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/ProgramResponse' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} delete: description: '**DEPRECATED - Please use DELETE /v3/programs**' summary: (Deprecated) Remove a planned planting event tags: - v1 operationId: (Deprecated)Removeaplannedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' responses: '200': description: '' schema: $ref: '#/definitions/DeletedResponse' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} patch: description: (Deprecated) Patch a planned planting event summary: (Deprecated) Patch a planned planting event tags: - v1 operationId: (Deprecated)Patchaplannedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: ProgramPatchInput in: body required: true description: '' schema: $ref: '#/definitions/ProgramPatchInput' responses: '200': description: '' schema: $ref: '#/definitions/ProgramResponse' headers: {} '400': description: Bad Request headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} put: description: (Deprecated) Update a planned planting event summary: (Deprecated) Update a planned planting event tags: - v1 operationId: (Deprecated)Updateaplannedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: ProgramInput in: body required: true description: '' schema: $ref: '#/definitions/ProgramInput' responses: '200': description: '' schema: $ref: '#/definitions/ProgramResponse' headers: {} '201': description: '' schema: $ref: '#/definitions/ProgramResponse' headers: {} '400': description: Bad Request headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} /v1/planned/programs/{id}/fields: get: description: (Deprecated) Get list of field associatd with a program summary: (Deprecated) Get list of field associatd with a program tags: - v1 operationId: (Deprecated)Getlistoffieldassociatdwithaprogram deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' responses: '200': description: '' schema: $ref: '#/definitions/ProgramFieldsResponse' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} /v1/planned/fields/query: post: description: (Deprecated) Get planned planting events for many fields summary: (Deprecated) Get planned planting events for many fields tags: - v1 operationId: (Deprecated)Getplannedplantingeventsformanyfields deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: product-year in: query required: false type: integer format: int64 description: '' - name: include-deleted in: query required: false type: boolean description: '' - name: FieldsQuery in: body required: true description: '' schema: $ref: '#/definitions/FieldsQuery' responses: '200': description: '' schema: $ref: '#/definitions/FieldPlanQueryResponse' headers: {} '500': description: Server Error headers: {} /v1/planned/fields/{field-id}: get: description: (Deprecated) Get planned planting events for one field summary: (Deprecated) Get planned planting events for one field tags: - v1 operationId: (Deprecated)Getplannedplantingeventsforonefield deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: field-id in: path required: true type: string description: '' - name: product-year in: query required: false type: integer format: int64 description: '' - name: include-deleted in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/FieldPlan' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} /v1/planned/apply-program: post: description: (Deprecated) Apply a program to one or more fields summary: (Deprecated) Apply a program to one or more fields tags: - v1 operationId: (Deprecated)Applyaprogramtooneormorefields deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: product-year in: query required: true type: integer format: int64 description: '' - name: ApplyProgramRequest in: body required: true description: '' schema: $ref: '#/definitions/ApplyProgramRequest' responses: '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /v1/planned/remove-program: post: description: (Deprecated) Remove planting program from one or more fields summary: (Deprecated) Remove planting program from one or more fields tags: - v1 operationId: (Deprecated)Removeplantingprogramfromoneormorefields deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: product-year in: query required: true type: integer format: int64 description: '' - name: RemoveProgramRequest in: body required: true description: '' schema: $ref: '#/definitions/RemoveProgramRequest' responses: '200': description: '' schema: $ref: '#/definitions/RemoveProgramResponse' headers: {} '500': description: Server Error headers: {} /v1/planned/apply-prescription: post: description: '(Deprecated) GONE: Apply a prescription to a field' summary: '(Deprecated) GONE: Apply a prescription to a field' tags: - v1 operationId: (Deprecated)GONE:Applyaprescriptiontoafield deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: product-year in: query required: true type: integer format: int64 description: '' responses: '500': description: Server Error headers: {} /v1/planned/prescriptions/fields/query: post: description: '(Deprecated) GONE: Get all planned planting prescriptions for many fields' summary: '(Deprecated) GONE: Get all planned planting prescriptions for many fields' tags: - v1 operationId: (Deprecated)GONE:Getallplannedplantingprescriptionsformanyfields deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: product-year in: query required: false type: integer format: int64 description: '' - name: include-deleted in: query required: false type: boolean description: '' responses: '500': description: Server Error headers: {} /v1/planned/prescriptions/fields/{field-id}: get: description: '(Deprecated) GONE: Get all planned planting prescriptions for a field' summary: '(Deprecated) GONE: Get all planned planting prescriptions for a field' tags: - v1 operationId: (Deprecated)GONE:Getallplannedplantingprescriptionsforafield deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: field-id in: path required: true type: string description: '' - name: product-year in: query required: false type: integer format: int64 description: '' - name: include-deleted in: query required: false type: boolean description: '' responses: '500': description: Server Error headers: {} /v1/planned/prescriptions/query: post: description: '(Deprecated) GONE: Get many planned planting prescriptions by ID' summary: '(Deprecated) GONE: Get many planned planting prescriptions by ID' tags: - v1 operationId: (Deprecated)GONE:GetmanyplannedplantingprescriptionsbyID deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: include-deleted in: query required: false type: boolean description: '' responses: '500': description: Server Error headers: {} /v1/planned/prescriptions/{id}: get: description: '(Deprecated) GONE: Get an individual planned planting prescription' summary: '(Deprecated) GONE: Get an individual planned planting prescription' tags: - v1 operationId: (Deprecated)GONE:Getanindividualplannedplantingprescription deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: include-deleted in: query required: false type: boolean description: '' responses: '500': description: Server Error headers: {} delete: description: '(Deprecated) GONE: Remove a planned planting event' summary: '(Deprecated) GONE: Remove a planned planting event' tags: - v1 operationId: (Deprecated)GONE:Removeaplannedplantingevent deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' responses: '500': description: Server Error headers: {} put: description: '(Deprecated) GONE: Update or create a planned planting event' summary: '(Deprecated) GONE: Update or create a planned planting event' tags: - v1 operationId: (Deprecated)GONE:Updateorcreateaplannedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' responses: '201': description: '' schema: $ref: '#/definitions/PrescriptionResponse' headers: {} '500': description: Server Error headers: {} patch: description: '(Deprecated) GONE: Patch a planned planting event' summary: '(Deprecated) GONE: Patch a planned planting event' tags: - v1 operationId: (Deprecated)GONE:Patchaplannedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' responses: '200': description: '' schema: $ref: '#/definitions/PrescriptionResponse' headers: {} '500': description: Server Error headers: {} /v1/planned/prescriptions: post: description: '(Deprecated) GONE: Create a planting prescription' summary: '(Deprecated) GONE: Create a planting prescription' tags: - v1 operationId: (Deprecated)GONE:Createaplantingprescription deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service responses: '201': description: '' schema: $ref: '#/definitions/PrescriptionResponse' headers: {} '500': description: Server Error headers: {} /v1/planned/fields/{field-id}/programs: patch: description: (Deprecated) Patch a planting program for a field summary: (Deprecated) Patch a planting program for a field tags: - v1 operationId: (Deprecated)Patchaplantingprogramforafield deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: field-id in: path required: true type: string description: '' - name: NewProgramPatch in: body required: true description: '' schema: $ref: '#/definitions/NewProgramPatch' responses: '200': description: '' schema: $ref: '#/definitions/FieldPlan' headers: {} '400': description: Bad Request headers: {} '500': description: Server Error headers: {} post: description: (Deprecated) Set a planting program for a field summary: (Deprecated) Set a planting program for a field tags: - v1 operationId: (Deprecated)Setaplantingprogramforafield deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: field-id in: path required: true type: string description: '' - name: NewProgram in: body required: true description: '' schema: $ref: '#/definitions/NewProgram' responses: '200': description: '' schema: $ref: '#/definitions/FieldPlan' headers: {} '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /v1/planned/fields/{field-id}/prescriptions: patch: description: '(Deprecated) GONE: Patch a prescription for a field' summary: '(Deprecated) GONE: Patch a prescription for a field' tags: - v1 operationId: (Deprecated)GONE:Patchaprescriptionforafield deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: field-id in: path required: true type: string description: '' responses: '400': description: Bad Request headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} post: description: '(Deprecated) GONE: Set a prescription for a field' summary: '(Deprecated) GONE: Set a prescription for a field' tags: - v1 operationId: (Deprecated)GONE:Setaprescriptionforafield deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: field-id in: path required: true type: string description: '' responses: '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /v1/actual/events/query: post: description: '**DEPRECATED - Please use POST /v3**' summary: (Deprecated) Get many machine-observed actual planting events by ID tags: - v1 operationId: (Deprecated)Getmanymachine-observedactualplantingeventsbyID deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: include-deleted in: query required: false type: boolean description: '' - name: include-source in: query required: false type: boolean description: '' - name: ActualEventQueryRequest in: body required: true description: '' schema: $ref: '#/definitions/ActualEventQueryRequest' responses: '200': description: '' schema: $ref: '#/definitions/ActualEventQueryResponse' headers: {} '500': description: Server Error headers: {} /v1/actual/events/{id}: get: description: '**DEPRECATED - Please use GET /v3**' summary: (Deprecated) Get an individual machine-observed actual planting event tags: - v1 operationId: (Deprecated)Getanindividualmachine-observedactualplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: include-deleted in: query required: false type: boolean description: '' - name: include-source in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/ActualEventResponse' headers: {} '500': description: Server Error headers: {} delete: description: '**DEPRECATED - Please use DELETE /v3**' summary: (Deprecated) Remove a machine-observed actual planting event tags: - v1 operationId: (Deprecated)Removeamachine-observedactualplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' responses: '200': description: '' schema: $ref: '#/definitions/DeletedResponse' headers: {} '500': description: Server Error headers: {} patch: description: '**DEPRECATED - Please use PATCH /v3**' summary: (Deprecated) Patch a machine-observed actual planting event tags: - v1 operationId: (Deprecated)Patchamachine-observedactualplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: ActualEventPatchInput in: body required: true description: '' schema: $ref: '#/definitions/ActualEventPatchInput' responses: '200': description: '' schema: $ref: '#/definitions/ActualEventResponse' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} put: description: '**DEPRECATED - Please use PUT /v3**' summary: (Deprecated) Update a machine-observed actual planting event tags: - v1 operationId: (Deprecated)Updateamachine-observedactualplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: ActualEventInput in: body required: true description: '' schema: $ref: '#/definitions/ActualEventInput' responses: '200': description: '' schema: $ref: '#/definitions/ActualEventResponse' headers: {} '201': description: '' schema: $ref: '#/definitions/ActualEventResponse' headers: {} '500': description: Server Error headers: {} /v1/actual/events: post: description: '**DEPRECATED - Please use POST /v3**' summary: (Deprecated) Create a machine-observed actual planting event tags: - v1 operationId: (Deprecated)Createamachine-observedactualplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: NewActualEvent in: body required: true description: '' schema: $ref: '#/definitions/NewActualEvent' responses: '201': description: '' schema: $ref: '#/definitions/ActualEventResponse' headers: {} '500': description: Server Error headers: {} /v1/actual/fields/query: post: description: '**DEPRECATED - Please use POST /v3**' summary: (Deprecated) Get machine-observed actual planting events for many fields tags: - v1 operationId: (Deprecated)Getmachine-observedactualplantingeventsformanyfields deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: product-year in: query required: false type: integer format: int64 description: '' - name: include-deleted in: query required: false type: boolean description: '' - name: include-source in: query required: false type: boolean description: '' - name: FieldsQuery in: body required: true description: '' schema: $ref: '#/definitions/FieldsQuery' responses: '200': description: '' schema: $ref: '#/definitions/ActualEventFieldsQueryResponse' headers: {} '500': description: Server Error headers: {} /v1/actual/fields/{field-id}: get: description: '**DEPRECATED - Please use GET /v3**' summary: (Deprecated) Get machine-observed actual planting events for one field tags: - v1 operationId: (Deprecated)Getmachine-observedactualplantingeventsforonefield deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: field-id in: path required: true type: string description: '' - name: product-year in: query required: false type: integer format: int64 description: '' - name: include-deleted in: query required: false type: boolean description: '' - name: include-source in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/ActualEventFieldResponse' headers: {} '500': description: Server Error headers: {} /v1/recorded/events/query: post: description: (Deprecated) Get many human-provided recorded planting events by ID summary: (Deprecated) Get many human-provided recorded planting events by ID tags: - v1 operationId: (Deprecated)Getmanyhuman-providedrecordedplantingeventsbyID deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return events updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: RecordedEventQueryRequest in: body required: true description: '' schema: $ref: '#/definitions/RecordedEventQueryRequest' - name: include-deleted in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/RecordedEventQueryResponse' headers: {} '500': description: Server Error headers: {} /v1/recorded/events/{id}: get: description: (Deprecated) Get an individual human-provided recorded planting event summary: (Deprecated) Get an individual human-provided recorded planting event tags: - v1 operationId: (Deprecated)Getanindividualhuman-providedrecordedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: include-deleted in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/RecordedEventResponse' headers: {} '500': description: Server Error headers: {} delete: description: (Deprecated) Remove a human-provided recorded planting event summary: (Deprecated) Remove a human-provided recorded planting event tags: - v1 operationId: (Deprecated)Removeahuman-providedrecordedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' responses: '200': description: '' schema: $ref: '#/definitions/DeletedResponse' headers: {} '500': description: Server Error headers: {} patch: description: (Deprecated) PATCH a human-provided recorded planting event summary: (Deprecated) PATCH a human-provided recorded planting event tags: - v1 operationId: (Deprecated)PATCHahuman-providedrecordedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: RecordedEventPatchInput in: body required: true description: '' schema: $ref: '#/definitions/RecordedEventPatchInput' responses: '200': description: '' schema: $ref: '#/definitions/RecordedEventResponse' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} put: description: (Deprecated) Update a human-provided recorded planting event summary: (Deprecated) Update a human-provided recorded planting event tags: - v1 operationId: (Deprecated)Updateahuman-providedrecordedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: RecordedEventInput in: body required: true description: '' schema: $ref: '#/definitions/RecordedEventInput' responses: '200': description: '' schema: $ref: '#/definitions/RecordedEventResponse' headers: {} '201': description: '' schema: $ref: '#/definitions/RecordedEventResponse' headers: {} '500': description: Server Error headers: {} /v1/recorded/events: post: description: (Deprecated) Create a human-provided recorded planting event summary: (Deprecated) Create a human-provided recorded planting event tags: - v1 operationId: (Deprecated)Createahuman-providedrecordedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: NewRecordedEvent in: body required: true description: '' schema: $ref: '#/definitions/NewRecordedEvent' responses: '201': description: '' schema: $ref: '#/definitions/RecordedEventResponse' headers: {} '500': description: Server Error headers: {} /v1/recorded/fields/query: post: description: (Deprecated) Get human-provided recorded planting events for many fields summary: (Deprecated) Get human-provided recorded planting events for many fields tags: - v1 operationId: (Deprecated)Gethuman-providedrecordedplantingeventsformanyfields deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return events updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: product-year in: query required: false type: integer format: int64 description: '' - name: include-deleted in: query required: false type: boolean description: '' - name: FieldsQuery in: body required: true description: '' schema: $ref: '#/definitions/FieldsQuery' responses: '200': description: '' schema: $ref: '#/definitions/RecordedEventFieldsQueryResponse' headers: {} '500': description: Server Error headers: {} /v1/recorded/fields/{field-id}: get: description: (Deprecated) Get human-provided recorded planting events for one field summary: (Deprecated) Get human-provided recorded planting events for one field tags: - v1 operationId: (Deprecated)Gethuman-providedrecordedplantingeventsforonefield deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return events updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: field-id in: path required: true type: string description: '' - name: product-year in: query required: false type: integer format: int64 description: '' - name: include-deleted in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/RecordedEventFieldResponse' headers: {} '500': description: Server Error headers: {} /v1/all-events/fields/query: post: description: '**DEPRECATED - Please use POST /v3/fields/query**' summary: (Deprecated) Get all planting events of all types for many fields tags: - v1 operationId: (Deprecated)Getallplantingeventsofalltypesformanyfields deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: user-agent in: header required: false type: string description: '' - name: product-year in: query required: false type: integer format: int64 description: '' - name: include-deleted in: query required: false type: boolean description: '' - name: FieldsQuery in: body required: true description: '' schema: $ref: '#/definitions/FieldsQuery' responses: '200': description: '' schema: $ref: '#/definitions/AllEventsFieldsQueryResponse' headers: {} '500': description: Server Error headers: {} /v1/all-events/fields/{field-id}: get: description: '**DEPRECATED - Please use GET /v3/fields**' summary: (Deprecated) Get all planting events of all types for one field tags: - v1 operationId: (Deprecated)Getallplantingeventsofalltypesforonefield deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return events updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: field-id in: path required: true type: string description: '' - name: product-year in: query required: false type: integer format: int64 description: '' - name: include-deleted in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/AllEventsFieldResponse' headers: {} '500': description: Server Error headers: {} /v2/validations/product-years/{product-year}: get: description: (Deprecated) Get planting-specific validations for a given product year summary: (Deprecated) Get planting-specific validations for a given product year tags: - v2-validations - v2 operationId: Get(Deprecated)Getplanting-specificvalidationsforagivenproductyear deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: if-none-match in: header required: false type: string description: Etag identifier - name: product-year in: path required: true type: integer format: int64 description: '' responses: '304': description: Not Modified headers: {} '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /v3/validations/seasons/{season}: get: description: (Deprecated) Get planting-specific validations for a given product year summary: (Deprecated) Get planting-specific validations for a given product year tags: - v3-validations - v3 operationId: Get(Deprecated)Getplanting-specificvalidationsforagivenproductyear1 deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: if-none-match in: header required: false type: string description: Etag identifier - name: season in: path required: true type: string description: '' responses: '304': description: Not Modified headers: {} '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /v3/best/fields/{field-id}: get: description: '**DEPRECATED - There will be no further development work on /v3/best/fields/{field-id}**' summary: (Deprecated) Best-available planting estimate for a field tags: - v3 - v3-best operationId: Get(Deprecated)Best-availableplantingestimateforafield deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: field-id in: path required: true type: string description: '' - name: season in: query required: false type: string description: '' - name: event-type in: query required: false enum: - planned - recorded - all - actual type: string - name: include-plantings in: query required: false type: boolean description: If false, exclude "plantings" to save bandwidth responses: '200': description: '' schema: $ref: '#/definitions/BestResponse' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} /v3/best/fields/{field-id}/fmz/{fmz-id}: get: description: '**DEPRECATED - There will be no further work on /v3/best/fields/{fmz-id}**' summary: (Deprecated) Best-available planting estimate for a field's FMZ zones tags: - v3 - v3-best operationId: Get(Deprecated)Best-availableplantingestimateforafield'sFMZzones deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: field-id in: path required: true type: string description: '' - name: fmz-id in: path required: true type: string format: uuid description: '' - name: season in: query required: false type: string description: '' - name: event-type in: query required: false enum: - planned - recorded - all - actual type: string - name: include-plantings in: query required: false type: boolean description: If false, exclude "plantings" to save bandwidth responses: '200': description: '' schema: $ref: '#/definitions/BestFmzResponse' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} /v3/best/fields/query: post: description: '**DEPRECATED - There will be no further work on /fields/query**' summary: (Deprecated) Best-available planting estimate for a field tags: - v3 - v3-best operationId: Post(Deprecated)Best-availableplantingestimateforafield1 deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: FieldsQuery in: body required: true description: '' schema: $ref: '#/definitions/FieldsQuery' - name: season in: query required: false type: string description: '' - name: start-time in: query required: false type: string description: Only return events with planting dates after this date - name: end-time in: query required: false type: string description: Only return events with planting dates after this date - name: event-type in: query required: false enum: - planned - recorded - all - actual type: string - name: include-plantings in: query required: false type: boolean description: If false, exclude "plantings" to save bandwidth responses: '200': description: '' schema: $ref: '#/definitions/BestQueryResponse' headers: {} '500': description: Server Error headers: {} /v3/best/fields/fmz/query: post: description: '**DEPRECATED - There will be no further work on /fields/fmz/query**' summary: (Deprecated) Best-available planting estimate for a field's FMZ zones tags: - v3 - v3-best operationId: Post(Deprecated)Best-availableplantingestimateforafield'sFMZzones1 deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: FieldsFmzsQuery in: body required: true description: '' schema: $ref: '#/definitions/FieldsFmzsQuery' - name: season in: query required: false type: string description: '' - name: event-type in: query required: false enum: - planned - recorded - all - actual type: string - name: include-plantings in: query required: false type: boolean description: If false, exclude "plantings" to save bandwidth responses: '200': description: '' schema: $ref: '#/definitions/BestFmzQueryResponse' headers: {} '500': description: Server Error headers: {} /v3/recorded/events/query: post: description: (Deprecated) Get many human-provided recorded planting events by ID summary: (Deprecated) Get many human-provided recorded planting events by ID tags: - v3 - v3-recorded operationId: Post(Deprecated)Getmanyhuman-providedrecordedplantingeventsbyID deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return events updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: RecordedEventQueryRequest in: body required: true description: '' schema: $ref: '#/definitions/RecordedEventQueryRequest' - name: include-deleted in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/RecordedEventQueryResponse' headers: {} '500': description: Server Error headers: {} /v3/recorded/events/{id}: get: description: (Deprecated) Get an individual human-provided recorded planting event summary: (Deprecated) Get an individual human-provided recorded planting event tags: - v3 - v3-recorded operationId: Get(Deprecated)Getanindividualhuman-providedrecordedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: include-deleted in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/RecordedEventResponse' headers: {} '500': description: Server Error headers: {} delete: description: (Deprecated) Remove a human-provided recorded planting event summary: (Deprecated) Remove a human-provided recorded planting event tags: - v3 - v3-recorded operationId: Delete(Deprecated)Removeahuman-providedrecordedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' responses: '200': description: '' schema: $ref: '#/definitions/DeletedResponse' headers: {} '500': description: Server Error headers: {} patch: description: (Deprecated) PATCH a human-provided recorded planting event summary: (Deprecated) PATCH a human-provided recorded planting event tags: - v3 - v3-recorded operationId: Patch(Deprecated)PATCHahuman-providedrecordedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: RecordedEventPatchInput in: body required: true description: '' schema: $ref: '#/definitions/RecordedEventPatchInput' responses: '200': description: '' schema: $ref: '#/definitions/RecordedEventResponse' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} put: description: (Deprecated) Update a human-provided recorded planting event summary: (Deprecated) Update a human-provided recorded planting event tags: - v3 - v3-recorded operationId: Put(Deprecated)Updateahuman-providedrecordedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: RecordedEventInput in: body required: true description: '' schema: $ref: '#/definitions/RecordedEventInput' responses: '200': description: '' schema: $ref: '#/definitions/RecordedEventResponse' headers: {} '201': description: '' schema: $ref: '#/definitions/RecordedEventResponse' headers: {} '500': description: Server Error headers: {} /v3/recorded/events: post: description: (Deprecated) Create a human-provided recorded planting event summary: (Deprecated) Create a human-provided recorded planting event tags: - v3 - v3-recorded operationId: Post(Deprecated)Createahuman-providedrecordedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: NewRecordedEvent in: body required: true description: '' schema: $ref: '#/definitions/NewRecordedEvent' responses: '201': description: '' schema: $ref: '#/definitions/RecordedEventResponse' headers: {} '500': description: Server Error headers: {} /v3/recorded/fields/query: post: description: (Deprecated) Get human-provided recorded planting events for many fields summary: (Deprecated) Get human-provided recorded planting events for many fields tags: - v3 - v3-recorded operationId: Post(Deprecated)Gethuman-providedrecordedplantingeventsformanyfields deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return events updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: season in: query required: false type: string description: '' - name: include-deleted in: query required: false type: boolean description: '' - name: FieldsQuery in: body required: true description: '' schema: $ref: '#/definitions/FieldsQuery' responses: '200': description: '' schema: $ref: '#/definitions/RecordedEventFieldsQueryResponse' headers: {} '500': description: Server Error headers: {} /v3/recorded/fields/{field-id}: get: description: (Deprecated) Get human-provided recorded planting events for one field summary: (Deprecated) Get human-provided recorded planting events for one field tags: - v3 - v3-recorded operationId: Get(Deprecated)Gethuman-providedrecordedplantingeventsforonefield deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return events updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: field-id in: path required: true type: string description: '' - name: season in: query required: false type: string description: '' - name: include-deleted in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/RecordedEventFieldResponse' headers: {} '500': description: Server Error headers: {} /v3/all-events/fields/query: post: description: (Deprecated) Get all planting events of all types for many fields summary: (Deprecated) Get all planting events of all types for many fields tags: - v3 - v3-all-events operationId: Post(Deprecated)Getallplantingeventsofalltypesformanyfields deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: user-agent in: header required: false type: string description: '' - name: start-time in: query required: false type: string description: Only return events with planting dates after this date - name: end-time in: query required: false type: string description: Only return events with planting dates after this date - name: season in: query required: false type: string description: season - name: include-deleted in: query required: false type: boolean description: '' - name: FieldsQuery in: body required: true description: '' schema: $ref: '#/definitions/FieldsQuery' responses: '200': description: '' schema: $ref: '#/definitions/AllEventsFieldsQueryResponse' headers: {} '500': description: Server Error headers: {} /v3/all-events/fields/{field-id}: get: description: (Deprecated) Get all planting events of all types for one field summary: (Deprecated) Get all planting events of all types for one field tags: - v3 - v3-all-events operationId: Get(Deprecated)Getallplantingeventsofalltypesforonefield deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return events updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: field-id in: path required: true type: string description: '' - name: start-time in: query required: false type: string description: Only return events with planting dates after this date - name: end-time in: query required: false type: string description: Only return events with planting dates after this date - name: season in: query required: false type: string description: season - name: include-deleted in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/AllEventsFieldResponse' headers: {} '500': description: Server Error headers: {} /v3/migrations/seasons/{command}: get: description: (Deprecated) Kick off season DB migration summary: (Deprecated) Kick off season DB migration tags: - v3 - v3-migrations operationId: (Deprecated)KickoffseasonDBmigration deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: if-none-match in: header required: false type: string description: Etag identifier - name: init-uuid in: header required: false type: string description: UUID required to kick of migration - name: command in: path required: true enum: - user-geo-table - update-recorded - season-table - update-program - geo-table - program-season-table - all - update-actual - update-profile type: string responses: '304': description: Not Modified headers: {} '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /v3/planned/programs: get: description: (Deprecated) Get all planned planting programs summary: (Deprecated) Get all planned planting programs tags: - v3-planned - v3 operationId: Get(Deprecated)Getallplannedplantingprograms deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: season in: query required: false type: string description: '' - name: include-deleted in: query required: false type: boolean description: '' - name: include-invisible in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/ProgramsQueryResponse' headers: {} '500': description: Server Error headers: {} post: description: (Deprecated) Create a planned planting event summary: (Deprecated) Create a planned planting event tags: - v3-planned - v3 operationId: Post(Deprecated)Createaplannedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: NewProgram in: body required: true description: '' schema: $ref: '#/definitions/NewProgram' responses: '201': description: '' schema: $ref: '#/definitions/ProgramResponse' headers: {} '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /v3/planned/programs/query: post: description: (Deprecated) Get many planned planting programs by ID summary: (Deprecated) Get many planned planting programs by ID tags: - v3-planned - v3 operationId: Post(Deprecated)GetmanyplannedplantingprogramsbyID deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: include-deleted in: query required: false type: boolean description: '' - name: ProgramsQueryRequest in: body required: true description: '' schema: $ref: '#/definitions/ProgramsQueryRequest' responses: '200': description: '' schema: $ref: '#/definitions/ProgramsQueryResponse' headers: {} '500': description: Server Error headers: {} /v3/planned/programs/{id}: get: description: (Deprecated) Get an individual planned planting program summary: (Deprecated) Get an individual planned planting program tags: - v3-planned - v3 operationId: Get(Deprecated)Getanindividualplannedplantingprogram deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: include-deleted in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/ProgramResponse' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} delete: description: (Deprecated) Remove a planned planting event summary: (Deprecated) Remove a planned planting event tags: - v3-planned - v3 operationId: Delete(Deprecated)Removeaplannedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' responses: '200': description: '' schema: $ref: '#/definitions/DeletedResponse' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} patch: description: (Deprecated) Patch a planned planting event summary: (Deprecated) Patch a planned planting event tags: - v3-planned - v3 operationId: Patch(Deprecated)Patchaplannedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: ProgramPatchInput in: body required: true description: '' schema: $ref: '#/definitions/ProgramPatchInput' responses: '200': description: '' schema: $ref: '#/definitions/ProgramResponse' headers: {} '400': description: Bad Request headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} put: description: (Deprecated) Update a planned planting event summary: (Deprecated) Update a planned planting event tags: - v3-planned - v3 operationId: Put(Deprecated)Updateaplannedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: ProgramInput in: body required: true description: '' schema: $ref: '#/definitions/ProgramInput' responses: '200': description: '' schema: $ref: '#/definitions/ProgramResponse' headers: {} '201': description: '' schema: $ref: '#/definitions/ProgramResponse' headers: {} '400': description: Bad Request headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} /v3/planned/programs/{id}/fields: get: description: (Deprecated) Get list of field associatd with a program summary: (Deprecated) Get list of field associatd with a program tags: - v3-planned - v3 operationId: Get(Deprecated)Getlistoffieldassociatdwithaprogram deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' responses: '200': description: '' schema: $ref: '#/definitions/ProgramFieldsResponse' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} /v3/planned/fields/query: post: description: (Deprecated) Get planned planting events for many fields summary: (Deprecated) Get planned planting events for many fields tags: - v3-planned - v3 operationId: Post(Deprecated)Getplannedplantingeventsformanyfields deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: season in: query required: false type: string description: '' - name: include-deleted in: query required: false type: boolean description: '' - name: FieldsQuery in: body required: true description: '' schema: $ref: '#/definitions/FieldsQuery' responses: '200': description: '' schema: $ref: '#/definitions/FieldPlanQueryResponse' headers: {} '500': description: Server Error headers: {} /v3/planned/fields/{field-id}: get: description: (Deprecated) Get planned planting events for one field summary: (Deprecated) Get planned planting events for one field tags: - v3-planned - v3 operationId: Get(Deprecated)Getplannedplantingeventsforonefield deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: field-id in: path required: true type: string description: '' - name: season in: query required: false type: string description: '' - name: include-deleted in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/FieldPlan' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} /v3/planned/apply-program: post: description: (Deprecated) Apply a program to one or more fields summary: (Deprecated) Apply a program to one or more fields tags: - v3-planned - v3 operationId: Post(Deprecated)Applyaprogramtooneormorefields deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: season in: query required: true type: string description: '' - name: ApplyProgramRequest in: body required: true description: '' schema: $ref: '#/definitions/ApplyProgramRequest' responses: '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /v3/planned/remove-program: post: description: (Deprecated) Remove planting program from one or more fields summary: (Deprecated) Remove planting program from one or more fields tags: - v3-planned - v3 operationId: Post(Deprecated)Removeplantingprogramfromoneormorefields deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: season in: query required: true type: string description: '' - name: RemoveProgramRequest in: body required: true description: '' schema: $ref: '#/definitions/RemoveProgramRequest' responses: '200': description: '' schema: $ref: '#/definitions/RemoveProgramResponse' headers: {} '500': description: Server Error headers: {} /v3/planned/apply-prescription: post: description: 'GONE: Apply a prescription to a field' summary: 'GONE: Apply a prescription to a field' tags: - v3-planned - v3 operationId: GONE:Applyaprescriptiontoafield deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: product-year in: query required: true type: integer format: int64 description: '' responses: '500': description: Server Error headers: {} /v3/planned/prescriptions/fields/query: post: description: 'GONE: Get all planned planting prescriptions for many fields' summary: 'GONE: Get all planned planting prescriptions for many fields' tags: - v3-planned - v3 operationId: GONE:Getallplannedplantingprescriptionsformanyfields deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: product-year in: query required: false type: integer format: int64 description: '' - name: include-deleted in: query required: false type: boolean description: '' responses: '500': description: Server Error headers: {} /v3/planned/prescriptions/fields/{field-id}: get: description: 'GONE: Get all planned planting prescriptions for a field' summary: 'GONE: Get all planned planting prescriptions for a field' tags: - v3-planned - v3 operationId: GONE:Getallplannedplantingprescriptionsforafield deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: field-id in: path required: true type: string description: '' - name: product-year in: query required: false type: integer format: int64 description: '' - name: include-deleted in: query required: false type: boolean description: '' responses: '500': description: Server Error headers: {} /v3/planned/prescriptions/query: post: description: 'GONE: Get many planned planting prescriptions by ID' summary: 'GONE: Get many planned planting prescriptions by ID' tags: - v3-planned - v3 operationId: GONE:GetmanyplannedplantingprescriptionsbyID deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: include-deleted in: query required: false type: boolean description: '' responses: '500': description: Server Error headers: {} /v3/planned/prescriptions/{id}: get: description: 'GONE: Get an individual planned planting prescription' summary: 'GONE: Get an individual planned planting prescription' tags: - v3-planned - v3 operationId: GONE:Getanindividualplannedplantingprescription deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: include-deleted in: query required: false type: boolean description: '' responses: '500': description: Server Error headers: {} delete: description: 'GONE: Remove a planned planting event' summary: 'GONE: Remove a planned planting event' tags: - v3-planned - v3 operationId: GONE:Removeaplannedplantingevent deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' responses: '500': description: Server Error headers: {} put: description: 'GONE: Update or create a planned planting event' summary: 'GONE: Update or create a planned planting event' tags: - v3-planned - v3 operationId: GONE:Updateorcreateaplannedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' responses: '201': description: '' schema: $ref: '#/definitions/PrescriptionResponse' headers: {} '500': description: Server Error headers: {} patch: description: 'GONE: Patch a planned planting event' summary: 'GONE: Patch a planned planting event' tags: - v3-planned - v3 operationId: GONE:Patchaplannedplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' responses: '200': description: '' schema: $ref: '#/definitions/PrescriptionResponse' headers: {} '500': description: Server Error headers: {} /v3/planned/prescriptions: post: description: 'GONE: Create a planting prescription' summary: 'GONE: Create a planting prescription' tags: - v3-planned - v3 operationId: GONE:Createaplantingprescription deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service responses: '201': description: '' schema: $ref: '#/definitions/PrescriptionResponse' headers: {} '500': description: Server Error headers: {} /v3/planned/fields/{field-id}/programs: patch: description: (Deprecated) Patch a planting program for a field summary: (Deprecated) Patch a planting program for a field tags: - v3-planned - v3 operationId: Patch(Deprecated)Patchaplantingprogramforafield deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: field-id in: path required: true type: string description: '' - name: NewProgramPatch in: body required: true description: '' schema: $ref: '#/definitions/NewProgramPatch' responses: '200': description: '' schema: $ref: '#/definitions/FieldPlan' headers: {} '400': description: Bad Request headers: {} '500': description: Server Error headers: {} post: description: (Deprecated) Set a planting program for a field summary: (Deprecated) Set a planting program for a field tags: - v3-planned - v3 operationId: Post(Deprecated)Setaplantingprogramforafield deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: field-id in: path required: true type: string description: '' - name: NewProgram in: body required: true description: '' schema: $ref: '#/definitions/NewProgram' responses: '200': description: '' schema: $ref: '#/definitions/FieldPlan' headers: {} '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /v3/planned/fields/{field-id}/prescriptions: patch: description: 'GONE: Patch a prescription for a field' summary: 'GONE: Patch a prescription for a field' tags: - v3-planned - v3 operationId: GONE:Patchaprescriptionforafield deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: field-id in: path required: true type: string description: '' responses: '400': description: Bad Request headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} post: description: 'GONE: Set a prescription for a field' summary: 'GONE: Set a prescription for a field' tags: - v3-planned - v3 operationId: GONE:Setaprescriptionforafield deprecated: true produces: - application/json parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: field-id in: path required: true type: string description: '' responses: '400': description: Bad Request headers: {} '500': description: Server Error headers: {} /v3/actual/events/query: post: description: (Deprecated) Get many machine-observed actual planting events by ID summary: (Deprecated) Get many machine-observed actual planting events by ID tags: - v3-actual - v3 operationId: Post(Deprecated)Getmanymachine-observedactualplantingeventsbyID deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: include-deleted in: query required: false type: boolean description: '' - name: include-source in: query required: false type: boolean description: '' - name: ActualEventQueryRequest in: body required: true description: '' schema: $ref: '#/definitions/ActualEventQueryRequest' responses: '200': description: '' schema: $ref: '#/definitions/ActualEventQueryResponse' headers: {} '500': description: Server Error headers: {} /v3/actual/events/{id}: get: description: (Deprecated) Get an individual machine-observed actual planting event summary: (Deprecated) Get an individual machine-observed actual planting event tags: - v3-actual - v3 operationId: Get(Deprecated)Getanindividualmachine-observedactualplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: include-deleted in: query required: false type: boolean description: '' - name: include-source in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/ActualEventResponse' headers: {} '500': description: Server Error headers: {} delete: description: (Deprecated) Remove a machine-observed actual planting event summary: (Deprecated) Remove a machine-observed actual planting event tags: - v3-actual - v3 operationId: Delete(Deprecated)Removeamachine-observedactualplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' responses: '200': description: '' schema: $ref: '#/definitions/DeletedResponse' headers: {} '500': description: Server Error headers: {} patch: description: (Deprecated) Patch a machine-observed actual planting event summary: (Deprecated) Patch a machine-observed actual planting event tags: - v3-actual - v3 operationId: Patch(Deprecated)Patchamachine-observedactualplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: ActualEventPatchInput in: body required: true description: '' schema: $ref: '#/definitions/ActualEventPatchInput' responses: '200': description: '' schema: $ref: '#/definitions/ActualEventResponse' headers: {} '404': description: Not Found headers: {} '500': description: Server Error headers: {} put: description: (Deprecated) Update a machine-observed actual planting event summary: (Deprecated) Update a machine-observed actual planting event tags: - v3-actual - v3 operationId: Put(Deprecated)Updateamachine-observedactualplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: id in: path required: true type: string format: uuid description: '' - name: ActualEventInput in: body required: true description: '' schema: $ref: '#/definitions/ActualEventInput' responses: '200': description: '' schema: $ref: '#/definitions/ActualEventResponse' headers: {} '201': description: '' schema: $ref: '#/definitions/ActualEventResponse' headers: {} '500': description: Server Error headers: {} /v3/actual/events: post: description: (Deprecated) Create a machine-observed actual planting event summary: (Deprecated) Create a machine-observed actual planting event tags: - v3-actual - v3 operationId: Post(Deprecated)Createamachine-observedactualplantingevent deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: NewActualEvent in: body required: true description: '' schema: $ref: '#/definitions/NewActualEvent' responses: '201': description: '' schema: $ref: '#/definitions/ActualEventResponse' headers: {} '500': description: Server Error headers: {} /v3/actual/fields/query: post: description: (Deprecated) Get machine-observed actual planting events for many fields summary: (Deprecated) Get machine-observed actual planting events for many fields tags: - v3-actual - v3 operationId: Post(Deprecated)Getmachine-observedactualplantingeventsformanyfields deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: start-time in: query required: false type: string description: Only return events with planting dates after this date - name: end-time in: query required: false type: string description: Only return events with planting dates after this date - name: include-deleted in: query required: false type: boolean description: '' - name: include-source in: query required: false type: boolean description: '' - name: FieldsQuery in: body required: true description: '' schema: $ref: '#/definitions/FieldsQuery' responses: '200': description: '' schema: $ref: '#/definitions/ActualEventFieldsQueryResponse' headers: {} '500': description: Server Error headers: {} /v3/actual/fields/{field-id}: get: description: (Deprecated) Get machine-observed actual planting events for one field summary: (Deprecated) Get machine-observed actual planting events for one field tags: - v3-actual - v3 operationId: Get(Deprecated)Getmachine-observedactualplantingeventsforonefield deprecated: true produces: - application/json - application/x-yaml - application/edn - application/transit+json - application/transit+msgpack parameters: - name: Authorization in: header required: false type: string description: Base64-encoded JWT in the format "Bearer " - name: x-user-id in: header required: true type: integer format: int64 description: id - name: x-http-caller-id in: header required: true type: string description: caller id - name: x-http-request-id in: header required: false type: string description: request-id - name: x-authenticated-user-id in: header required: false type: integer format: int64 description: user-id verified by auth service - name: If-Modified-Since in: header required: false type: string description: Only return fields updated since this time http://www.freesoft.org/CIE/RFC/1945/58.htm - name: field-id in: path required: true type: string description: '' - name: start-time in: query required: false type: string description: Only return events with planting dates after this date - name: end-time in: query required: false type: string description: Only return events with planting dates after this date - name: include-deleted in: query required: false type: boolean description: '' - name: include-source in: query required: false type: boolean description: '' responses: '200': description: '' schema: $ref: '#/definitions/ActualEventFieldResponse' headers: {} '500': description: Server Error headers: {} definitions: ActualEventFieldResponse: title: ActualEventFieldResponse type: object properties: field-id: type: string field-uuid: type: string format: uuid events: type: array items: $ref: '#/definitions/ActualEventResponse' required: - field-id - field-uuid - events ActualEventFieldsQueryResponse: title: ActualEventFieldsQueryResponse type: object properties: results: type: array items: $ref: '#/definitions/ActualEventFieldResponse' required: - results ActualEventInput: title: ActualEventInput type: object properties: seed-product: $ref: '#/definitions/ValidatedSeedProduct' custom-crop-name: type: string updated-at: type: string treatments: type: array items: $ref: '#/definitions/Treatment' replant: type: boolean source-type: type: string relative-maturity: $ref: '#/definitions/RM' crop-id: type: integer format: int64 geometry: $ref: '#/definitions/ActualEventInputGeometry' planting-end-time: type: string season: type: string id: type: string format: uuid population: $ref: '#/definitions/Population' area: $ref: '#/definitions/Area' source-id: type: string planting-start-time: type: string field-id: type: string product-year: type: integer format: int64 required: - seed-product - planting-end-time - id - area - planting-start-time - field-id ActualEventInputGeometry: title: ActualEventInputGeometry type: object properties: crs: type: string bbox: type: array items: type: number format: double coordinates: type: array items: type: number format: double type: type: string required: - coordinates - type ActualEventPatchInput: title: ActualEventPatchInput type: object properties: seed-product: $ref: '#/definitions/ValidatedSeedProduct' custom-crop-name: type: string updated-at: type: string treatments: type: array items: $ref: '#/definitions/Treatment' replant: type: boolean source-type: type: string relative-maturity: $ref: '#/definitions/RM' crop-id: type: integer format: int64 geometry: $ref: '#/definitions/ActualEventPatchInputGeometry' planting-end-time: type: string season: type: string id: type: string format: uuid population: $ref: '#/definitions/Population' area: $ref: '#/definitions/Area' source-id: type: string planting-start-time: type: string field-id: type: string product-year: type: integer format: int64 required: - id - field-id ActualEventPatchInputGeometry: title: ActualEventPatchInputGeometry type: object properties: crs: type: string bbox: type: array items: type: number format: double coordinates: type: array items: type: number format: double type: type: string required: - coordinates - type ActualEventQueryRequest: title: ActualEventQueryRequest type: object properties: event-ids: type: array items: type: string format: uuid required: - event-ids ActualEventQueryResponse: title: ActualEventQueryResponse type: object properties: results: type: array items: $ref: '#/definitions/ActualEventResponse' required: - results ActualEventQueryResponseResultsGeometry: title: ActualEventQueryResponseResultsGeometry type: object properties: crs: type: string bbox: type: array items: type: number format: double coordinates: type: array items: type: number format: double type: type: string required: - coordinates - type ActualEventResponse: title: ActualEventResponse type: object properties: seed-product: $ref: '#/definitions/SeedProduct' updated-at: type: string deleted: type: boolean field-uuid: type: string format: uuid treatments: type: array items: $ref: '#/definitions/Treatment' replant: type: boolean source-type: type: string relative-maturity: $ref: '#/definitions/RM' crop-id: type: integer format: int64 geometry: $ref: '#/definitions/ActualEventQueryResponseResultsGeometry' planting-end-time: type: string cropping-year: type: integer format: int64 season: type: string updated-by: type: integer format: int64 created-by: type: integer format: int64 id: type: string format: uuid population: $ref: '#/definitions/Population' area: $ref: '#/definitions/Area' source-id: type: string planting-start-time: type: string field-id: type: string product-year: type: integer format: int64 created-at: type: string required: - seed-product - updated-at - deleted - field-uuid - planting-end-time - updated-by - created-by - id - area - planting-start-time - field-id - created-at AllEventsFieldResponse: title: AllEventsFieldResponse type: object properties: field-id: type: string field-uuid: type: string format: uuid planned: $ref: '#/definitions/AllEventsFieldsQueryResponseResultsPlanned' actual: type: array items: $ref: '#/definitions/ActualEventResponse' recorded: type: array items: $ref: '#/definitions/RecordedEventResponse' required: - field-id - field-uuid - planned - actual - recorded AllEventsFieldsQueryResponse: title: AllEventsFieldsQueryResponse type: object properties: results: type: array items: $ref: '#/definitions/AllEventsFieldResponse' required: - results AllEventsFieldsQueryResponseResultsPlanned: title: AllEventsFieldsQueryResponseResultsPlanned type: object properties: program: $ref: '#/definitions/ProgramResponse' prescription: $ref: '#/definitions/PrescriptionResponse' created-at: type: string created-by: type: integer format: int64 updated-at: type: string updated-by: type: integer format: int64 deleted: type: boolean ApplyProgramRequest: title: ApplyProgramRequest type: object properties: program-id: type: string format: uuid field-ids: type: array items: type: string required: - program-id - field-ids Area: title: Area type: object properties: q: type: number format: double u: type: string default: hectare required: - q - u BestFmzQueryResponse: title: BestFmzQueryResponse type: object properties: results: type: array items: $ref: '#/definitions/BestFmzResponse' required: - results BestFmzResponse: title: BestFmzResponse type: object properties: field-id: type: string field-uuid: type: string format: uuid fmz-id: type: string format: uuid event-type: $ref: '#/definitions/EventType' product-year: type: integer format: int64 season: type: string zones: type: array items: $ref: '#/definitions/BestFmzZoneResponse' required: - field-id - field-uuid - fmz-id - event-type - zones BestFmzZoneResponse: title: BestFmzZoneResponse type: object properties: zone-id: type: string event-type: $ref: '#/definitions/EventType' dominant-planting: $ref: '#/definitions/BestPlanting' required: - zone-id - event-type - dominant-planting BestPlanting: title: BestPlanting type: object properties: seed-product: $ref: '#/definitions/SeedProduct' target-yield: $ref: '#/definitions/Yield' date: type: string treatments: type: array items: $ref: '#/definitions/Treatment' replant: type: boolean relative-maturity: $ref: '#/definitions/RM' crop-id: type: integer format: int64 fmz-id: type: string format: uuid season: type: string population: $ref: '#/definitions/Population' area: $ref: '#/definitions/Area' BestQueryResponse: title: BestQueryResponse type: object properties: results: type: array items: $ref: '#/definitions/BestResponse' required: - results BestResponse: title: BestResponse type: object properties: field-id: type: string field-uuid: type: string format: uuid updated-at: type: string event-type: $ref: '#/definitions/EventType' dominant-planting: $ref: '#/definitions/BestPlanting' product-year: type: integer format: int64 season: type: string plantings: type: array items: $ref: '#/definitions/BestPlanting' required: - field-id - field-uuid - updated-at - event-type - dominant-planting DeletedResponse: title: DeletedResponse type: object properties: id: type: string format: uuid deleted: type: boolean required: - id - deleted FieldPlan: title: FieldPlan type: object properties: updated-at: type: string deleted: type: boolean field-uuid: type: string format: uuid source-type: type: string updated-by: type: integer format: int64 created-by: type: integer format: int64 prescription: $ref: '#/definitions/PrescriptionResponse' field-area: $ref: '#/definitions/Area' source-id: type: string field-id: type: string created-at: type: string program: $ref: '#/definitions/ProgramResponse' required: - field-uuid - field-area - field-id FieldPlanQueryResponse: title: FieldPlanQueryResponse type: object properties: results: type: array items: $ref: '#/definitions/FieldPlan' required: - results FieldsFmzsQuery: title: FieldsFmzsQuery type: object properties: field-fmz-ids: type: array items: $ref: '#/definitions/FieldsFmzsQueryFieldFmzIds' required: - field-fmz-ids FieldsFmzsQueryFieldFmzIds: title: FieldsFmzsQueryFieldFmzIds type: object properties: field-id: type: string fmz-id: type: string format: uuid required: - field-id - fmz-id FieldsQuery: title: FieldsQuery type: object properties: field-ids: type: array items: type: string required: - field-ids NewActualEvent: title: NewActualEvent type: object properties: seed-product: $ref: '#/definitions/ValidatedSeedProduct' custom-crop-name: type: string updated-at: type: string treatments: type: array items: $ref: '#/definitions/Treatment' replant: type: boolean source-type: type: string relative-maturity: $ref: '#/definitions/RM' crop-id: type: integer format: int64 geometry: $ref: '#/definitions/NewActualEventGeometry' planting-end-time: type: string season: type: string population: $ref: '#/definitions/Population' area: $ref: '#/definitions/Area' source-id: type: string planting-start-time: type: string field-id: type: string product-year: type: integer format: int64 required: - seed-product - planting-end-time - area - planting-start-time - field-id NewActualEventGeometry: title: NewActualEventGeometry type: object properties: crs: type: string bbox: type: array items: type: number format: double coordinates: type: array items: type: number format: double type: type: string required: - coordinates - type NewProgram: title: NewProgram type: object properties: seed-product: $ref: '#/definitions/ValidatedSeedProduct' updated-at: type: string target-yield: $ref: '#/definitions/Yield' date: type: string treatments: type: array items: $ref: '#/definitions/Treatment' name: type: string relative-maturity: $ref: '#/definitions/RM' crop-id: type: integer format: int64 notes: type: string population: $ref: '#/definitions/Population' product-year: type: integer format: int64 visible: type: boolean NewProgramPatch: title: NewProgramPatch type: object properties: seed-product: $ref: '#/definitions/ValidatedSeedProduct' updated-at: type: string target-yield: $ref: '#/definitions/Yield' date: type: string treatments: type: array items: $ref: '#/definitions/Treatment' name: type: string relative-maturity: $ref: '#/definitions/RM' crop-id: type: integer format: int64 notes: type: string population: $ref: '#/definitions/Population' product-year: type: integer format: int64 visible: type: boolean NewRecordedEvent: title: NewRecordedEvent type: object properties: seed-product: $ref: '#/definitions/ValidatedSeedProduct' updated-at: type: string date: type: string treatments: type: array items: $ref: '#/definitions/Treatment' name: type: string source-type: type: string relative-maturity: $ref: '#/definitions/RM' crop-id: type: integer format: int64 cropping-year: type: integer format: int64 fmz-id: type: string format: uuid season: type: string notes: type: string population: $ref: '#/definitions/Population' zone-id: type: string area: $ref: '#/definitions/Area' source-id: type: string field-id: type: string product-year: type: integer format: int64 required: - field-id Population: title: Population type: object properties: q: type: number format: double u: $ref: '#/definitions/U' required: - q - u PrescriptionResponse: title: PrescriptionResponse type: object properties: updated-at: type: string deleted: type: boolean field-uuid: type: string format: uuid name: type: string fmz-id: type: string format: uuid updated-by: type: integer format: int64 created-by: type: integer format: int64 id: type: string format: uuid notes: type: string zones: type: array items: $ref: '#/definitions/ZoneProgram' field-id: type: string product-year: type: integer format: int64 created-at: type: string required: - field-uuid - fmz-id - id - zones - field-id - product-year ProgramFieldsResponse: title: ProgramFieldsResponse type: object properties: program-id: type: string format: uuid field-ids: type: array items: type: string required: - program-id - field-ids ProgramInput: title: ProgramInput type: object properties: seed-product: $ref: '#/definitions/ValidatedSeedProduct' updated-at: type: string target-yield: $ref: '#/definitions/Yield' date: type: string treatments: type: array items: $ref: '#/definitions/Treatment' name: type: string relative-maturity: $ref: '#/definitions/RM' crop-id: type: integer format: int64 id: type: string format: uuid notes: type: string population: $ref: '#/definitions/Population' product-year: type: integer format: int64 visible: type: boolean required: - id ProgramPatchInput: title: ProgramPatchInput type: object properties: seed-product: $ref: '#/definitions/ValidatedSeedProduct' updated-at: type: string target-yield: $ref: '#/definitions/Yield' date: type: string treatments: type: array items: $ref: '#/definitions/Treatment' name: type: string relative-maturity: $ref: '#/definitions/RM' crop-id: type: integer format: int64 id: type: string format: uuid notes: type: string population: $ref: '#/definitions/Population' product-year: type: integer format: int64 visible: type: boolean required: - id ProgramQuery: title: ProgramQuery type: object properties: field-ids: type: array items: type: string program-ids: type: array items: type: integer format: int64 product-year: type: integer format: int64 type: $ref: '#/definitions/Type' visible: type: boolean include-owned: {} include-zones: {} ProgramResponse: title: ProgramResponse type: object properties: seed-product: $ref: '#/definitions/SeedProduct' updated-at: type: string deleted: type: boolean target-yield: $ref: '#/definitions/Yield' date: type: string treatments: type: array items: $ref: '#/definitions/Treatment' name: type: string source-type: type: string relative-maturity: $ref: '#/definitions/RM' crop-id: type: integer format: int64 updated-by: type: integer format: int64 created-by: type: integer format: int64 id: type: string format: uuid notes: type: string population: $ref: '#/definitions/Population' source-id: type: string product-year: type: integer format: int64 visible: type: boolean created-at: type: string required: - id ProgramsQueryRequest: title: ProgramsQueryRequest type: object properties: program-ids: type: array items: type: string format: uuid required: - program-ids ProgramsQueryResponse: title: ProgramsQueryResponse type: object properties: results: type: array items: $ref: '#/definitions/ProgramResponse' required: - results RM: title: RM type: object properties: q: type: string u: type: string required: - q - u RecordedEventFieldResponse: title: RecordedEventFieldResponse type: object properties: field-id: type: string field-uuid: type: string format: uuid events: type: array items: $ref: '#/definitions/RecordedEventResponse' required: - field-id - field-uuid - events RecordedEventFieldsQueryResponse: title: RecordedEventFieldsQueryResponse type: object properties: results: type: array items: $ref: '#/definitions/RecordedEventFieldResponse' required: - results RecordedEventInput: title: RecordedEventInput type: object properties: seed-product: $ref: '#/definitions/ValidatedSeedProduct' updated-at: type: string date: type: string treatments: type: array items: $ref: '#/definitions/Treatment' name: type: string source-type: type: string relative-maturity: $ref: '#/definitions/RM' crop-id: type: integer format: int64 cropping-year: type: integer format: int64 fmz-id: type: string format: uuid season: type: string id: type: string format: uuid notes: type: string population: $ref: '#/definitions/Population' zone-id: type: string area: $ref: '#/definitions/Area' source-id: type: string field-id: type: string product-year: type: integer format: int64 required: - id - field-id RecordedEventPatchInput: title: RecordedEventPatchInput type: object properties: seed-product: $ref: '#/definitions/ValidatedSeedProduct' updated-at: type: string date: type: string treatments: type: array items: $ref: '#/definitions/Treatment' name: type: string source-type: type: string relative-maturity: $ref: '#/definitions/RM' crop-id: type: integer format: int64 cropping-year: type: integer format: int64 fmz-id: type: string format: uuid season: type: string id: type: string format: uuid notes: type: string population: $ref: '#/definitions/Population' zone-id: type: string area: $ref: '#/definitions/Area' source-id: type: string field-id: type: string product-year: type: integer format: int64 required: - id - field-id RecordedEventQueryRequest: title: RecordedEventQueryRequest type: object properties: event-ids: type: array items: type: string format: uuid required: - event-ids RecordedEventQueryResponse: title: RecordedEventQueryResponse type: object properties: results: type: array items: $ref: '#/definitions/RecordedEventResponse' required: - results RecordedEventResponse: title: RecordedEventResponse type: object properties: seed-product: $ref: '#/definitions/SeedProduct' updated-at: type: string deleted: type: boolean date: type: string field-uuid: type: string format: uuid treatments: type: array items: $ref: '#/definitions/Treatment' name: type: string relative-maturity: $ref: '#/definitions/RM' crop-id: type: integer format: int64 cropping-year: type: integer format: int64 fmz-id: type: string format: uuid season: type: string updated-by: type: integer format: int64 created-by: type: integer format: int64 id: type: string format: uuid notes: type: string population: $ref: '#/definitions/Population' zone-id: type: string area: $ref: '#/definitions/Area' field-id: type: string product-year: type: integer format: int64 created-at: type: string required: - updated-at - deleted - field-uuid - updated-by - created-by - id - field-id - created-at RemoveProgramRequest: title: RemoveProgramRequest type: object properties: field-ids: type: array items: type: string required: - field-ids RemoveProgramResponse: title: RemoveProgramResponse type: object properties: results: type: array items: $ref: '#/definitions/RemoveProgramResponseResults' required: - results RemoveProgramResponseResults: title: RemoveProgramResponseResults type: object properties: field-id: type: string field-uuid: type: string format: uuid product-year: type: integer format: int64 required: - field-id - field-uuid - product-year SeedProduct: title: SeedProduct type: object properties: id: type: integer format: int64 brand: type: string name: type: string Treatment: title: Treatment type: object properties: type: type: string q: type: number format: double u: type: string required: - type - q - u UmberFieldPlantingProfile: title: UmberFieldPlantingProfile type: object properties: field-id: type: string product-year: type: integer format: int64 created-at: type: string updated-at: type: string planting-program: type: string required: - field-id - product-year UmberFieldPlantingProfiles: title: UmberFieldPlantingProfiles type: object properties: profiles: type: array items: $ref: '#/definitions/UmberFieldPlantingProfile' required: - profiles UmberFieldProfileQuery: title: UmberFieldProfileQuery type: object properties: product-year: type: integer format: int64 field-ids: type: array items: type: string updated-since: type: string required: - product-year UmberPlantingEdit: title: UmberPlantingEdit type: object properties: seed-product: $ref: '#/definitions/UmberPlantingEditsPlantingEditsSeedProduct' updated-at: type: string liquid-application: $ref: '#/definitions/UmberPlantingEditsPlantingEditsLiquidApplication' target-yield: $ref: '#/definitions/UmberPlantingEditsPlantingEditsTargetYield' color: type: string name: type: string population: $ref: '#/definitions/UmberPlantingEditsPlantingEditsPopulation' zone-id: type: string visible: type: boolean crop: type: string created-at: type: string planting-date: type: string rm: $ref: '#/definitions/UmberPlantingEditsPlantingEditsRm' required: - zone-id UmberPlantingEdits: title: UmberPlantingEdits type: object properties: product-year: type: integer format: int64 planting-edits: type: array items: $ref: '#/definitions/UmberPlantingEdit' required: - product-year - planting-edits UmberPlantingEditsPlantingEditsLiquidApplication: title: UmberPlantingEditsPlantingEditsLiquidApplication type: object properties: value: type: number format: double unit: type: string required: - value - unit UmberPlantingEditsPlantingEditsPopulation: title: UmberPlantingEditsPlantingEditsPopulation type: object properties: value: type: number format: double unit: type: string required: - value UmberPlantingEditsPlantingEditsRm: title: UmberPlantingEditsPlantingEditsRm type: object properties: value: type: string unit: type: string required: - value UmberPlantingEditsPlantingEditsSeedProduct: title: UmberPlantingEditsPlantingEditsSeedProduct type: object properties: brand: type: string name: type: string id: type: integer format: int64 UmberPlantingEditsPlantingEditsTargetYield: title: UmberPlantingEditsPlantingEditsTargetYield type: object properties: value: type: number format: double unit: type: string required: - value UmberPlantingProgramResponse: title: UmberPlantingProgramResponse type: object properties: seed-product: $ref: '#/definitions/UmberPlantingProgramsResponseProgramsSeedProduct' updated-at: type: string liquid-application: $ref: '#/definitions/UmberPlantingProgramsResponseProgramsLiquidApplication' target-yield: $ref: '#/definitions/UmberPlantingProgramsResponseProgramsTargetYield' color: type: string name: type: string type: type: string default: planting-program id: type: string population: $ref: '#/definitions/UmberPlantingProgramsResponseProgramsPopulation' product-year: type: integer format: int64 visible: type: boolean crop: type: string created-at: type: string planting-date: type: string rm: $ref: '#/definitions/UmberPlantingProgramsResponseProgramsRm' required: - type - id - product-year UmberPlantingProgramsResponse: title: UmberPlantingProgramsResponse type: object properties: programs: type: array items: $ref: '#/definitions/UmberPlantingProgramResponse' required: - programs UmberPlantingProgramsResponseProgramsLiquidApplication: title: UmberPlantingProgramsResponseProgramsLiquidApplication type: object properties: value: type: number format: double unit: type: string required: - value - unit UmberPlantingProgramsResponseProgramsPopulation: title: UmberPlantingProgramsResponseProgramsPopulation type: object properties: value: type: number format: double unit: type: string required: - value UmberPlantingProgramsResponseProgramsRm: title: UmberPlantingProgramsResponseProgramsRm type: object properties: value: type: string unit: type: string required: - value UmberPlantingProgramsResponseProgramsSeedProduct: title: UmberPlantingProgramsResponseProgramsSeedProduct type: object properties: brand: type: string name: type: string id: type: integer format: int64 UmberPlantingProgramsResponseProgramsTargetYield: title: UmberPlantingProgramsResponseProgramsTargetYield type: object properties: value: type: number format: double unit: type: string required: - value UmberProgramFieldsResponse: title: UmberProgramFieldsResponse type: object properties: field-profiles: type: array items: $ref: '#/definitions/UmberProgramFieldsResponseFieldProfiles' zone-profiles: type: array items: $ref: '#/definitions/UmberProgramFieldsResponseZoneProfiles' UmberProgramFieldsResponseFieldProfiles: title: UmberProgramFieldsResponseFieldProfiles type: object properties: field-id: type: string product-year: type: integer format: int64 planting-program: $ref: '#/definitions/UmberProgramFieldsResponseFieldProfilesPlantingProgram' required: - field-id - product-year - planting-program UmberProgramFieldsResponseFieldProfilesPlantingProgram: title: UmberProgramFieldsResponseFieldProfilesPlantingProgram type: object properties: id: type: string required: - id UmberProgramFieldsResponseZoneProfiles: title: UmberProgramFieldsResponseZoneProfiles type: object properties: field-id: type: string fmz-id: type: string format: uuid zone-id: type: string product-year: type: integer format: int64 planting-program: $ref: '#/definitions/UmberProgramFieldsResponseZoneProfilesPlantingProgram' required: - field-id - fmz-id - zone-id - product-year - planting-program UmberProgramFieldsResponseZoneProfilesPlantingProgram: title: UmberProgramFieldsResponseZoneProfilesPlantingProgram type: object properties: id: type: string required: - id UmberZoneProfile: title: UmberZoneProfile type: object properties: fmz-id: type: string format: uuid zone-id: type: string field-id: type: string product-year: type: integer format: int64 created-at: type: string updated-at: type: string planting-program: type: string required: - fmz-id - zone-id - field-id - product-year UmberZoneProfileResponse: title: UmberZoneProfileResponse type: object properties: profiles: type: array items: $ref: '#/definitions/UmberZoneProfile' required: - profiles UmberZoneProfilesQuery: title: UmberZoneProfilesQuery type: object properties: product-year: type: integer format: int64 zone-ids: type: array items: type: string required: - product-year ValidatedSeedProduct: title: ValidatedSeedProduct type: object properties: id: type: integer format: int64 brand: type: string name: type: string Yield: title: Yield type: object properties: q: type: number format: double u: type: string required: - q - u ZoneProgram: title: ZoneProgram type: object properties: seed-product: $ref: '#/definitions/SeedProduct' updated-at: type: string deleted: type: boolean target-yield: $ref: '#/definitions/Yield' date: type: string treatments: type: array items: $ref: '#/definitions/Treatment' name: type: string relative-maturity: $ref: '#/definitions/RM' crop-id: type: integer format: int64 updated-by: type: integer format: int64 created-by: type: integer format: int64 notes: type: string population: $ref: '#/definitions/Population' zone-id: type: string area: $ref: '#/definitions/Area' product-year: type: integer format: int64 visible: type: boolean created-at: type: string required: - zone-id - area EventType: title: EventType type: string enum: - planned - recorded - all - actual Type: title: Type type: string enum: - planting-program U: title: U type: string enum: - kg/hectare - seed/hectare tags: - name: core description: '' - name: legacy nitro description: '' - name: legacy umber description: '' - name: v1 description: '' - name: v2-validations description: '' - name: v3-validations description: '' - name: v3 description: '' - name: v3-planned description: '' - name: v3-actual description: '' validate-0.24.0/fixtures/bugs/39/000077500000000000000000000000001457312750000164365ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/39/swagger.yml000066400000000000000000000014271457312750000206240ustar00rootroot00000000000000swagger: "2.0" info: version: "1.0.0" title: "fragment-param test" schemes: - http basePath: /service paths: /foo/bar{fragment}.{subfragment}: get: description: "lookup foo with bar*.*, where * is some string" parameters: - name: "fragment" in: "path" type: string required: true description: "this fragment header parameter is not recognized by codegen" - name: "subfragment" in: "path" type: string required: true description: "this subfragment header parameter is not recognized by codegen" produces: - text/plain responses: '200': description: "Successful" schema: type: string '400': description: "Bad request" validate-0.24.0/fixtures/bugs/43/000077500000000000000000000000001457312750000164315ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/43/fixture-1456.yaml000066400000000000000000000016501457312750000214020ustar00rootroot00000000000000swagger: '2.0' info: title: fixture description: reproduce fixture go-swagger/go-swagger#1456 version: "1.0.0" paths: /v1/collection: post: summary: Collection tags: - Collection parameters: - name: collection in: body required: true schema: $ref: '#/definitions/collection' responses: 200: description: success schema: type: string definitions: collection: type: object required: - id - title - items properties: id: type: string description: The unique ID title: type: string description: Title minLength: 1 maxLength: 50 items: type: array description: Items items: type: string example: id: item1 title: Home items: - item2 - item3 validate-0.24.0/fixtures/bugs/43/fixture-43-fail.yaml000066400000000000000000000010441457312750000221370ustar00rootroot00000000000000swagger: '2.0' info: title: Object version: 0.1.0 paths: "/": get: operationId: getBody parameters: - name: yet_other_server_id in: body schema: # Invalid array definition type: array properties: other: type: string responses: '200': description: ko # Invalid array definition schema: type: array properties: another: type: string validate-0.24.0/fixtures/bugs/43/fixture-43-variants.yaml000066400000000000000000000032221457312750000230530ustar00rootroot00000000000000swagger: '2.0' info: title: Object version: 0.1.0 paths: /: get: parameters: - name: itemsparam in: body schema: type: array items: type: object required: [ items ] properties: items: type: number example: - items: 123 - items: 456 responses: '200': description: Ok schema: type: object properties: a: type: string items: type: string default: "xyz" example: "123" examples: application/json: a: abc items: xyz # we verify that it is legal to name a property "type" or "properties" /type: get: parameters: - name: typeparam in: body schema: type: object properties: type: type: string example: z properties: type: number example: 1 default: { "type": "abc", "properties": 123 } example: { "type": "abc", "properties": 123 } responses: '200': description: Ok schema: type: object properties: type: type: string properties: type: number default: 123 example: 123 examples: application/json: type: abc properties: 123 validate-0.24.0/fixtures/bugs/43/fixture-43.yaml000066400000000000000000000005471457312750000212350ustar00rootroot00000000000000swagger: '2.0' info: title: Object version: 0.1.0 paths: /: get: responses: '200': description: Ok schema: type: object properties: a: type: string items: type: string default: "xyz" example: "123" validate-0.24.0/fixtures/bugs/52/000077500000000000000000000000001457312750000164315ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/52/swagger.json000066400000000000000000000004371457312750000207670ustar00rootroot00000000000000{ "swagger" : "2.0", "info" : { "version" : "1.0", "title" : "Hello World", "description" : "Simple Hello World API, with Get operation to one resource path, no request parameters defined" }, "host" : "api.tibco.com", "basePath" : "/v1", "schemes" : [ "http" ] } validate-0.24.0/fixtures/bugs/53/000077500000000000000000000000001457312750000164325ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/53/noswagger.json000066400000000000000000000004551457312750000213250ustar00rootroot00000000000000{ "info" : { "version" : "1.0", "title" : "Hello World", "description" : "Simple Hello World API, with Get operation to one resource path, no request parameters defined" }, "host" : "api.tibco.com", "basePath" : "/v1", "schemes" : [ "http" ], "paths": { "/": { } } } validate-0.24.0/fixtures/bugs/6/000077500000000000000000000000001457312750000163505ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/6/empty-responses.json000066400000000000000000000004351457312750000224220ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "0.0.1", "title": "test of Swagger invalid no responses" }, "paths": { "/foo": { "get": { "description": "foo", "responses": {} } } } } validate-0.24.0/fixtures/bugs/6/no-responses.json000066400000000000000000000003741457312750000217020ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "0.0.1", "title": "test of Swagger invalid no responses" }, "paths": { "/foo": { "get": { "description": "foo" } } } } validate-0.24.0/fixtures/bugs/61/000077500000000000000000000000001457312750000164315ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/61/multiple-refs.json000066400000000000000000000016761457312750000221260ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "0.0.1", "title": "test of Swagger parameters with refs" }, "parameters": { "userId": { "name": "userId", "in": "path", "type": "string", "required": true }, "limit": { "name": "limit", "in": "query", "type": "integer", "format": "int64" } }, "paths": { "/foo": { "get": { "responses": { "200": { "description": "Successful" } } } }, "/bar": { "get": { "responses": { "200": { "description": "Successful" } } } }, "/users/{userId}": { "parameters": [{ "$ref": "#/parameters/userId" }, { "$ref": "#/parameters/limit" }], "get": { "responses": { "200": { "description": "Successful" } } } } } } validate-0.24.0/fixtures/bugs/61/unresolved-ref-for-name.json000066400000000000000000000014301457312750000237640ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "0.0.1", "title": "test of Swagger global parameters" }, "parameters": { "userId": { "name": "userId", "in": "path", "type": "string", "required": true } }, "paths": { "/foo": { "get": { "responses": { "200": { "description": "Successful" } } } }, "/bar": { "get": { "responses": { "200": { "description": "Successful" } } } }, "/users/{userId}": { "parameters": [{ "$ref": "#/parameters/userId" }], "get": { "responses": { "200": { "description": "Successful" } } } } } } validate-0.24.0/fixtures/bugs/62/000077500000000000000000000000001457312750000164325ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/62/swagger.json000066400000000000000000000003501457312750000207620ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "0.0.1", "title": "test of Swagger of additionalProperties in pathItem" }, "paths": { "/": { "invalid-property": { "description": "blah" } } } } validate-0.24.0/fixtures/bugs/63/000077500000000000000000000000001457312750000164335ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/63/swagger.json000066400000000000000000000014321457312750000207650ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "0.0.1", "title": "test of Swagger global parameters" }, "parameters": { "userId": { "name": "userId", "in": "path", "type": "string", "required": true } }, "paths": { "/foo": { "get": { "responses": { "200": { "description": "Successful" } } } }, "/bar": { "get": { "responses": { "200": { "description": "Successful" } } } }, "/users/{userId}": { "parameters": [ { "$ref": "#/parameters/userId" } ], "get": { "responses": { "200": { "description": "Successful" } } } } } } validate-0.24.0/fixtures/bugs/73/000077500000000000000000000000001457312750000164345ustar00rootroot00000000000000validate-0.24.0/fixtures/bugs/73/fixture-responses-2.yaml000066400000000000000000000002461457312750000231660ustar00rootroot00000000000000definitions: fixture: type: string parameters: param1: name: queryParam1 in: query type: string responses: NotFound: description: Not found validate-0.24.0/fixtures/bugs/73/fixture-responses-3.yaml000066400000000000000000000000641457312750000231650ustar00rootroot00000000000000definitions: NotFound: description: Not found validate-0.24.0/fixtures/bugs/73/fixture-responses.yaml000066400000000000000000000003501457312750000230230ustar00rootroot00000000000000swagger: '2.0' info: title: Responses version: 0.1.0 responses: NotFound: description: Not found paths: /: get: summary: GET operationId: getAll responses: '200': description: Ok validate-0.24.0/fixtures/bugs/73/fixture-swagger-2.yaml000066400000000000000000000007171457312750000226070ustar00rootroot00000000000000swagger: '2.0' info: title: Object version: 0.1.0 paths: /: get: summary: GET operationId: getAll parameters: - $ref: 'fixture-responses-2.yaml#/parameters/param1' - name: param2 in: body schema: $ref: 'fixture-responses-2.yaml#/definitions/fixture' responses: '200': description: Ok '404': $ref: 'fixture-responses-2.yaml#/responses/NotFound' validate-0.24.0/fixtures/bugs/73/fixture-swagger-3.yaml000066400000000000000000000004031457312750000226000ustar00rootroot00000000000000swagger: '2.0' info: title: Object version: 0.1.0 paths: /: get: summary: GET operationId: getAll responses: '200': description: Ok '404': $ref: 'fixture-responses-3.yaml#/definitions/NotFound' validate-0.24.0/fixtures/bugs/73/fixture-swagger-good.yaml000066400000000000000000000004341457312750000233720ustar00rootroot00000000000000swagger: '2.0' info: title: Object version: 0.1.0 responses: NotFound: description: Not found paths: /: get: summary: GET operationId: getAll responses: '200': description: Ok '404': $ref: '#/responses/NotFound' validate-0.24.0/fixtures/bugs/73/fixture-swagger.yaml000066400000000000000000000004011457312750000224360ustar00rootroot00000000000000swagger: '2.0' info: title: Object version: 0.1.0 paths: /: get: summary: GET operationId: getAll responses: '200': description: Ok '404': $ref: './fixture-responses.yaml#/responses/NotFound' validate-0.24.0/fixtures/defaulting/000077500000000000000000000000001457312750000173655ustar00rootroot00000000000000validate-0.24.0/fixtures/defaulting/schema.json000066400000000000000000000035511457312750000215240ustar00rootroot00000000000000{ "properties": { "int": { "type": "integer", "default": 42 }, "existing": { "type": "integer", "default": 42 }, "str": { "type": "string", "minLength": 4, "default": "Hello" }, "obj": { "type": "object", "default": {"foo": "bar"} }, "nested": { "type": "object", "properties": { "inner": { "type": "integer", "default": 7 } } }, "all": { "allOf": [ { "type": "object", "properties": { "foo": { "type": "integer", "default": 42 } } }, { "type": "object", "properties": { "bar": { "type": "integer", "default": 42 } } } ] }, "any": { "anyOf": [ { "type": "object", "properties": { "foo": { "type": "integer", "default": 42 } } }, { "type": "object", "properties": { "bar": { "type": "integer", "default": 42 } } } ] }, "one": { "oneOf": [ { "type": "object", "properties": { "foo": { "type": "integer" } }, "required": ["foo"] }, { "type": "object", "properties": { "bar": { "type": "integer", "default": 42 } } } ] }, "not": { "not": { "type": "object", "default": { "foo": 1 } } } }, "required": ["int", "str", "nested", "all", "any", "one"] } validate-0.24.0/fixtures/formats/000077500000000000000000000000001457312750000167165ustar00rootroot00000000000000validate-0.24.0/fixtures/formats/extended-format.json000066400000000000000000000367111457312750000227070ustar00rootroot00000000000000[ { "description": "Sanity check: validation of date-time strings", "schema": {"format": "date-time"}, "tests": [ { "description": "a valid date-time string", "data": "1963-06-19T08:30:06.283185Z", "valid": true }, { "description": "an invalid date-time string", "data": "06/19/1963 08:30:06 PST", "valid": false }, { "description": "only RFC3339 not all of ISO 8601 are valid", "data": "2013-350T01:01:01", "valid": false } ] }, { "description": "validation of date strings", "schema": {"format": "date"}, "tests": [ { "description": "a valid date string", "data": "1963-06-19", "valid": true }, { "description": "invalid month in date", "data": "1963-13-19", "valid": false }, { "description": "invalid day in date", "data": "1963-12-39", "valid": false }, { "description": "invalid year in date", "data": "63-12-39", "valid": false }, { "description": "invalid leap year date", "data": "1999-02-29", "valid": false }, { "description": "date does not validate date-time", "data": "1963-06-19T08:30:06.283185Z", "valid": false }, { "description": "invalid date", "data": "2013-350T01:01:01", "valid": false }, { "description": "an invalid date string", "data": "06/19/1963", "valid": false }, { "description": "only RFC3339 not all of ISO 8601 are valid", "data": "2013-350T01:01:01", "valid": false } ] }, { "description": "sanity check: validation of URIs (literally from json schema test suite)", "schema": {"format": "uri"}, "tests": [ { "description": "a valid URI", "data": "http://foo.bar/?baz=qux#quux", "valid": true }, { "description": "an invalid URI", "data": "\\\\WINDOWS\\fileshare", "valid": false }, { "description": "an invalid URI though valid URI reference", "data": "abc", "valid": false } ] }, { "description": "sanity check: validation of e-mail addresses (literally from json schema test suite)", "schema": {"format": "email"}, "tests": [ { "description": "a valid e-mail address", "data": "joe.bloggs@example.com", "valid": true }, { "description": "an invalid e-mail address", "data": "2962", "valid": false } ] }, { "description": "sanity check: validation of IP addresses (literally from json schema test suite)", "schema": {"format": "ipv4"}, "tests": [ { "description": "a valid IP address", "data": "192.168.0.1", "valid": true }, { "description": "an IP address with too many components", "data": "127.0.0.0.1", "valid": false }, { "description": "an IP address with out-of-range values", "data": "256.256.256.256", "valid": false }, { "description": "an IP address without 4 components", "data": "127.0", "valid": false }, { "description": "an IP address as an integer", "data": "0x7f000001", "valid": false } ] }, { "description": "sanity check: validation of IPv6 addresses (literally from json schema test suite)", "schema": {"format": "ipv6"}, "tests": [ { "description": "a valid IPv6 address", "data": "::1", "valid": true }, { "description": "an IPv6 address with out-of-range values", "data": "12345::", "valid": false }, { "description": "an IPv6 address with too many components", "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1", "valid": false }, { "description": "an IPv6 address containing illegal characters", "data": "::laptop", "valid": false } ] }, { "description": "sanity check: validation of host names (literally from json schema test suite)", "schema": {"format": "hostname"}, "tests": [ { "description": "a valid host name", "data": "www.example.com", "valid": true }, { "description": "a host name starting with an illegal character", "data": "-a-host-name-that-starts-with--", "valid": false }, { "description": "a host name containing illegal characters", "data": "not_a_valid_host_name", "valid": false }, { "description": "a host name with a component too long", "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component", "valid": false } ] }, { "description": "validation of duration strings", "schema": {"format": "duration"}, "tests": [ { "description": "a valid duration string", "data": "1ns", "valid": true }, { "description": "a valid duration string", "data": "1min", "valid": true }, { "description": "a valid duration string", "data": "1wk", "valid": true }, { "description": "a valid duration string", "data": "3week", "valid": true }, { "description": "a valid duration string", "data": "3 week", "valid": true }, { "description": "a valid duration string", "data": "3 weeks", "valid": true }, { "description": "a valid duration string", "data": "three weeks", "valid": false }, { "description": "an invalid duration string", "data": "06/19/1963 08:30:06 PST", "valid": false }, { "description": "an invalid duration string", "data": "06/19/1963 08:30:06 PST", "valid": false }, { "description": "an invalid duration string", "data": "zorg", "valid": false } ] }, { "description": "validation of MAC address strings", "schema": {"format": "mac"}, "tests": [ { "description": "a valid MAC address string", "data": "01:02:03:04:05:06", "valid": true }, { "description": "a valid MAC address string", "data": "AE:02:03:04:05:06", "valid": true }, { "description": "an invalid MAC address string", "data": "01:02:03:0G:05:06", "valid": false }, { "description": "an invalid MAC address string", "data": "01:02:03:04:05:06:07", "valid": false } ] }, { "description": "validation of uuid strings", "schema": {"format": "uuid"}, "tests": [ { "description": "a valid uuid", "data": "a8098c1a-f86e-11da-bd1a-00112444be1e", "valid": true }, { "description": "an invalid uuid", "data": "a8098c1a+f86e+11da+bd1a+00112444be1e", "valid": false } ] }, { "description": "validation of uuid3 strings", "schema": {"format": "uuid3"}, "tests": [ { "description": "a valid uuid3", "data": "bcd02e22-68f0-3046-a512-327cca9def8f", "valid": true }, { "description": "an invalid uuid3", "data": "not-an-uuid3", "valid": false }, { "description": "an invalid uuid3", "data": "bcg02e22-68f0-3046-a512-327cca9def8f", "valid": false } ] }, { "description": "validation of uuid4 strings", "schema": {"format": "uuid4"}, "tests": [ { "description": "a valid uuid4", "data": "025b0d74-00a2-4048-bf57-227c5111bb34", "valid": true }, { "description": "an invalid uuid4", "data": "not-an-uuid4", "valid": false }, { "description": "an invalid uuid4", "data": "025b0d74-00a2-4048-bf57-227x5111bb34", "valid": false } ] }, { "description": "validation of uuid5 strings", "schema": {"format": "uuid5"}, "tests": [ { "description": "a valid uuid5", "data": "886313e1-3b8a-5372-9b90-0c9aee199e5d", "valid": true }, { "description": "an invalid uuid5", "data": "886313e1/3b8a-5372/9b90/0c9aee199e5d", "valid": false }, { "description": "an invalid uuid5", "data": "886313h1-3b8a-5372-9b90-0c9aee199e5d", "valid": false } ] }, { "description": "test password format (pass-through)", "schema": {"format": "password"}, "tests": [ { "description": "a valid password", "data": "secret", "valid": true } ] }, { "description": "validation of ISBN strings", "schema": {"format": "isbn"}, "tests": [ { "description": "a valid ISBN", "data": "0321751043", "valid": true }, { "description": "an invalid ISBN", "data": "03217510X3", "valid": false } ] }, { "description": "validation of ISBN10 strings", "schema": {"format": "isbn10"}, "tests": [ { "description": "a valid ISBN10", "data": "0321751043", "valid": true }, { "description": "an invalid ISBN10", "data": "032175104300000500", "valid": false } ] }, { "description": "validation of ISBN13 strings", "schema": {"format": "isbn13"}, "tests": [ { "description": "a valid ISBN13", "data": "978 3401013190", "valid": true }, { "description": "an invalid ISBN13", "data": "032175104300000500", "valid": false } ] }, { "description": "validation of creditcard strings", "schema": {"format": "creditcard"}, "tests": [ { "description": "a valid creditcard", "data": "4111-1111-1111-1111", "valid": true }, { "description": "an invalid creditcard", "data": "4111-1111-1111-11A1", "valid": false } ] }, { "description": "validation of SSN strings", "schema": {"format": "ssn"}, "tests": [ { "description": "a valid SSN", "data": "111-11-1111", "valid": true }, { "description": "an invalid SSN", "data": "111-111111", "valid": false } ] }, { "description": "validation of hexcolor string", "schema": {"format": "hexcolor"}, "tests": [ { "description": "a valid hexcolor", "data": "#FFFFFF", "valid": true }, { "description": "an invalid hexcolor", "data": "xFFFFFF", "valid": false } ] }, { "description": "validation of RGB color strings", "schema": {"format": "rgbcolor"}, "tests": [ { "description": "a valid rgbcolor", "data": "rgb(255,255,255)", "valid": true }, { "description": "an invalid rgbcolor", "data": "rgb(100,100)", "valid": false } ] }, { "description": "validation of base64 strings", "schema": {"format": "byte"}, "tests": [ { "description": "a valid byte (base64)", "data": "ZWxpemFiZXRocG9zZXk=", "valid": true }, { "description": "an invalid byte (base64)", "data": "ZWxpemFiZXRocG9zZXk", "valid": false } ] }, { "description": "validation of BSON object ID strings", "schema": {"format": "bsonobjectid"}, "tests": [ { "description": "a valid bsonobjectid", "data": "507f1f77bcf86cd799439011", "valid": true }, { "description": "an invalid bsonobjectid", "data": "x07f1f77bcf86cd799439011", "valid": false } ] }, { "description": "validation of unsupported format (pass-through)", "schema": {"format": "unsupported"}, "tests": [ { "description": "an invalid format (no validation)", "data": "my string", "valid": true } ] } ] validate-0.24.0/fixtures/go-swagger/000077500000000000000000000000001457312750000173055ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/000077500000000000000000000000001457312750000202455ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/1010/000077500000000000000000000000001457312750000206265ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/1010/swagger.yml000066400000000000000000000006531457312750000230140ustar00rootroot00000000000000swagger: "2.0" paths: /widgets/: get: summary: Retrieve all widgets. parameters: - name: category_id in: query description: Return the widgets that are associated with this category. required: true type: array collectionFormat: "multi" items: type: string pattern: '^[0-9abcdefghjkmnpqrtuvwxyz]{29}$' definitions: {} validate-0.24.0/fixtures/go-swagger/bugs/103/000077500000000000000000000000001457312750000205505ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/103/swagger.json000066400000000000000000004537241457312750000231210ustar00rootroot00000000000000{ "info": { "termsOfService": "https://quay.io/tos", "version": "v1", "contact": { "email": "support@quay.io" }, "description": "This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. You can find out more at Quay.", "title": "Quay Frontend" }, "paths": { "/logarchive/{file_id}": { "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["archivedlogs"], "description": "", "parameters": [{ "description": "", "required": true, "type": "string", "name": "file_id", "in": "path" }], "operationId": "unnamed" }, "x-name": "data.archivedlogs.LogArchiveHandlers", "x-tag": "archivedlogs", "x-path": "/logarchive/{file_id}", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["archivedlogs"], "description": "", "parameters": [{ "description": "", "required": true, "type": "string", "name": "file_id", "in": "path" }], "operationId": "unnamed" } }, "/api/v1/organization/{orgname}/invoices": { "x-name": "endpoints.api.billing.OrganizationInvoiceList", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "x-tag": "billing", "x-path": "/api/v1/organization/{orgname}/invoices", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "tags": ["billing"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "listOrgInvoices", "description": "List the invoices for the specified orgnaization." } }, "/api/v1/plans/": { "x-name": "endpoints.api.billing.ListPlans", "x-tag": "billing", "x-path": "/api/v1/plans/", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["billing"], "description": "List the avaialble plans.", "parameters": [], "operationId": "listPlans" } }, "/api/v1/repository/{repository}/build/": { "x-name": "endpoints.api.build.RepositoryBuildList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "Returns all builds since the given unix timecode", "required": false, "type": "integer", "name": "since", "in": "query" }, { "description": "The maximum number of builds to return", "required": false, "type": "integer", "name": "limit", "in": "query" }], "tags": ["build"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getRepoBuilds", "description": "Get the list of repository builds." }, "x-path": "/api/v1/repository/{repository}/build/", "x-tag": "build", "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/RepositoryBuildRequest" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["build"], "security": [{ "oauth2_implicit": ["repo:write"] }], "operationId": "requestRepoBuild", "description": "Request that a repository be built and pushed from the specified input." } }, "/api/v1/repository/{repository}/build/{build_uuid}/status": { "x-name": "endpoints.api.build.RepositoryBuildStatus", "parameters": [{ "description": "The UUID of the build", "required": true, "type": "string", "name": "build_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "build", "x-path": "/api/v1/repository/{repository}/build/{build_uuid}/status", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The UUID of the build", "required": true, "type": "string", "name": "build_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["build"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getRepoBuildStatus", "description": "Return the status for the builds specified by the build uuids." } }, "/api/v1/repository/{repository}/build/{build_uuid}": { "x-name": "endpoints.api.build.RepositoryBuildResource", "parameters": [{ "description": "The UUID of the build", "required": true, "type": "string", "name": "build_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The UUID of the build", "required": true, "type": "string", "name": "build_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["build"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getRepoBuild", "description": "Returns information about a build." }, "x-path": "/api/v1/repository/{repository}/build/{build_uuid}", "x-tag": "build", "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The UUID of the build", "required": true, "type": "string", "name": "build_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["build"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "cancelRepoBuild", "description": "Cancels a repository build if it has not yet been picked up by a build worker." } }, "/api/v1/repository/{repository}/build/{build_uuid}/logs": { "x-name": "endpoints.api.build.RepositoryBuildLogs", "parameters": [{ "description": "The UUID of the build", "required": true, "type": "string", "name": "build_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "build", "x-path": "/api/v1/repository/{repository}/build/{build_uuid}/logs", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The UUID of the build", "required": true, "type": "string", "name": "build_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["build"], "security": [{ "oauth2_implicit": ["repo:write"] }], "operationId": "getRepoBuildLogs", "description": "Return the build logs for the build specified by the build uuid." } }, "/api/v1/discovery": { "x-name": "endpoints.api.discovery.DiscoveryResource", "x-tag": "discovery", "x-path": "/api/v1/discovery", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["discovery"], "description": "List all of the API endpoints available in the swagger API format.", "parameters": [{ "description": "Whether to include internal APIs.", "required": false, "type": "boolean", "name": "internal", "in": "query" }], "operationId": "discovery" } }, "/api/v1/repository/{repository}/image/{image_id}": { "x-name": "endpoints.api.image.RepositoryImage", "parameters": [{ "description": "The Docker image ID", "required": true, "type": "string", "name": "image_id", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "image", "x-path": "/api/v1/repository/{repository}/image/{image_id}", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The Docker image ID", "required": true, "type": "string", "name": "image_id", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["image"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getImage", "description": "Get the information available for the specified image." } }, "/api/v1/repository/{repository}/image/{image_id}/changes": { "x-name": "endpoints.api.image.RepositoryImageChanges", "parameters": [{ "description": "The Docker image ID", "required": true, "type": "string", "name": "image_id", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "image", "x-path": "/api/v1/repository/{repository}/image/{image_id}/changes", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The Docker image ID", "required": true, "type": "string", "name": "image_id", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["image"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getImageChanges", "description": "Get the list of changes for the specified image." } }, "/api/v1/repository/{repository}/image/": { "x-name": "endpoints.api.image.RepositoryImageList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "image", "x-path": "/api/v1/repository/{repository}/image/", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["image"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "listRepositoryImages", "description": "List the images for the specified repository." } }, "/api/v1/organization/{orgname}/aggregatelogs": { "x-name": "endpoints.api.logs.OrgAggregateLogs", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "x-tag": "logs", "x-path": "/api/v1/organization/{orgname}/aggregatelogs", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "Username for which to filter logs.", "required": false, "type": "string", "name": "performer", "in": "query" }, { "description": "Latest time to which to get logs. (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "endtime", "in": "query" }, { "description": "Earliest time from which to get logs. (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "starttime", "in": "query" }], "tags": ["logs"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getAggregateOrgLogs", "description": "Gets the aggregated logs for the specified organization." } }, "/api/v1/organization/{orgname}/logs": { "x-name": "endpoints.api.logs.OrgLogs", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "x-tag": "logs", "x-path": "/api/v1/organization/{orgname}/logs", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The page number for the logs", "required": false, "type": "integer", "name": "page", "in": "query" }, { "description": "Username for which to filter logs.", "required": false, "type": "string", "name": "performer", "in": "query" }, { "description": "Latest time to which to get logs. (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "endtime", "in": "query" }, { "description": "Earliest time from which to get logs. (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "starttime", "in": "query" }], "tags": ["logs"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "listOrgLogs", "description": "List the logs for the specified organization." } }, "/api/v1/repository/{repository}/logs": { "x-name": "endpoints.api.logs.RepositoryLogs", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "logs", "x-path": "/api/v1/repository/{repository}/logs", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The page number for the logs", "required": false, "type": "integer", "name": "page", "in": "query" }, { "description": "Latest time to which to get logs (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "endtime", "in": "query" }, { "description": "Earliest time from which to get logs (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "starttime", "in": "query" }], "tags": ["logs"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "listRepoLogs", "description": "List the logs for the specified repository." } }, "/api/v1/repository/{repository}/aggregatelogs": { "x-name": "endpoints.api.logs.RepositoryAggregateLogs", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "logs", "x-path": "/api/v1/repository/{repository}/aggregatelogs", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "Latest time to which to get logs (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "endtime", "in": "query" }, { "description": "Earliest time from which to get logs (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "starttime", "in": "query" }], "tags": ["logs"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "getAggregateRepoLogs", "description": "Returns the aggregated logs for the specified repository." } }, "/api/v1/organization/{orgname}/members/{membername}": { "x-name": "endpoints.api.organization.OrganizationMember", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The username of the organization member", "required": true, "type": "string", "name": "membername", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The username of the organization member", "required": true, "type": "string", "name": "membername", "in": "path" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrganizationMember", "description": "Retrieves the details of a member of the organization." }, "x-path": "/api/v1/organization/{orgname}/members/{membername}", "x-tag": "organization", "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The username of the organization member", "required": true, "type": "string", "name": "membername", "in": "path" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "removeOrganizationMember", "description": "Removes a member from an organization, revoking all its repository\n priviledges and removing it from all teams in the organization." } }, "/api/v1/organization/{orgname}": { "x-name": "endpoints.api.organization.Organization", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrganization", "description": "Get the details for the specified organization" }, "x-path": "/api/v1/organization/{orgname}", "x-tag": "organization", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "schema": { "$ref": "#/definitions/UpdateOrg" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "changeOrganizationDetails", "description": "Change the details for the specified organization." } }, "/api/v1/organization/{orgname}/applications/{client_id}": { "x-name": "endpoints.api.organization.OrganizationApplicationResource", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The OAuth client ID", "required": true, "type": "string", "name": "client_id", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The OAuth client ID", "required": true, "type": "string", "name": "client_id", "in": "path" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrganizationApplication", "description": "Retrieves the application with the specified client_id under the specified organization" }, "x-path": "/api/v1/organization/{orgname}/applications/{client_id}", "x-tag": "organization", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The OAuth client ID", "required": true, "type": "string", "name": "client_id", "in": "path" }, { "schema": { "$ref": "#/definitions/UpdateApp" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "updateOrganizationApplication", "description": "Updates an application under this organization." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The OAuth client ID", "required": true, "type": "string", "name": "client_id", "in": "path" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "deleteOrganizationApplication", "description": "Deletes the application under this organization." } }, "/api/v1/organization/{orgname}/applications": { "x-name": "endpoints.api.organization.OrganizationApplications", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrganizationApplications", "description": "List the applications for the specified organization" }, "x-path": "/api/v1/organization/{orgname}/applications", "x-tag": "organization", "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "schema": { "$ref": "#/definitions/NewApp" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "createOrganizationApplication", "description": "Creates a new application under this organization." } }, "/api/v1/organization/{orgname}/members": { "x-name": "endpoints.api.organization.OrganizationMemberList", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "x-tag": "organization", "x-path": "/api/v1/organization/{orgname}/members", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrganizationMembers", "description": "List the human members of the specified organization." } }, "/api/v1/app/{client_id}": { "x-name": "endpoints.api.organization.ApplicationInformation", "parameters": [{ "description": "The OAuth client ID", "required": true, "type": "string", "name": "client_id", "in": "path" }], "x-tag": "organization", "x-path": "/api/v1/app/{client_id}", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["organization"], "description": "Get information on the specified application.", "parameters": [{ "description": "The OAuth client ID", "required": true, "type": "string", "name": "client_id", "in": "path" }], "operationId": "getApplicationInformation" } }, "/api/v1/repository/{repository}/permissions/team/{teamname}": { "x-name": "endpoints.api.permission.RepositoryTeamPermission", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The name of the team to which the permission applies", "required": true, "type": "string", "name": "teamname", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the team to which the permission applies", "required": true, "type": "string", "name": "teamname", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "getTeamPermissions", "description": "Fetch the permission for the specified team." }, "x-path": "/api/v1/repository/{repository}/permissions/team/{teamname}", "x-tag": "permission", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the team to which the permission applies", "required": true, "type": "string", "name": "teamname", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/TeamPermission" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "changeTeamPermissions", "description": "Update the existing team permission." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the team to which the permission applies", "required": true, "type": "string", "name": "teamname", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "deleteTeamPermissions", "description": "Delete the permission for the specified team." } }, "/api/v1/repository/{repository}/permissions/user/": { "x-name": "endpoints.api.permission.RepositoryUserPermissionList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "permission", "x-path": "/api/v1/repository/{repository}/permissions/user/", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "listRepoUserPermissions", "description": "List all user permissions." } }, "/api/v1/repository/{repository}/permissions/team/": { "x-name": "endpoints.api.permission.RepositoryTeamPermissionList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "permission", "x-path": "/api/v1/repository/{repository}/permissions/team/", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "listRepoTeamPermissions", "description": "List all team permission." } }, "/api/v1/repository/{repository}/permissions/user/{username}": { "x-name": "endpoints.api.permission.RepositoryUserPermission", "parameters": [{ "description": "The username of the user to which the permission applies", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The username of the user to which the permission applies", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "getUserPermissions", "description": "Get the Fetch the permission for the specified user." }, "x-path": "/api/v1/repository/{repository}/permissions/user/{username}", "x-tag": "permission", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The username of the user to which the permission applies", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/UserPermission" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "changeUserPermissions", "description": "Update the perimssions for an existing repository." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The username of the user to which the permission applies", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "deleteUserPermissions", "description": "Delete the permission for the user." } }, "/api/v1/repository/{repository}/permissions/user/{username}/transitive": { "x-name": "endpoints.api.permission.RepositoryUserTransitivePermission", "parameters": [{ "description": "The username of the user to which the permissions apply", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "permission", "x-path": "/api/v1/repository/{repository}/permissions/user/{username}/transitive", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The username of the user to which the permissions apply", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "getUserTransitivePermission", "description": "Get the fetch the permission for the specified user." } }, "/api/v1/organization/{orgname}/prototypes": { "x-name": "endpoints.api.prototype.PermissionPrototypeList", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "tags": ["prototype"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrganizationPrototypePermissions", "description": "List the existing prototypes for this organization." }, "x-path": "/api/v1/organization/{orgname}/prototypes", "x-tag": "prototype", "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "schema": { "$ref": "#/definitions/NewPrototype" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["prototype"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "createOrganizationPrototypePermission", "description": "Create a new permission prototype." } }, "/api/v1/organization/{orgname}/prototypes/{prototypeid}": { "x-name": "endpoints.api.prototype.PermissionPrototype", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The ID of the prototype", "required": true, "type": "string", "name": "prototypeid", "in": "path" }], "x-path": "/api/v1/organization/{orgname}/prototypes/{prototypeid}", "x-tag": "prototype", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The ID of the prototype", "required": true, "type": "string", "name": "prototypeid", "in": "path" }, { "schema": { "$ref": "#/definitions/PrototypeUpdate" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["prototype"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "updateOrganizationPrototypePermission", "description": "Update the role of an existing permission prototype." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The ID of the prototype", "required": true, "type": "string", "name": "prototypeid", "in": "path" }], "tags": ["prototype"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "deleteOrganizationPrototypePermission", "description": "Delete an existing permission prototype." } }, "/api/v1/repository": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "schema": { "$ref": "#/definitions/NewRepo" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["repository"], "security": [{ "oauth2_implicit": ["repo:create"] }], "operationId": "createRepo", "description": "Create a new repository." }, "x-name": "endpoints.api.repository.RepositoryList", "x-tag": "repository", "x-path": "/api/v1/repository", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "Whether to include the repository's popularity metric.", "required": false, "type": "boolean", "name": "popularity", "in": "query" }, { "description": "Whether to include when the repository was last modified.", "required": false, "type": "boolean", "name": "last_modified", "in": "query" }, { "description": "Adds any repositories visible to the user by virtue of being public", "required": false, "type": "boolean", "name": "public", "in": "query" }, { "description": "Filters the repositories returned to those starred by the user", "required": false, "type": "boolean", "name": "starred", "in": "query" }, { "description": "Filters the repositories returned to this namespace", "required": false, "type": "string", "name": "namespace", "in": "query" }, { "description": "Limit on the number of results (int)", "required": false, "type": "integer", "name": "limit", "in": "query" }, { "description": "Offset page number. (int)", "required": false, "type": "integer", "name": "page", "in": "query" }], "tags": ["repository"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "listRepos", "description": "Fetch the list of repositories visible to the current user under a variety of situations." } }, "/api/v1/repository/{repository}/changevisibility": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/ChangeVisibility" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["repository"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "changeRepoVisibility", "description": "Change the visibility of a repository." }, "x-name": "endpoints.api.repository.RepositoryVisibility", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "repository", "x-path": "/api/v1/repository/{repository}/changevisibility" }, "/api/v1/repository/{repository}": { "x-name": "endpoints.api.repository.Repository", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repository"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getRepo", "description": "Fetch the specified repository." }, "x-path": "/api/v1/repository/{repository}", "x-tag": "repository", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/RepoUpdate" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["repository"], "security": [{ "oauth2_implicit": ["repo:write"] }], "operationId": "updateRepo", "description": "Update the description in the specified repository." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repository"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "deleteRepository", "description": "Delete a repository." } }, "/api/v1/repository/{repository}/notification/": { "x-name": "endpoints.api.repositorynotification.RepositoryNotificationList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repositorynotification"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "listRepoNotifications", "description": "List the notifications for the specified repository." }, "x-path": "/api/v1/repository/{repository}/notification/", "x-tag": "repositorynotification", "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/NotificationCreateRequest" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["repositorynotification"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "createRepoNotification", "description": "Create a new notification for the specified repository." } }, "/api/v1/repository/{repository}/notification/{uuid}/test": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The UUID of the notification", "required": true, "type": "string", "name": "uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repositorynotification"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "testRepoNotification", "description": "Queues a test notification for this repository." }, "x-name": "endpoints.api.repositorynotification.TestRepositoryNotification", "parameters": [{ "description": "The UUID of the notification", "required": true, "type": "string", "name": "uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "repositorynotification", "x-path": "/api/v1/repository/{repository}/notification/{uuid}/test" }, "/api/v1/repository/{repository}/notification/{uuid}": { "x-name": "endpoints.api.repositorynotification.RepositoryNotification", "parameters": [{ "description": "The UUID of the notification", "required": true, "type": "string", "name": "uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The UUID of the notification", "required": true, "type": "string", "name": "uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repositorynotification"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "getRepoNotification", "description": "Get information for the specified notification." }, "x-path": "/api/v1/repository/{repository}/notification/{uuid}", "x-tag": "repositorynotification", "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The UUID of the notification", "required": true, "type": "string", "name": "uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repositorynotification"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "deleteRepoNotification", "description": "Deletes the specified notification." } }, "/api/v1/repository/{repository}/tokens/": { "x-name": "endpoints.api.repotoken.RepositoryTokenList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repotoken"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "listRepoTokens", "description": "List the tokens for the specified repository." }, "x-path": "/api/v1/repository/{repository}/tokens/", "x-tag": "repotoken", "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/NewToken" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["repotoken"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "createToken", "description": "Create a new repository token." } }, "/api/v1/repository/{repository}/tokens/{code}": { "x-name": "endpoints.api.repotoken.RepositoryToken", "parameters": [{ "description": "The token code", "required": true, "type": "string", "name": "code", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The token code", "required": true, "type": "string", "name": "code", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repotoken"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "getTokens", "description": "Fetch the specified repository token information." }, "x-path": "/api/v1/repository/{repository}/tokens/{code}", "x-tag": "repotoken", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The token code", "required": true, "type": "string", "name": "code", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/TokenPermission" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["repotoken"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "changeToken", "description": "Update the permissions for the specified repository token." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The token code", "required": true, "type": "string", "name": "code", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repotoken"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "deleteToken", "description": "Delete the repository token." } }, "/api/v1/user/robots/{robot_shortname}": { "x-name": "endpoints.api.robot.UserRobot", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["robot"], "description": "Returns the user's robot with the specified name.", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "operationId": "getUserRobot" }, "x-path": "/api/v1/user/robots/{robot_shortname}", "x-tag": "robot", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["robot"], "description": "Create a new user robot with the specified name.", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "operationId": "createUserRobot" }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["robot"], "description": "Delete an existing robot.", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "operationId": "deleteUserRobot" } }, "/api/v1/user/robots": { "x-name": "endpoints.api.robot.UserRobotList", "x-tag": "robot", "x-path": "/api/v1/user/robots", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["robot"], "description": "List the available robots for the user.", "parameters": [{ "description": "Whether to include repostories and teams in which the robots have permission.", "required": false, "type": "boolean", "name": "permissions", "in": "query" }], "operationId": "getUserRobots" } }, "/api/v1/organization/{orgname}/robots/{robot_shortname}/permissions": { "x-name": "endpoints.api.robot.OrgRobotPermissions", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "x-tag": "robot", "x-path": "/api/v1/organization/{orgname}/robots/{robot_shortname}/permissions", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["robot"], "description": "Returns the list of repository permissions for the org's robot.", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "operationId": "getOrgRobotPermissions" } }, "/api/v1/organization/{orgname}/robots/{robot_shortname}/regenerate": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "tags": ["robot"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "regenerateOrgRobotToken", "description": "Regenerates the token for an organization robot." }, "x-name": "endpoints.api.robot.RegenerateOrgRobot", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "x-tag": "robot", "x-path": "/api/v1/organization/{orgname}/robots/{robot_shortname}/regenerate" }, "/api/v1/organization/{orgname}/robots": { "x-name": "endpoints.api.robot.OrgRobotList", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "x-tag": "robot", "x-path": "/api/v1/organization/{orgname}/robots", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "Whether to include repostories and teams in which the robots have permission.", "required": false, "type": "boolean", "name": "permissions", "in": "query" }], "tags": ["robot"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrgRobots", "description": "List the organization's robots." } }, "/api/v1/user/robots/{robot_shortname}/permissions": { "x-name": "endpoints.api.robot.UserRobotPermissions", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "x-tag": "robot", "x-path": "/api/v1/user/robots/{robot_shortname}/permissions", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["robot"], "description": "Returns the list of repository permissions for the user's robot.", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "operationId": "getUserRobotPermissions" } }, "/api/v1/user/robots/{robot_shortname}/regenerate": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["robot"], "description": "Regenerates the token for a user's robot.", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "operationId": "regenerateUserRobotToken" }, "x-name": "endpoints.api.robot.RegenerateUserRobot", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "x-tag": "robot", "x-path": "/api/v1/user/robots/{robot_shortname}/regenerate" }, "/api/v1/organization/{orgname}/robots/{robot_shortname}": { "x-name": "endpoints.api.robot.OrgRobot", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "tags": ["robot"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrgRobot", "description": "Returns the organization's robot with the specified name." }, "x-path": "/api/v1/organization/{orgname}/robots/{robot_shortname}", "x-tag": "robot", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "tags": ["robot"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "createOrgRobot", "description": "Create a new robot in the organization." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "tags": ["robot"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "deleteOrgRobot", "description": "Delete an existing organization robot." } }, "/api/v1/find/all": { "x-name": "endpoints.api.search.ConductSearch", "x-tag": "search", "x-path": "/api/v1/find/all", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The search query.", "required": false, "type": "string", "name": "query", "in": "query" }], "tags": ["search"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "conductSearch", "description": "Get a list of entities and resources that match the specified query." } }, "/api/v1/entities/{prefix}": { "x-name": "endpoints.api.search.EntitySearch", "x-tag": "search", "x-path": "/api/v1/entities/{prefix}", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["search"], "description": "Get a list of entities that match the specified prefix.", "parameters": [{ "description": "", "required": true, "type": "string", "name": "prefix", "in": "path" }, { "description": "Whether to include orgs names.", "required": false, "type": "boolean", "name": "includeOrgs", "in": "query" }, { "description": "Whether to include team names.", "required": false, "type": "boolean", "name": "includeTeams", "in": "query" }, { "description": "Namespace to use when querying for org entities.", "required": false, "type": "string", "name": "namespace", "in": "query" }], "operationId": "getMatchingEntities" } }, "/api/v1/repository/{repository}/image/{imageid}/packages": { "x-name": "endpoints.api.secscan.RepositoryImagePackages", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The image ID", "required": true, "type": "string", "name": "imageid", "in": "path" }], "x-tag": "secscan", "x-path": "/api/v1/repository/{repository}/image/{imageid}/packages", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The image ID", "required": true, "type": "string", "name": "imageid", "in": "path" }], "tags": ["secscan"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getRepoImagePackages", "description": "Fetches the packages added/removed in the given repo image." } }, "/api/v1/repository/{repository}/tag/{tag}/vulnerabilities": { "x-name": "endpoints.api.secscan.RepositoryTagVulnerabilities", "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "secscan", "x-path": "/api/v1/repository/{repository}/tag/{tag}/vulnerabilities", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "Minimum vulnerability priority", "required": false, "type": "string", "name": "minimumPriority", "in": "query" }], "tags": ["secscan"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getRepoTagVulnerabilities", "description": "Fetches the vulnerabilities (if any) for a repository tag." } }, "/api/v1/repository/{repository}/tag/{tag}/revert": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/RevertTag" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["tag"], "security": [{ "oauth2_implicit": ["repo:write"] }], "operationId": "revertTag", "description": "Reverts a repository tag back to a previous image in the repository." }, "x-name": "endpoints.api.tag.RevertTag", "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "tag", "x-path": "/api/v1/repository/{repository}/tag/{tag}/revert" }, "/api/v1/repository/{repository}/tag/{tag}/images": { "x-name": "endpoints.api.tag.RepositoryTagImages", "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "tag", "x-path": "/api/v1/repository/{repository}/tag/{tag}/images", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "If specified, only images wholely owned by this tag are returned.", "required": false, "type": "boolean", "name": "owned", "in": "query" }], "tags": ["tag"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "listTagImages", "description": "List the images for the specified repository tag." } }, "/api/v1/repository/{repository}/tag/{tag}": { "x-name": "endpoints.api.tag.RepositoryTag", "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-path": "/api/v1/repository/{repository}/tag/{tag}", "x-tag": "tag", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/MoveTag" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["tag"], "security": [{ "oauth2_implicit": ["repo:write"] }], "operationId": "changeTagImage", "description": "Change which image a tag points to or create a new tag." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["tag"], "security": [{ "oauth2_implicit": ["repo:write"] }], "operationId": "deleteFullTag", "description": "Delete the specified repository tag." } }, "/api/v1/repository/{repository}/tag/": { "x-name": "endpoints.api.tag.ListRepositoryTags", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "tag", "x-path": "/api/v1/repository/{repository}/tag/", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "Page index for the results. Default 1.", "required": false, "type": "integer", "name": "page", "in": "query" }, { "description": "Limit to the number of results to return per page. Max 100.", "required": false, "type": "integer", "name": "limit", "in": "query" }, { "description": "Filters the tags to the specific tag.", "required": false, "type": "string", "name": "specificTag", "in": "query" }], "tags": ["tag"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "listRepoTags", "description": "" } }, "/api/v1/organization/{orgname}/team/{teamname}/members": { "x-name": "endpoints.api.team.TeamMemberList", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }], "x-tag": "team", "x-path": "/api/v1/organization/{orgname}/team/{teamname}/members", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }, { "description": "Whether to include pending members", "required": false, "type": "boolean", "name": "includePending", "in": "query" }], "tags": ["team"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrganizationTeamMembers", "description": "Retrieve the list of members for the specified team." } }, "/api/v1/organization/{orgname}/team/{teamname}/invite/{email}": { "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "", "required": true, "type": "string", "name": "email", "in": "path" }, { "description": "", "required": true, "type": "string", "name": "teamname", "in": "path" }], "tags": ["team"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "inviteTeamMemberEmail", "description": "Invites an email address to an existing team." }, "x-name": "endpoints.api.team.InviteTeamMember", "x-tag": "team", "x-path": "/api/v1/organization/{orgname}/team/{teamname}/invite/{email}", "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "", "required": true, "type": "string", "name": "email", "in": "path" }, { "description": "", "required": true, "type": "string", "name": "teamname", "in": "path" }], "tags": ["team"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "deleteTeamMemberEmailInvite", "description": "Delete an invite of an email address to join a team." } }, "/api/v1/organization/{orgname}/team/{teamname}": { "x-name": "endpoints.api.team.OrganizationTeam", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }], "x-path": "/api/v1/organization/{orgname}/team/{teamname}", "x-tag": "team", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }, { "schema": { "$ref": "#/definitions/TeamDescription" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["team"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "updateOrganizationTeam", "description": "Update the org-wide permission for the specified team." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }], "tags": ["team"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "deleteOrganizationTeam", "description": "Delete the specified team." } }, "/api/v1/organization/{orgname}/team/{teamname}/members/{membername}": { "x-name": "endpoints.api.team.TeamMember", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The username of the team member", "required": true, "type": "string", "name": "membername", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }], "x-path": "/api/v1/organization/{orgname}/team/{teamname}/members/{membername}", "x-tag": "team", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The username of the team member", "required": true, "type": "string", "name": "membername", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }], "tags": ["team"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "updateOrganizationTeamMember", "description": "Adds or invites a member to an existing team." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The username of the team member", "required": true, "type": "string", "name": "membername", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }], "tags": ["team"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "deleteOrganizationTeamMember", "description": "Delete a member of a team. If the user is merely invited to join\n the team, then the invite is removed instead." } }, "/api/v1/repository/{repository}/trigger/": { "x-name": "endpoints.api.trigger.BuildTriggerList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "trigger", "x-path": "/api/v1/repository/{repository}/trigger/", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["trigger"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "listBuildTriggers", "description": "List the triggers for the specified repository." } }, "/api/v1/repository/{repository}/trigger/{trigger_uuid}/activate": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/BuildTriggerActivateRequest" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["trigger"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "activateBuildTrigger", "description": "Activate the specified build trigger." }, "x-name": "endpoints.api.trigger.BuildTriggerActivate", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }], "x-tag": "trigger", "x-path": "/api/v1/repository/{repository}/trigger/{trigger_uuid}/activate" }, "/api/v1/repository/{repository}/trigger/{trigger_uuid}/start": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/RunParameters" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["trigger"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "manuallyStartBuildTrigger", "description": "Manually start a build from the specified trigger." }, "x-name": "endpoints.api.trigger.ActivateBuildTrigger", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }], "x-tag": "trigger", "x-path": "/api/v1/repository/{repository}/trigger/{trigger_uuid}/start" }, "/api/v1/repository/{repository}/trigger/{trigger_uuid}/builds": { "x-name": "endpoints.api.trigger.TriggerBuildList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }], "x-tag": "trigger", "x-path": "/api/v1/repository/{repository}/trigger/{trigger_uuid}/builds", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The maximum number of builds to return", "required": false, "type": "integer", "name": "limit", "in": "query" }], "tags": ["trigger"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "listTriggerRecentBuilds", "description": "List the builds started by the specified trigger." } }, "/api/v1/repository/{repository}/trigger/{trigger_uuid}": { "x-name": "endpoints.api.trigger.BuildTrigger", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["trigger"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "getBuildTrigger", "description": "Get information for the specified build trigger." }, "x-path": "/api/v1/repository/{repository}/trigger/{trigger_uuid}", "x-tag": "trigger", "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["trigger"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "deleteBuildTrigger", "description": "Delete the specified build trigger." } }, "/api/v1/user/": { "x-name": "endpoints.api.user.User", "x-tag": "user", "x-path": "/api/v1/user/", "get": { "responses": { "200": { "description": "Successful invocation", "schema": { "$ref": "#/definitions/UserView" } }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [], "tags": ["user"], "security": [{ "oauth2_implicit": ["user:read"] }], "operationId": "getLoggedInUser", "description": "Get user information for the authenticated user." } }, "/api/v1/users/{username}": { "x-name": "endpoints.api.user.Users", "x-tag": "user", "x-path": "/api/v1/users/{username}", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["user"], "description": "Get user information for the specified user.", "parameters": [{ "description": "", "required": true, "type": "string", "name": "username", "in": "path" }], "operationId": "getUserInformation" } }, "/api/v1/user/starred": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "parameters": [{ "schema": { "$ref": "#/definitions/NewStarredRepository" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["user"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "createStar", "description": "Star a repository." }, "x-name": "endpoints.api.user.StarredRepositoryList", "x-tag": "user", "x-path": "/api/v1/user/starred", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["user"], "description": "List all starred repositories.", "parameters": [{ "description": "Limit on the number of results (int)", "required": false, "type": "integer", "name": "limit", "in": "query" }, { "description": "Offset page number. (int)", "required": false, "type": "integer", "name": "page", "in": "query" }], "operationId": "listStarredRepos" } }, "/api/v1/user/starred/{repository}": { "x-name": "endpoints.api.user.StarredRepository", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "user", "x-path": "/api/v1/user/starred/{repository}", "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["user"], "description": "Removes a star from a repository.", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "operationId": "deleteStar" } }, "/userfiles/{file_id}": { "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["userfiles"], "description": "", "parameters": [{ "description": "", "required": true, "type": "string", "name": "file_id", "in": "path" }], "operationId": "unnamed" }, "x-name": "data.userfiles.UserfilesHandlers", "x-tag": "userfiles", "x-path": "/userfiles/{file_id}", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request" } }, "tags": ["userfiles"], "description": "", "parameters": [{ "description": "", "required": true, "type": "string", "name": "file_id", "in": "path" }], "operationId": "unnamed" } } }, "host": "quay.io", "schemes": ["https"], "tags": [{ "name": "archivedlogs", "description": "" }, { "name": "billing", "description": "Billing information, subscriptions, and plan information." }, { "name": "build", "description": "Create, list, cancel and get status/logs of repository builds." }, { "name": "discovery", "description": "API discovery information." }, { "name": "image", "description": "List and lookup repository images, and download image diffs." }, { "name": "logs", "description": "Access usage logs for organizations or repositories." }, { "name": "organization", "description": "Manage organizations, members and OAuth applications." }, { "name": "permission", "description": "Manage repository permissions." }, { "name": "prototype", "description": "Manage default permissions added to repositories." }, { "name": "repository", "description": "List, create and manage repositories." }, { "name": "repositorynotification", "description": "List, create and manage repository events/notifications." }, { "name": "repotoken", "description": "Manage repository access tokens (DEPRECATED)." }, { "name": "robot", "description": "Manage user and organization robot accounts." }, { "name": "search", "description": "Conduct searches against all registry context." }, { "name": "secscan", "description": "List and manage repository vulnerabilities and other sec information." }, { "name": "tag", "description": "Manage the tags of a repository." }, { "name": "team", "description": "Create, list and manage an organization's teams." }, { "name": "trigger", "description": "Create, list and manage build triggers." }, { "name": "user", "description": "Manage the current user." }, { "name": "userfiles", "description": "" }], "definitions": { "RepositoryBuildRequest": { "type": "object", "description": "Description of a new repository build.", "properties": { "docker_tags": { "minItems": 1, "items": { "type": "string" }, "uniqueItems": true, "type": "array", "description": "The tags to which the built images will be pushed. If none specified, \"latest\" is used." }, "pull_robot": { "type": "string", "description": "Username of a Quay robot account to use as pull credentials" }, "subdirectory": { "type": "string", "description": "Subdirectory in which the Dockerfile can be found" }, "file_id": { "type": "string", "description": "The file id that was generated when the build spec was uploaded" }, "archive_url": { "type": "string", "description": "The URL of the .tar.gz to build. Must start with \"http\" or \"https\"." } } }, "NotificationCreateRequest": { "required": ["event", "method", "config"], "type": "object", "description": "Information for creating a notification on a repository", "properties": { "eventConfig": { "type": "object", "description": "JSON config information for the specific event of notification" }, "title": { "type": "string", "description": "The human-readable title of the notification" }, "config": { "type": "object", "description": "JSON config information for the specific method of notification" }, "event": { "type": "string", "description": "The event on which the notification will respond" }, "method": { "type": "string", "description": "The method of notification (such as email or web callback)" } } }, "UserPermission": { "required": ["role"], "type": "object", "description": "Description of a user permission.", "properties": { "role": { "enum": ["read", "write", "admin"], "type": "string", "description": "Role to use for the user" } } }, "NewStarredRepository": { "required": ["namespace", "repository"], "type": "object", "properties": { "namespace": { "type": "string", "description": "Namespace in which the repository belongs" }, "repository": { "type": "string", "description": "Repository name" } } }, "MoveTag": { "required": ["image"], "type": "object", "description": "Description of to which image a new or existing tag should point", "properties": { "image": { "type": "string", "description": "Image identifier to which the tag should point" } } }, "UpdateUser": { "type": "object", "description": "Fields which can be updated in a user.", "properties": { "username": { "type": "string", "description": "The user's username" }, "invoice_email": { "type": "boolean", "description": "Whether the user desires to receive an invoice email." }, "password": { "type": "string", "description": "The user's password" }, "email": { "type": "string", "description": "The user's email address" }, "tag_expiration": { "minimum": 0, "type": "integer", "maximum": 2592000 } } }, "BuildTriggerActivateRequest": { "required": ["config"], "type": "object", "properties": { "pull_robot": { "type": "string", "description": "The name of the robot that will be used to pull images." }, "config": { "type": "object", "description": "Arbitrary json." } } }, "UpdateApp": { "required": ["name", "redirect_uri", "application_uri"], "type": "object", "description": "Description of an updated application.", "properties": { "redirect_uri": { "type": "string", "description": "The URI for the application's OAuth redirect" }, "avatar_email": { "type": "string", "description": "The e-mail address of the avatar to use for the application" }, "name": { "type": "string", "description": "The name of the application" }, "application_uri": { "type": "string", "description": "The URI for the application's homepage" }, "description": { "type": "string", "description": "The human-readable description for the application" } } }, "ChangeVisibility": { "required": ["visibility"], "type": "object", "description": "Change the visibility for the repository.", "properties": { "visibility": { "enum": ["public", "private"], "type": "string", "description": "Visibility which the repository will start with" } } }, "TeamDescription": { "required": ["role"], "type": "object", "description": "Description of a team", "properties": { "role": { "enum": ["member", "creator", "admin"], "type": "string", "description": "Org wide permissions that should apply to the team" }, "description": { "type": "string", "description": "Markdown description for the team" } } }, "NewPrototype": { "required": ["role", "delegate"], "type": "object", "description": "Description of a new prototype", "properties": { "activating_user": { "required": ["name"], "type": "object", "description": "Repository creating user to whom the rule should apply", "properties": { "name": { "type": "string", "description": "The username for the activating_user" } } }, "role": { "enum": ["read", "write", "admin"], "type": "string", "description": "Role that should be applied to the delegate" }, "delegate": { "required": ["name", "kind"], "type": "object", "description": "Information about the user or team to which the rule grants access", "properties": { "kind": { "enum": ["user", "team"], "type": "string", "description": "Whether the delegate is a user or a team" }, "name": { "type": "string", "description": "The name for the delegate team or user" } } } } }, "TokenPermission": { "required": ["role"], "type": "object", "description": "Description of a token permission", "properties": { "role": { "enum": ["read", "write", "admin"], "type": "string", "description": "Role to use for the token" } } }, "RunParameters": { "additionalProperties": false, "type": "object", "description": "Optional run parameters for activating the build trigger", "properties": { "branch_name": { "type": "string", "description": "(SCM only) If specified, the name of the branch to build." }, "refs": { "type": "object", "description": "(SCM Only) If specified, the ref to build." }, "commit_sha": { "type": "string", "description": "(Custom Only) If specified, the ref/SHA1 used to checkout a git repository." } } }, "NewRepo": { "required": ["repository", "visibility", "description"], "type": "object", "description": "Description of a new repository", "properties": { "namespace": { "type": "string", "description": "Namespace in which the repository should be created. If omitted, the username of the caller is used" }, "visibility": { "enum": ["public", "private"], "type": "string", "description": "Visibility which the repository will start with" }, "repository": { "type": "string", "description": "Repository name" }, "description": { "type": "string", "description": "Markdown encoded description for the repository" } } }, "RevertTag": { "required": ["image"], "type": "object", "description": "Reverts a tag to a specific image", "properties": { "image": { "type": "string", "description": "Image identifier to which the tag should point" } } }, "UserView": { "required": ["verified", "anonymous", "avatar"], "type": "object", "description": "Describes a user", "properties": { "organizations": { "items": { "type": "object" }, "type": "array", "description": "Information about the organizations in which the user is a member" }, "verified": { "type": "boolean", "description": "Whether the user's email address has been verified" }, "avatar": { "type": "object", "description": "Avatar data representing the user's icon" }, "anonymous": { "type": "boolean", "description": "true if this user data represents a guest user" }, "logins": { "items": { "type": "object" }, "type": "array", "description": "The list of external login providers against which the user has authenticated" }, "can_create_repo": { "type": "boolean", "description": "Whether the user has permission to create repositories" }, "preferred_namespace": { "type": "boolean", "description": "If true, the user's namespace is the preferred namespace to display" }, "email": { "type": "string", "description": "The user's email address" } } }, "NewApp": { "required": ["name"], "type": "object", "description": "Description of a new organization application.", "properties": { "redirect_uri": { "type": "string", "description": "The URI for the application's OAuth redirect" }, "avatar_email": { "type": "string", "description": "The e-mail address of the avatar to use for the application" }, "name": { "type": "string", "description": "The name of the application" }, "application_uri": { "type": "string", "description": "The URI for the application's homepage" }, "description": { "type": "string", "description": "The human-readable description for the application" } } }, "UpdateOrg": { "type": "object", "description": "Description of updates for an existing organization", "properties": { "invoice_email": { "type": "boolean", "description": "Whether the organization desires to receive emails for invoices" }, "email": { "type": "string", "description": "Organization contact email" }, "tag_expiration": { "minimum": 0, "type": "integer", "maximum": 2592000 } } }, "NewToken": { "required": ["friendlyName"], "type": "object", "description": "Description of a new token.", "properties": { "friendlyName": { "type": "string", "description": "Friendly name to help identify the token" } } }, "NewUser": { "required": ["username", "password", "email"], "type": "object", "description": "Fields which must be specified for a new user.", "properties": { "username": { "type": "string", "description": "The user's username" }, "password": { "type": "string", "description": "The user's password" }, "email": { "type": "string", "description": "The user's email address" }, "invite_code": { "type": "string", "description": "The optional invite code" } } }, "RepoUpdate": { "required": ["description"], "type": "object", "description": "Fields which can be updated in a repository.", "properties": { "description": { "type": "string", "description": "Markdown encoded description for the repository" } } }, "PrototypeUpdate": { "required": ["role"], "type": "object", "description": "Description of a the new prototype role", "properties": { "role": { "enum": ["read", "write", "admin"], "type": "string", "description": "Role that should be applied to the permission" } } }, "TeamPermission": { "required": ["role"], "type": "object", "description": "Description of a team permission.", "properties": { "role": { "enum": ["read", "write", "admin"], "type": "string", "description": "Role to use for the team" } } } }, "basePath": "/", "swagger": "2.0", "securityDefinitions": { "oauth2_implicit": { "flow": "implicit", "type": "oauth2", "authorizationUrl": "https://quay.io/oauth/authorize", "scopes": { "repo:write": "This application will be able to view, push and pull to all repositories to which the granting user or robot account has write access", "repo:read": "This application will be able to view and pull all repositories visible to the granting user or robot account", "repo:create": "This application will be able to create repositories in to any namespaces that the granting user or robot account is allowed to create repositories", "repo:admin": "This application will have administrator access to all repositories to which the granting user or robot account has access", "org:admin": "This application will be able to administer your organizations including creating robots, creating teams, adjusting team membership, and changing billing settings. You should have absolute trust in the requesting application before granting this permission.", "user:read": "This application will be able to read user information such as username and email address." } } } } validate-0.24.0/fixtures/go-swagger/bugs/106/000077500000000000000000000000001457312750000205535ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/106/swagger.json000066400000000000000000000050361457312750000231110ustar00rootroot00000000000000{ "basePath": "/RestAPI", "definitions": { "SubscriptionCharge": { "description": "Represents a monetary amount — or quantity consumed — attributed to some invoice or subscription.", "properties": { "created": { "description": "{ \"description\" : \"The UTC DateTime when the object was created.\", \"verbs\":[] }", "format": "date-time", "type": "string" } }, "required": [ "chargeType", "invoicingType", "remainingCreditBehaviour", "state", "type", "versionNumber" ], "type": "object", "xml": { "name": "subscriptionCharge" } } }, "host": "localhost:8089", "info": { "title": "BillForward REST API", "version": "1.0.0" }, "paths": { "/account/{account-ID}": { "get": { "consumes": [ "text/plain" ], "description": "{\"nickname\":\"Retrieve by account\",\"response\":\"getChargeByAccount.html\"}", "operationId": "getByAccountID", "parameters": [ { "collectionFormat": "multi", "description": "A list of organization-IDs used to restrict the scope of API calls.", "in": "query", "items": { "type": "string" }, "name": "organizations", "required": false, "type": "array" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "successful operation", "schema": { "$ref": "#/definitions/SubscriptionCharge" } } }, "summary": "Retrieves a collection of charges, specified by the account-ID parameter. By default 10 values are returned. Records are returned in natural order.", "tags": [ "charges" ] } } }, "schemes": [ "http" ], "swagger": "2.0", "tags": [] } validate-0.24.0/fixtures/go-swagger/bugs/1111/000077500000000000000000000000001457312750000206305ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/1111/arrayParam.json000066400000000000000000000030141457312750000236200ustar00rootroot00000000000000{ "swagger": "2.0", "host": "localhost", "info": { "description": "", "version": "", "title": "", "termsOfService": "" }, "basePath": "/api/v1/", "paths": { "/clusters/elasticsearch/{cluster_id}/instances/{instance_ids}/_start": { "post": { "operationId": "start-es-cluster-instances", "parameters": [ { "name": "cluster_id", "in": "path", "description": "Identifier for the Elasticsearch cluster", "required": true, "type": "string" }, { "name": "instance_ids", "in": "path", "description": "Optional comma-delimited list of instance identifiers of the Elasticsearch cluster, otherwise will apply to all instances", "required": true, "type": "array", "items": { "type": "string" }, "collectionFormat": "csv" } ], "responses": { "202": { "description": "The start command was issued successfully, use the \"GET\" command on the /{cluster_id} resource to monitor progress" } } } } } } validate-0.24.0/fixtures/go-swagger/bugs/1171/000077500000000000000000000000001457312750000206365ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/1171/swagger.yaml000066400000000000000000000024061457312750000231630ustar00rootroot00000000000000# In this one we make sure arrays without items are detected by validation # Conversely, objects with items are detected with fixture for issue #1238 swagger: '2.0' info: title: issue-1171 version: 0.0.1 license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: '/servers/{server_id}/zones': get: operationId: listZones tags: - zones parameters: - name: server_id in: path required: true type: string responses: '200': description: An array of Zones schema: $ref: '#/definitions/Zones' '/servers/{server_id}/zones/{zone_id}': get: operationId: listZone tags: - zones parameters: - name: server_id in: path required: true type: string - name: zone_id type: string in: path required: true responses: '200': description: A Zone schema: $ref: '#/definitions/Zone' definitions: Zones: type: array properties: name: type: string Zone: type: array items: name: type: string validate-0.24.0/fixtures/go-swagger/bugs/1199/000077500000000000000000000000001457312750000206505ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/1199/nonEmptyBody.json000066400000000000000000000067011457312750000241760ustar00rootroot00000000000000{ "swagger": "2.0", "host": "localhost", "info": { "description": "", "version": "", "title": "", "termsOfService": "" }, "basePath": "/api/v1/", "paths": { "/platform/infrastructure/allocators/{allocator_id}/clusters/_move": { "post": { "summary": "Move clusters", "description": "Moves clusters.", "operationId": "move-clusters", "parameters": [ { "in": "body", "name": "body", "description": "Overrides defaults for the move of each cluster", "required": false, "schema": { "$ref": "#/definitions/MoveClustersRequest" } }, { "name": "allocator_id", "in": "path", "description": "The identifier of the allocator of which to move clusters.", "required": true, "type": "string" } ], "responses": { "202": { "description": "response" } } } } }, "definitions": { "MoveElasticsearchClusterConfiguration": { "type": "object", "required": [ "cluster_ids" ], "properties": { "cluster_ids": { "type": "array", "description": "Identifiers for the Elasticsearch clusters.", "items": { "type": "string" } } }, "description": "Configuration object for moving Elasticsearch clusters." }, "MoveKibanaClusterConfiguration": { "type": "object", "required": [ "cluster_ids" ], "properties": { "cluster_ids": { "type": "array", "description": "Identifiers for the Kibana clusters.", "items": { "type": "string" } } }, "description": "Configuration object for moving Kibana clusters." }, "MoveClustersRequest": { "type": "object", "properties": { "elasticsearch_clusters": { "type": "array", "description": "Optional list of Elasticsearch clusters to move off the allocator. If not specified, then all Elasticsearch clusters on the allocator are moved.", "items": { "$ref": "#/definitions/MoveElasticsearchClusterConfiguration" } }, "kibana_clusters": { "type": "array", "description": "Optional list of Kibana clusters to move off the allocator. If not specified, then all Kibana clusters on the allocator are moved.", "items": { "$ref": "#/definitions/MoveKibanaClusterConfiguration" } } }, "description": "Configuration for moving clusters off an allocator" } } } validate-0.24.0/fixtures/go-swagger/bugs/1216/000077500000000000000000000000001457312750000206365ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/1216/swagger.yml000066400000000000000000000014121457312750000230160ustar00rootroot00000000000000swagger: '2.0' info: version: 0.0.0 title: 'Test' definitions: Test.Pet_Dog: allOf: - $ref: '#/definitions/Test.Pet' - required: - name - barks type: object properties: name: type: string barks: type: boolean type: object Test.Pet_Cat: allOf: - $ref: '#/definitions/Test.Pet' - required: - name - evil type: object properties: name: type: string evil: type: boolean type: object Test.Pet: required: - discriminator discriminator: discriminator type: object properties: discriminator: type: string paths: /: get: responses: 200: description: Dummy path validate-0.24.0/fixtures/go-swagger/bugs/1238/000077500000000000000000000000001457312750000206425ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/1238/swagger.yaml000066400000000000000000000027111457312750000231660ustar00rootroot00000000000000# This spec should be correctly detected as invalid swagger: '2.0' info: title: issue-1238 version: 0.0.1 license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: '/servers/{server_id}/zones': get: operationId: listZones tags: - zones parameters: - name: server_id in: path required: true type: string responses: '200': description: An array of Zones schema: $ref: '#/definitions/Zones' '/servers/{server_id}/zones/{zone_id}': get: operationId: listZone tags: - zones parameters: - name: server_id in: path required: true type: string - name: zone_id type: string in: path required: true responses: '200': description: A Zone schema: $ref: '#/definitions/Zone' definitions: Zones: type: array items: $ref: '#/definitions/Zone' Zone: type: object properties: name: type: string RR: $ref: '#/definitions/RRSets' RRSets: # Declaring items for an object should be correctly assessed as invalid and not trigger a panic (issue#1238) type: object items: $ref: '#/definitions/RRSet' RRSet: properties: name: type: string validate-0.24.0/fixtures/go-swagger/bugs/1289/000077500000000000000000000000001457312750000206505ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/1289/fixture-1289-2.yaml000066400000000000000000000011661457312750000237660ustar00rootroot00000000000000swagger: '2.0' info: title: issue-1289 version: '1.0' license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /servers/getSomeIds: get: operationId: getSomeIdsOps parameters: - name: getSomeIds in: body required: true schema: type: object properties: someIds: $ref: '#/definitions/someIds' type: array responses: '200': definitions: someIds: type: array items: type: number validate-0.24.0/fixtures/go-swagger/bugs/1289/fixture-1289-3.yaml000066400000000000000000000010601457312750000237600ustar00rootroot00000000000000swagger: '2.0' info: title: issue-1289 version: '1.0' license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /getSomeIds: get: operationId: getSomeIdsOps parameters: - name: getSomeIds in: body required: true schema: type: object properties: someIds: type: array items: type: number responses: '200': validate-0.24.0/fixtures/go-swagger/bugs/1289/fixture-1289-4.yaml000066400000000000000000000011201457312750000237560ustar00rootroot00000000000000swagger: '2.0' info: title: issue-1289 version: '1.0' license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /getSomeIds: get: operationId: getSomeIdsOps parameters: - name: getSomeIds in: body required: true schema: type: object properties: someIds: $ref: '#/definitions/idList' responses: '200': definitions: idList: type: array items: type: number validate-0.24.0/fixtures/go-swagger/bugs/1289/fixture-1289.yaml000066400000000000000000000013341457312750000236240ustar00rootroot00000000000000swagger: '2.0' info: title: issue-1289 version: '1.0' license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /servers/getSomeIds: get: operationId: getSomeIdsOps parameters: - name: getSomeIds in: body required: true schema: type: object properties: someIds: $ref: '#/definitions/someIds' type: array responses: '200': definitions: someIds: type: array example: - 413, - 231, - 777 default: - 413, - 231, - 777 items: type: number validate-0.24.0/fixtures/go-swagger/bugs/155/000077500000000000000000000000001457312750000205575ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/155/swagger.yml000066400000000000000000000015541457312750000227460ustar00rootroot00000000000000swagger: '2.0' info: version: '2.0' title: Test API basePath: /api/2.0/ schemes: - https consumes: - application/json produces: - application/json paths: '/sample/action/do-something': post: operationId: sampleDoSomethingAction parameters: - name: json body in: body required: true schema: $ref: "#/definitions/Actions_DoSomethingRequest" responses: '200': description: Success schema: $ref: '#/definitions/Actions_DoSomethingResponse' '401': description: Unauthorized '404': description: Not Found definitions: Actions_DoSomethingRequest: type: object properties: client_id: type: string Actions_DoSomethingResponse: type: object properties: result: type: string validate-0.24.0/fixtures/go-swagger/bugs/162/000077500000000000000000000000001457312750000205555ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/162/swagger.yml000066400000000000000000000021231457312750000227350ustar00rootroot00000000000000swagger: '2.0' info: version: '2' title: Server Rest API basePath: /rest/api/2/ schemes: - https consumes: - application/json produces: - application/json paths: '/search': get: operationId: getSearch parameters: - name: jql type: string in: query required: true responses: '200': description: Success schema: $ref: '#/definitions/SearchResponse' definitions: NotFound: type: object SearchResponse: type: object properties: issue: $ref: '#/definitions/Issue' Issue: type: object properties: assignee: $ref: '#/definitions/User' # Basic things User: type: object properties: key: type: string description: e.g. ldap username avatarUrls: $ref: '#/definitions/AvatarUrls' # this is what jira uses AvatarUrls: type: object properties: '48x48': type: string '32x32': type: string '24x24': type: string '16x16': type: string validate-0.24.0/fixtures/go-swagger/bugs/163/000077500000000000000000000000001457312750000205565ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/163/swagger.yml000066400000000000000000000031751457312750000227460ustar00rootroot00000000000000swagger: '2.0' info: version: '2' title: Server Rest API basePath: /rest/api/2/ schemes: - https consumes: - application/json produces: - application/json paths: '/search': get: operationId: getSearch # Per docs: https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#parameterObject # Required. The type of the parameter. Since the parameter is not located at the request body, it is limited to simple types (that is, not an object). The value MUST be one of "string", "number", "integer", "boolean", "array" or "file". parameters: - name: stringTypeInQuery type: string in: query default: "qsValue" - name: numberTypeInQuery type: number in: query - name: integerTypeInQuery type: integer in: query - name: booleanTypeInQuery type: boolean in: query - name: stringArrayTypeInQuery type: array items: type: string in: query - name: numberArrayTypeInQuery type: array items: type: string in: query - name: integerArrayTypeInQuery type: array items: type: string in: query - name: booleanArrayTypeInQuery type: array items: type: string in: query responses: '200': description: Success schema: $ref: '#/definitions/SearchResponse' definitions: SearchResponse: type: object properties: message: type: string validate-0.24.0/fixtures/go-swagger/bugs/193/000077500000000000000000000000001457312750000205615ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/193/spec1.json000066400000000000000000000015441457312750000224730ustar00rootroot00000000000000{ "consumes": [ "application/json", "application/x-www-form-urlencoded" ], "paths": { "/testing": { "put": { "operationId": "putTesting", "parameters": [ { "format": "date", "in": "formData", "name": "testingThis", "type": "string" } ], "responses": { "200": { "description": "Success message" } } } } }, "produces": [ "application/json", "application/json; charset=utf-8" ], "swagger": "2.0", "info": { "title": "test formats for form params", "version": "0.0.0" } } validate-0.24.0/fixtures/go-swagger/bugs/193/spec2.json000066400000000000000000000015651457312750000224770ustar00rootroot00000000000000{ "consumes": [ "application/json", "application/x-www-form-urlencoded" ], "paths": { "/testing": { "put": { "operationId": "putTesting", "parameters": [ { "in": "formData", "items": { "format": "date", "type": "string" }, "name": "testingThis", "type": "array" } ], "responses": { "200": { "description": "Success message" } } } } }, "produces": [ "application/json", "application/json; charset=utf-8" ], "swagger": "2.0" } validate-0.24.0/fixtures/go-swagger/bugs/195/000077500000000000000000000000001457312750000205635ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/195/swagger.json000066400000000000000000000014701457312750000231170ustar00rootroot00000000000000{ "consumes": [ "application/json", "application/x-www-form-urlencoded" ], "paths": { "/testing": { "get": { "operationId": "getTesting", "parameters": [ { "allowEmptyValue": false, "in": "query", "name": "testingThis", "required": false, "type": "integer" } ], "responses": { "200": { "description": "Success message" } } } } }, "produces": [ "application/json", "application/json; charset=utf-8" ], "swagger": "2.0" } validate-0.24.0/fixtures/go-swagger/bugs/196/000077500000000000000000000000001457312750000205645ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/196/swagger.yml000066400000000000000000000012171457312750000227470ustar00rootroot00000000000000swagger: '2.0' info: title: Validation Issue description: Endpoints version: 0.0.1 basePath: /v1 consumes: - application/json produces: - application/json paths: /events: post: operationId: postEvents parameters: - name: event in: body description: Event to post required: true schema: $ref: '#/definitions/Event' responses: '201': $ref: '#/responses/CreatedEventResponse' definitions: Event: type: string responses: CreatedEventResponse: description: Successfully created an event schema: $ref: '#/definitions/Event' validate-0.24.0/fixtures/go-swagger/bugs/217/000077500000000000000000000000001457312750000205565ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/217/array.yml000066400000000000000000000006421457312750000224210ustar00rootroot00000000000000swagger: '2.0' info: version: 1.0.0 title: 'array-body-api' paths: /echo: post: operationId: "postEcho" summary: Post an object parameters: - name: body in: body description: this argument is a string array schema: type: array items: type: string responses: '200': description: All is good validate-0.24.0/fixtures/go-swagger/bugs/217/interface.yml000066400000000000000000000005611457312750000232430ustar00rootroot00000000000000swagger: '2.0' info: version: 1.0.0 title: 'string-body-api' paths: /echo: post: operationId: "postEcho" summary: Post an object parameters: - name: body in: body description: this argument is a string schema: type: object responses: '200': description: All is good validate-0.24.0/fixtures/go-swagger/bugs/217/map.yml000066400000000000000000000007121457312750000220560ustar00rootroot00000000000000swagger: '2.0' info: version: 1.0.0 title: 'string-body-api' paths: /echo: post: operationId: "postEcho" summary: Post an object parameters: - name: body in: body description: this argument is a string schema: type: object additionalProperties: type: integer format: int64 responses: '200': description: All is good validate-0.24.0/fixtures/go-swagger/bugs/217/string.yml000066400000000000000000000007101457312750000226050ustar00rootroot00000000000000swagger: '2.0' info: version: 1.0.0 title: 'string-body-api' paths: /echo: post: operationId: "postEcho" summary: Post a string, get the same string back. parameters: - name: body in: body description: this argument is a string schema: type: string responses: '200': description: this return value is a string schema: type: string validate-0.24.0/fixtures/go-swagger/bugs/248/000077500000000000000000000000001457312750000205625ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/248/swagger.json000066400000000000000000000012041457312750000231110ustar00rootroot00000000000000{ "paths": { "/thing": { "post": { "summary": "SomePost", "description": "", "parameters": [{ "name": "optional_query_enum", "enum": [ "OPTIONAL_ONE", "OPTIONAL_TWO" ], "required": false, "type": "string", "in": "query" }], "operationId": "CreateThing" } } }, "host": "connect.squareup.com", "schemes": ["https"], "produces": ["application/json"], "swagger": "2.0", "definitions": {}, "consumes": ["application/json"], "info": { "title": "Test API", "version": "1.23" } } validate-0.24.0/fixtures/go-swagger/bugs/249/000077500000000000000000000000001457312750000205635ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/249/swagger.json000066400000000000000000000012251457312750000231150ustar00rootroot00000000000000{ "consumes": [ "application/json", "application/x-www-form-urlencoded" ], "paths": { "/testing": { "put": { "operationId": "putTesting", "parameters": [{ "in": "body", "name": "testingThis", "schema": { "items": { "format": "int64", "type": "integer" }, "type": "array" } }], "responses": { "200": { "description": "Success message" } } } } }, "produces": [ "application/json", "application/json; charset=utf-8" ], "swagger": "2.0" } validate-0.24.0/fixtures/go-swagger/bugs/251/000077500000000000000000000000001457312750000205545ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/251/swagger.yml000066400000000000000000000010651457312750000227400ustar00rootroot00000000000000swagger: '2.0' info: version: 1.0.0 title: 'Test' schemes: - http produces: - application/json consumes: - application/json paths: /key/{id}: delete: parameters: - name: id in: path type: integer required: true responses: '200': description: OK definitions: example: type: object required: - begin properties: begin: type: string format: date-time end: type: string format: date-time name: type: string validate-0.24.0/fixtures/go-swagger/bugs/252/000077500000000000000000000000001457312750000205555ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/252/swagger.json000066400000000000000000000024601457312750000231110ustar00rootroot00000000000000{ "host": "localhost", "schemes": ["https"], "swagger": "2.0", "produces": ["application/json"], "consumes": ["application/json"], "info": { "title": "Soda Booth", "version": "2.0" }, "paths": { "/v2/locations/{location_id}/transactions": { "get": { "summary": "Sodas", "tags": ["Sodas"], "description": "Lists sodas for a particular location.", "parameters": [{ "name": "Authorization", "required": true, "type": "string", "in": "header" }, { "name": "location_id", "required": true, "type": "string", "in": "path" }], "responses": { "200": { "schema": { "$ref": "#/definitions/SodaResponse" }, "description": "Success" } }, "operationId": "List" } } }, "definitions": { "SodaBrand": { "description": "", "enum": [ "OTHER_BRAND", "PEPSI", "COKE", "CACTUS_COOLER", "JOLT" ], "type": "string" }, "SodaResponse": { "description": "", "properties": { "soda_brand": { "$ref": "#/definitions/SodaBrand" } }, "type": "object" } } } validate-0.24.0/fixtures/go-swagger/bugs/287/000077500000000000000000000000001457312750000205655ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/287/swagger.yml000066400000000000000000000011061457312750000227450ustar00rootroot00000000000000swagger: '2.0' info: version: 1.0.0 title: 'Test' schemes: - http produces: - application/json - "text/plain" consumes: - application/json paths: /key/{id}: delete: parameters: - name: id in: path type: integer required: true responses: '200': description: OK definitions: example: type: object required: - begin properties: begin: type: string format: date-time end: type: string format: date-time name: type: string validate-0.24.0/fixtures/go-swagger/bugs/319/000077500000000000000000000000001457312750000205615ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/319/swagger.yml000066400000000000000000000014521457312750000227450ustar00rootroot00000000000000info: description: a spec for issue 319 on github title: bug 319 version: 1.0.0 paths: {} consumes: - application/json produces: - application/json schemes: - http swagger: "2.0" definitions: Base: description: Base class discriminator: dType properties: dType: type: string description: discriminating type required: - dType Derived: description: Derived class allOf: - "$ref": "#/definitions/Base" - required: - name properties: name: type: string description: name of the property Container: description: Container type properties: mapNoWorky: type: object additionalProperties: $ref: "#/definitions/Base" required: - mapNoWorky validate-0.24.0/fixtures/go-swagger/bugs/342/000077500000000000000000000000001457312750000205555ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/342/fixture-342-2.yaml000066400000000000000000000006731457312750000236020ustar00rootroot00000000000000swagger: '2.0' info: title: issue-342 version: 0.0.1 license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /get_main_object: get: tags: - maindata parameters: $ref: "#/parameters/sid" responses: '200': parameters: sid: in: query required: true type: integer format: int64 validate-0.24.0/fixtures/go-swagger/bugs/342/fixture-342-3.yaml000066400000000000000000000007131457312750000235760ustar00rootroot00000000000000swagger: '2.0' info: title: issue-342 version: 0.0.1 license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /get_main_object: get: tags: - maindata parameters: - $ref: "#/parameters/sid" responses: '200': parameters: sid: name: sid in: query required: true type: integer format: int64 validate-0.24.0/fixtures/go-swagger/bugs/342/fixture-342.yaml000066400000000000000000000010321457312750000234310ustar00rootroot00000000000000swagger: '2.0' info: title: issue-342 version: 0.0.1 license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /get_main_object: get: tags: - maindata parameters: - name: sid in: body required: true $ref: "#/definitions/sample_info/properties/sid" responses: '200': definitions: sample_info: type: object properties: sid: type: string validate-0.24.0/fixtures/go-swagger/bugs/423/000077500000000000000000000000001457312750000205555ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/423/swagger.json000066400000000000000000000044551457312750000231170ustar00rootroot00000000000000{ "host": "localhost", "schemes": [ "https" ], "swagger": "2.0", "produces": [ "application/json" ], "consumes": [ "application/json" ], "info": { "title": "Soda Booth", "version": "2.0" }, "paths": {}, "definitions": { "SRN": { "type": "object", "required": [ "id", "service_ip", "storage_ip", "local_storage_ip", "service_port", "hb_port", "site", "disks" ], "properties": { "id": { "type": "string" }, "service_ip": { "type": "string" }, "storage_ip": { "type": "string" }, "local_storage_ip": { "type": "string" }, "service_port": { "type": "integer", "format": "int32" }, "hb_port": { "type": "integer", "format": "int32" }, "site": { "$ref": "#/definitions/Site" } } }, "Site": { "type": "object", "discriminator": "site_type", "required": [ "name", "site_type", "username", "password" ], "properties": { "name": { "type": "string" }, "site_type": { "type": "string" }, "username": { "type": "string" }, "password": { "type": "string" } } }, "SiteVMWARE": { "description": "A Site located in a VMWARE environment", "allOf": [ { "$ref": "#/definitions/Site" }, { "type": "object", "required": [ "server" ], "properties": { "server": { "type": "string" } } } ] }, "SiteCLC": { "description": "A Site located in a CLC environment", "allOf": [ { "$ref": "#/definitions/Site" }, { "type": "object", "required": [ "account", "location" ], "properties": { "account": { "type": "string" }, "location": { "type": "string" } } } ] } } } validate-0.24.0/fixtures/go-swagger/bugs/436/000077500000000000000000000000001457312750000205615ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/436/swagger.yml000066400000000000000000000016541457312750000227510ustar00rootroot00000000000000swagger: "2.0" info: title: Discriminator description: Discriminator bug example version: 0.0.1 schemes: - http consumes: - application/json produces: - application/json paths: /image: get: operationId: image summary: get image responses: 200: description: image schema: $ref: "#/definitions/Image" definitions: Links: type: array items: type: string Image: description: An image of an application and revision allOf: - $ref: '#/definitions/Links' type: object properties: created: description: The timestamp the image was created type: string format: date-time size: description: The size of the image, in bytes type: integer imageId: description: The docker image id SHA type: string required: - created - size - imageId validate-0.24.0/fixtures/go-swagger/bugs/453/000077500000000000000000000000001457312750000205605ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/453/swagger.yml000066400000000000000000000021361457312750000227440ustar00rootroot00000000000000swagger: '2.0' info: version: 1.0.0 title: 'Test' schemes: - http basePath: /v1/fancyAPI produces: - application/json consumes: - application/json definitions: in_object: type: object required: [test_id1, test_id2] properties: test_id1: type: integer test_id2: type: integer other_obj: type: object required: [type] discriminator: type additionalProperties: true description: some desc properties: type: type: string out_obj: allOf: - $ref: "#/definitions/other_obj" - type: object additionalProperties: true properties: fld1: type: integer minimum: 0 maximim: 100 fld2: $ref: "#/definitions/in_object" fld3: $ref: "#/definitions/in_object" fld5: $ref: "#/definitions/other_obj" paths: '/key/{id}': delete: parameters: - name: id in: path type: integer required: true responses: '200': description: OK validate-0.24.0/fixtures/go-swagger/bugs/454/000077500000000000000000000000001457312750000205615ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/454/swagger.yml000066400000000000000000000013221457312750000227410ustar00rootroot00000000000000swagger: '2.0' info: version: "1.0.0" title: Private to-do list description: | A very simple api description that makes a json only API to submit to do's. produces: - application/json consumes: - application/json paths: /models: get: operationId: modelOp summary: many model variations description: Used to see if a codegen can render all the possible parameter variations for a header param tags: - testcgen responses: default: description: Generic Out definitions: genericResource: description: generic resource properties: meta: type: string required: - meta additionalProperties: type: object validate-0.24.0/fixtures/go-swagger/bugs/455/000077500000000000000000000000001457312750000205625ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/455/swagger.yml000066400000000000000000000014101457312750000227400ustar00rootroot00000000000000swagger: '2.0' info: version: 1.0.0 title: 'Test' schemes: - http basePath: /v1/fancyAPI produces: - application/json consumes: - application/json definitions: in_object: type: object required: [test_id1, test_id2] properties: test_id1: type: integer test_id2: type: integer out_obj: type: object required: [fld1, fld2] properties: fld1: type: integer minimum: 0 maximim: 100 fld2: $ref: "#/definitions/in_object" fld3: $ref: "#/definitions/in_object" paths: '/key/{id}': delete: parameters: - name: id in: path type: integer required: true responses: '200': description: OK validate-0.24.0/fixtures/go-swagger/bugs/465/000077500000000000000000000000001457312750000205635ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/465/swagger.yml000066400000000000000000000005401457312750000227440ustar00rootroot00000000000000swagger: '2.0' info: version: 1.0.0 title: 'Test' schemes: - http basePath: /v1/fancyAPI produces: - application/json consumes: - application/json paths: /key/{id}: delete: parameters: - name: id in: path type: integer required: true responses: '200': description: OK validate-0.24.0/fixtures/go-swagger/bugs/500/000077500000000000000000000000001457312750000205515ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/500/swagger.yml000066400000000000000000000014361457312750000227370ustar00rootroot00000000000000swagger: '2.0' info: version: 1.0.0 title: Test description: "Test" termsOfService: 'test.com/' host: api.test.com basePath: /v1 schemes: - https consumes: - application/json produces: - application/json paths: /payment/{invoice_id}/payments/{payment_id}: get: description: Get payment info tags: - Invoices - Payments - Drama - Failure - HotMess operationId: getPaymentByID parameters: - name: invoice_id in: path description: Invoice ID required: true type: string - name: payment_id in: path description: Payment ID required: true type: string responses: '200': description: Simple response validate-0.24.0/fixtures/go-swagger/bugs/511/000077500000000000000000000000001457312750000205535ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/511/swagger.yml000066400000000000000000000020711457312750000227350ustar00rootroot00000000000000swagger: '2.0' info: title: MyAPI description: some description version: "1.0.0" schemes: - http basePath: /v1 consumes: - application/json produces: - application/json paths: /models: post: operationId: postModels summary: creates a new model description: | Creates a model..... tags: - Deployment consumes: - multipart/form-data parameters: - name: slugFile in: formData description: Payload with the model configuration. required: true type: file responses: 201: description: Model successfully accepted. headers: Location: description: Location header for the model type: string default: description: Unexpected error schema: $ref: '#/definitions/Error' definitions: Error: type: object properties: code: type: integer format: int32 message: type: string fields: type: string validate-0.24.0/fixtures/go-swagger/bugs/524/000077500000000000000000000000001457312750000205575ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/524/swagger.yml000066400000000000000000000007441457312750000227460ustar00rootroot00000000000000swagger: '2.0' definitions: m1: type: object required: ['f1'] properties: f1: type: string minLength: 1 maxLength: 2 f2: type: array minItems: 1 maxItems: 10 items: $ref: "#/definitions/m2" m2: type: object required: ['k1'] properties: k1: type: string minLength: 1 maxLength: 2 info: description: test title: test version: 1.1.0 paths: {} validate-0.24.0/fixtures/go-swagger/bugs/540/000077500000000000000000000000001457312750000205555ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/540/swagger.yml000066400000000000000000000042041457312750000227370ustar00rootroot00000000000000swagger: '2.0' info: title: Pet Testing version: 1.0.0 host: 'localhost:8080' basePath: /v1 schemes: - http consumes: - application/json produces: - application/json paths: /Pets: get: description: | Returns list of all pets. responses: '200': description: Array of pets schema: type: array items: $ref: '#/definitions/Pet' default: description: Unexpected error schema: $ref: '#/definitions/Error' post: operationId: postPet description: | Adds a new pet. parameters: - name: pet in: body description: Pet to add. required: true schema: $ref: '#/definitions/Pet' responses: '200': description: Pet added schema: $ref: '#/definitions/Pet' default: description: Unexpected error schema: $ref: '#/definitions/Error' definitions: Pet: type: object discriminator: petType properties: name: type: string petType: type: string required: - name - petType Cat: description: A representation of a cat allOf: - $ref: '#/definitions/Pet' - type: object properties: huntingSkill: type: string description: The measured skill for hunting default: lazy enum: - clueless - lazy - adventurous - aggressive required: - huntingSkill Goat: description: A representation of a goat allOf: - $ref: '#/definitions/Pet' - type: object properties: herdSize: type: integer format: int32 description: the size of the herd the goat is from default: 0 minimum: 0 required: - herdSize Error: type: object properties: code: type: integer format: int32 message: type: string fields: type: string validate-0.24.0/fixtures/go-swagger/bugs/541/000077500000000000000000000000001457312750000205565ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/541/swagger.json000066400000000000000000000057071457312750000231210ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "title": "Pet Testing", "version": "1.0.0" }, "host": "localhost:8080", "basePath": "/v1", "schemes": [ "http" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/Pets": { "get": { "description": "Returns list of all pets.\n", "responses": { "200": { "description": "Array of pets", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } } }, "definitions": { "Pet": { "type": "object", "discriminator": "petType", "properties": { "name": { "type": "string" }, "petType": { "type": "string" } }, "required": [ "name", "petType" ] }, "Cat": { "description": "A representation of a cat", "allOf": [ { "$ref": "#/definitions/Pet" }, { "type": "object", "properties": { "huntingSkill": { "type": "string", "description": "The measured skill for hunting", "default": "lazy", "enum": [ "clueless", "lazy", "adventurous", "aggressive" ] } }, "required": [ "huntingSkill" ] } ] }, "Lion": { "description": "A particular type of a cat", "allOf": [ { "$ref": "#/definitions/Cat" } ] }, "Error": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" }, "fields": { "type": "string" } } } } } validate-0.24.0/fixtures/go-swagger/bugs/628/000077500000000000000000000000001457312750000205645ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/628/swagger.yml000066400000000000000000000027461457312750000227570ustar00rootroot00000000000000swagger: '2.0' info: version: "1.0.0" title: Private to-do list description: | A very simple api description that makes a json only API to submit to do's. produces: - application/json consumes: - application/json paths: /collection: get: operationId: collection parameters: - name: "workspace_id" in: "query" required: true type: "array" items: type: "string" format: "uuid" responses: '200': description: returns single item headers: 'X-Request-Id': required: true type: "array" items: type: "string" format: "uuid" /single: get: operationId: single parameters: - name: "workspace_id" in: "query" required: true type: "string" format: "uuid" responses: '200': description: returns single item headers: 'X-Request-Id': type: string required: true format: uuid /{id}: get: operationId: details parameters: - name: "id" in: "path" required: true type: "string" format: "uuid" definitions: genericResource: description: generic resource properties: meta: type: string required: - meta additionalProperties: type: object validate-0.24.0/fixtures/go-swagger/bugs/727/000077500000000000000000000000001457312750000205645ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/727/swagger.json000066400000000000000000001516401457312750000231250ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "v3", "title": "Microsoft Bot Connector API - v3.0", "description": "The Bot Connector REST API allows your bot to send and receive messages to channels configured in the\r\n[Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST\r\nand JSON over HTTPS.\r\n\r\nClient libraries for this REST API are available. See below for a list.\r\n\r\nMany bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The\r\nBot State REST API allows a bot to store and retrieve state associated with users and conversations.\r\n\r\nAuthentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is\r\ndescribed in detail in the [Connector Authentication](/en-us/restapi/authentication) document.\r\n\r\n# Client Libraries for the Bot Connector REST API\r\n\r\n* [Bot Builder for C#](/en-us/csharp/builder/sdkreference/)\r\n* [Bot Builder for Node.js](/en-us/node/builder/overview/)\r\n* Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector/Swagger/ConnectorAPI.json)\r\n\r\n© 2016 Microsoft", "termsOfService": "https://www.microsoft.com/en-us/legal/intellectualproperty/copyright/default.aspx", "contact": { "name": "Bot Framework", "url": "https://botframework.com", "email": "botframework@microsoft.com" }, "license": { "name": "The MIT License (MIT)", "url": "https://opensource.org/licenses/MIT" } }, "host": "api.botframework.com", "schemes": [ "https" ], "paths": { "/v3/attachments/{attachmentId}": { "get": { "tags": [ "Attachments" ], "summary": "GetAttachmentInfo", "description": "Get AttachmentInfo structure describing the attachment views", "operationId": "Attachments_GetAttachmentInfo", "consumes": [], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "attachmentId", "in": "path", "description": "attachment id", "required": true, "type": "string" } ], "responses": { "200": { "description": "An attachmentInfo object is returned which describes the:\r\n* type of the attachment\r\n* name of the attachment\r\n\r\n\r\nand an array of views:\r\n* Size - size of the object\r\n* ViewId - View Id which can be used to fetch a variation on the content (ex: original or thumbnail)", "schema": { "$ref": "#/definitions/AttachmentInfo" } }, "400": { "description": "The request was malformed or otherwise incorrect. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "401": { "description": "The bot is not authorized to make this request. Please check your Microsoft App ID and Microsoft App password. " }, "403": { "description": "The request was a valid request, but the server is refusing to respond to it. The user might be logged in but does not have the necessary permissions for the resource." }, "404": { "description": "The resource was not found.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "An internal server has occurred. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "503": { "description": "The service you are trying to communciate with is unavailable.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "deprecated": false } }, "/v3/attachments/{attachmentId}/views/{viewId}": { "get": { "tags": [ "Attachments" ], "summary": "GetAttachment", "description": "Get the named view as binary content", "operationId": "Attachments_GetAttachment", "consumes": [], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "attachmentId", "in": "path", "description": "attachment id", "required": true, "type": "string" }, { "name": "viewId", "in": "path", "description": "View id from attachmentInfo", "required": true, "type": "string" } ], "responses": { "200": { "description": "An array of bytes which represent the content.", "schema": { "type": "file" } }, "301": { "description": "The Location header describes where the content is now." }, "302": { "description": "The Location header describes where the content is now." }, "400": { "description": "The request was malformed or otherwise incorrect. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "401": { "description": "The bot is not authorized to make this request. Please check your Microsoft App ID and Microsoft App password. " }, "403": { "description": "The request was a valid request, but the server is refusing to respond to it. The user might be logged in but does not have the necessary permissions for the resource." }, "404": { "description": "The resource was not found.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "An internal server has occurred. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "503": { "description": "The service you are trying to communciate with is unavailable.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "deprecated": false } }, "/v3/conversations": { "post": { "tags": [ "Conversations" ], "summary": "CreateConversation", "description": "Create a new Conversation.\r\n\r\nPOST to this method with a\r\n* Bot being the bot creating the conversation\r\n* IsGroup set to true if this is not a direct message (default is false)\r\n* Members array contining the members you want to have be in the conversation.\r\n\r\nThe return value is a ResourceResponse which contains a conversation id which is suitable for use\r\nin the message payload and REST API uris.\r\n\r\nMost channels only support the semantics of bots initiating a direct message conversation. An example of how to do that would be:\r\n\r\n```\r\nvar resource = await connector.conversations.CreateConversation(new ConversationParameters(){ Bot = bot, members = new ChannelAccount[] { new ChannelAccount(\"user1\") } );\r\nawait connect.Conversations.SendToConversationAsync(resource.Id, new Activity() ... ) ;\r\n\r\n```", "operationId": "Conversations_CreateConversation", "consumes": [ "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" ], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "parameters", "in": "body", "description": "Parameters to create the conversation from", "required": true, "schema": { "$ref": "#/definitions/ConversationParameters" } } ], "responses": { "200": { "description": "An object will be returned containing the ID for the resource.", "schema": { "$ref": "#/definitions/ResourceResponse" } }, "201": { "description": "A ResourceResponse object will be returned containing the ID for the resource.", "schema": { "$ref": "#/definitions/ResourceResponse" } }, "202": { "description": "An object will be returned containing the ID for the resource.", "schema": { "$ref": "#/definitions/ResourceResponse" } }, "400": { "description": "The request was malformed or otherwise incorrect. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "401": { "description": "The bot is not authorized to make this request. Please check your Microsoft App ID and Microsoft App password. " }, "403": { "description": "The request was a valid request, but the server is refusing to respond to it. The user might be logged in but does not have the necessary permissions for the resource." }, "404": { "description": "The resource was not found.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "405": { "description": "The method and URI you are trying to use is not allowed on this service. For example, not all services support the DELETE or PUT verbs on an activity URI. ", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "An internal server has occurred. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "503": { "description": "The service you are trying to communciate with is unavailable.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "deprecated": false } }, "/v3/conversations/{conversationId}/activities": { "post": { "tags": [ "Conversations" ], "summary": "SendToConversation", "description": "This method allows you to send an activity to the end of a conversation.\r\n\r\nThis is slightly different from ReplyToActivity().\r\n* SendToConverstion(conversationId) - will append the activity to the end of the conversation according to the timestamp or semantics of the channel.\r\n* ReplyToActivity(conversationId,ActivityId) - adds the activity as a reply to another activity, if the channel supports it. If the channel does not support nested replies, ReplyToActivity falls back to SendToConversation.\r\n\r\nUse ReplyToActivity when replying to a specific activity in the conversation.\r\n\r\nUse SendToConversation in all other cases.", "operationId": "Conversations_SendToConversation", "consumes": [ "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" ], "produces": [ "application/json", "text/json" ], "parameters": [ { "name": "activity", "in": "body", "description": "Activity to send", "required": true, "schema": { "$ref": "#/definitions/Activity" } }, { "name": "conversationId", "in": "path", "description": "Conversation ID", "required": true, "type": "string" } ], "responses": { "200": { "description": "An object will be returned containing the ID for the resource.", "schema": { "$ref": "#/definitions/ResourceResponse" } }, "201": { "description": "A ResourceResponse object will be returned containing the ID for the resource.", "schema": { "$ref": "#/definitions/ResourceResponse" } }, "202": { "description": "An object will be returned containing the ID for the resource.", "schema": { "$ref": "#/definitions/ResourceResponse" } }, "400": { "description": "The request was malformed or otherwise incorrect. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "401": { "description": "The bot is not authorized to make this request. Please check your Microsoft App ID and Microsoft App password. " }, "403": { "description": "The request was a valid request, but the server is refusing to respond to it. The user might be logged in but does not have the necessary permissions for the resource." }, "404": { "description": "The resource was not found.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "An internal server has occurred. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "503": { "description": "The service you are trying to communciate with is unavailable.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "deprecated": false } }, "/v3/conversations/{conversationId}/activities/{activityId}": { "put": { "tags": [ "Conversations" ], "summary": "UpdateActivity", "description": "Edit an existing activity.\r\n\r\nSome channels allow you to edit an existing activity to reflect the new state of a bot conversation.\r\n\r\nFor example, you can remove buttons after someone has clicked \"Approve\" button.", "operationId": "Conversations_UpdateActivity", "consumes": [ "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" ], "produces": [ "application/json", "text/json" ], "parameters": [ { "name": "conversationId", "in": "path", "description": "Conversation ID", "required": true, "type": "string" }, { "name": "activityId", "in": "path", "description": "activityId to update", "required": true, "type": "string" }, { "name": "activity", "in": "body", "description": "replacement Activity", "required": true, "schema": { "$ref": "#/definitions/Activity" } } ], "responses": { "200": { "description": "An object will be returned containing the ID for the resource.", "schema": { "$ref": "#/definitions/ResourceResponse" } }, "201": { "description": "A ResourceResponse object will be returned containing the ID for the resource.", "schema": { "$ref": "#/definitions/ResourceResponse" } }, "202": { "description": "An object will be returned containing the ID for the resource.", "schema": { "$ref": "#/definitions/ResourceResponse" } }, "400": { "description": "The request was malformed or otherwise incorrect. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "401": { "description": "The bot is not authorized to make this request. Please check your Microsoft App ID and Microsoft App password. " }, "403": { "description": "The request was a valid request, but the server is refusing to respond to it. The user might be logged in but does not have the necessary permissions for the resource." }, "404": { "description": "The resource was not found.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "405": { "description": "The method and URI you are trying to use is not allowed on this service. For example, not all services support the DELETE or PUT verbs on an activity URI. ", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "An internal server has occurred. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "503": { "description": "The service you are trying to communciate with is unavailable.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "deprecated": false }, "post": { "tags": [ "Conversations" ], "summary": "ReplyToActivity", "description": "This method allows you to reply to an activity.\r\n\r\nThis is slightly different from SendToConversation().\r\n* SendToConverstion(conversationId) - will append the activity to the end of the conversation according to the timestamp or semantics of the channel.\r\n* ReplyToActivity(conversationId,ActivityId) - adds the activity as a reply to another activity, if the channel supports it. If the channel does not support nested replies, ReplyToActivity falls back to SendToConversation.\r\n\r\nUse ReplyToActivity when replying to a specific activity in the conversation.\r\n\r\nUse SendToConversation in all other cases.", "operationId": "Conversations_ReplyToActivity", "consumes": [ "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" ], "produces": [ "application/json", "text/json" ], "parameters": [ { "name": "conversationId", "in": "path", "description": "Conversation ID", "required": true, "type": "string" }, { "name": "activityId", "in": "path", "description": "activityId the reply is to (OPTIONAL)", "required": true, "type": "string" }, { "name": "activity", "in": "body", "description": "Activity to send", "required": true, "schema": { "$ref": "#/definitions/Activity" } } ], "responses": { "200": { "description": "An object will be returned containing the ID for the resource.", "schema": { "$ref": "#/definitions/ResourceResponse" } }, "201": { "description": "A ResourceResponse object will be returned containing the ID for the resource.", "schema": { "$ref": "#/definitions/ResourceResponse" } }, "202": { "description": "An object will be returned containing the ID for the resource.", "schema": { "$ref": "#/definitions/ResourceResponse" } }, "400": { "description": "The request was malformed or otherwise incorrect. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "401": { "description": "The bot is not authorized to make this request. Please check your Microsoft App ID and Microsoft App password. " }, "403": { "description": "The request was a valid request, but the server is refusing to respond to it. The user might be logged in but does not have the necessary permissions for the resource." }, "404": { "description": "The resource was not found.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "An internal server has occurred. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "503": { "description": "The service you are trying to communciate with is unavailable.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "deprecated": false }, "delete": { "tags": [ "Conversations" ], "summary": "DeleteActivity", "description": "Delete an existing activity.\r\n\r\nSome channels allow you to delete an existing activity, and if successful this method will remove the specified activity.", "operationId": "Conversations_DeleteActivity", "consumes": [], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "conversationId", "in": "path", "description": "Conversation ID", "required": true, "type": "string" }, { "name": "activityId", "in": "path", "description": "activityId to delete", "required": true, "type": "string" } ], "responses": { "200": { "description": "The operation succeeded, there is no response." }, "202": { "description": "The request has been accepted for processing, but the processing has not been completed" }, "400": { "description": "The request was malformed or otherwise incorrect. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "401": { "description": "The bot is not authorized to make this request. Please check your Microsoft App ID and Microsoft App password. " }, "403": { "description": "The request was a valid request, but the server is refusing to respond to it. The user might be logged in but does not have the necessary permissions for the resource." }, "404": { "description": "The resource was not found.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "405": { "description": "The method and URI you are trying to use is not allowed on this service. For example, not all services support the DELETE or PUT verbs on an activity URI. ", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "An internal server has occurred. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "503": { "description": "The service you are trying to communciate with is unavailable.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "deprecated": false } }, "/v3/conversations/{conversationId}/members": { "get": { "tags": [ "Conversations" ], "summary": "GetConversationMembers", "description": "Enumerate the members of a converstion. \r\n\r\nThis REST API takes a ConversationId and returns an array of ChannelAccount objects representing the members of the conversation.", "operationId": "Conversations_GetConversationMembers", "consumes": [], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "conversationId", "in": "path", "description": "Conversation ID", "required": true, "type": "string" } ], "responses": { "200": { "description": "An array of ChannelAccount objects", "schema": { "type": "array", "items": { "$ref": "#/definitions/ChannelAccount" } } }, "400": { "description": "The request was malformed or otherwise incorrect. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "401": { "description": "The bot is not authorized to make this request. Please check your Microsoft App ID and Microsoft App password. " }, "403": { "description": "The request was a valid request, but the server is refusing to respond to it. The user might be logged in but does not have the necessary permissions for the resource." }, "404": { "description": "The resource was not found.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "405": { "description": "The method and URI you are trying to use is not allowed on this service. For example, not all services support the DELETE or PUT verbs on an activity URI. ", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "An internal server has occurred. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "503": { "description": "The service you are trying to communciate with is unavailable.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "deprecated": false } }, "/v3/conversations/{conversationId}/activities/{activityId}/members": { "get": { "tags": [ "Conversations" ], "summary": "GetActivityMembers", "description": "Enumerate the members of an activity. \r\n\r\nThis REST API takes a ConversationId and a ActivityId, returning an array of ChannelAccount objects representing the members of the particular activity in the conversation.", "operationId": "Conversations_GetActivityMembers", "consumes": [], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "conversationId", "in": "path", "description": "Conversation ID", "required": true, "type": "string" }, { "name": "activityId", "in": "path", "description": "Activity ID", "required": true, "type": "string" } ], "responses": { "200": { "description": "An array of ChannelAccount objects", "schema": { "type": "array", "items": { "$ref": "#/definitions/ChannelAccount" } } }, "400": { "description": "The request was malformed or otherwise incorrect. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "401": { "description": "The bot is not authorized to make this request. Please check your Microsoft App ID and Microsoft App password. " }, "403": { "description": "The request was a valid request, but the server is refusing to respond to it. The user might be logged in but does not have the necessary permissions for the resource." }, "404": { "description": "The resource was not found.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "405": { "description": "The method and URI you are trying to use is not allowed on this service. For example, not all services support the DELETE or PUT verbs on an activity URI. ", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "An internal server has occurred. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "503": { "description": "The service you are trying to communciate with is unavailable.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "deprecated": false } }, "/v3/conversations/{conversationId}/attachments": { "post": { "tags": [ "Conversations" ], "summary": "UploadAttachment", "description": "Upload an attachment directly into a channel's blob storage.\r\n\r\nThis is useful because it allows you to store data in a compliant store when dealing with enterprises.\r\n\r\nThe response is a ResourceResponse which contains an AttachmentId which is suitable for using with the attachments API.", "operationId": "Conversations_UploadAttachment", "consumes": [ "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" ], "produces": [ "application/json", "text/json" ], "parameters": [ { "name": "conversationId", "in": "path", "description": "Conversation ID", "required": true, "type": "string" }, { "name": "attachmentUpload", "in": "body", "description": "Attachment data", "required": true, "schema": { "$ref": "#/definitions/AttachmentData" } } ], "responses": { "200": { "description": "An object will be returned containing the ID for the resource.", "schema": { "$ref": "#/definitions/ResourceResponse" } }, "201": { "description": "A ResourceResponse object will be returned containing the ID for the resource.", "schema": { "$ref": "#/definitions/ResourceResponse" } }, "202": { "description": "An object will be returned containing the ID for the resource.", "schema": { "$ref": "#/definitions/ResourceResponse" } }, "400": { "description": "The request was malformed or otherwise incorrect. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "401": { "description": "The bot is not authorized to make this request. Please check your Microsoft App ID and Microsoft App password. " }, "403": { "description": "The request was a valid request, but the server is refusing to respond to it. The user might be logged in but does not have the necessary permissions for the resource." }, "404": { "description": "The resource was not found.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "405": { "description": "The method and URI you are trying to use is not allowed on this service. For example, not all services support the DELETE or PUT verbs on an activity URI. ", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "An internal server has occurred. Inspect the message for a more detailed description.", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "503": { "description": "The service you are trying to communciate with is unavailable.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "deprecated": false } } }, "definitions": { "AttachmentInfo": { "description": "Metdata for an attachment", "type": "object", "properties": { "name": { "description": "Name of the attachment", "type": "string" }, "type": { "description": "ContentType of the attachment", "type": "string" }, "views": { "description": "attachment views", "type": "array", "items": { "$ref": "#/definitions/AttachmentView" } } } }, "AttachmentView": { "description": "Attachment View name and size", "type": "object", "properties": { "viewId": { "description": "content type of the attachmnet", "type": "string" }, "size": { "format": "int32", "description": "Name of the attachment", "type": "integer" } } }, "ErrorResponse": { "description": "An HTTP API response", "type": "object", "properties": { "error": { "$ref": "#/definitions/Error", "description": "Error message" } } }, "Error": { "description": "Object representing error information", "type": "object", "properties": { "code": { "description": "Error code", "type": "string" }, "message": { "description": "Error message", "type": "string" } } }, "ConversationParameters": { "description": "Parameters for creating a new conversation", "type": "object", "properties": { "isGroup": { "description": "IsGroup", "type": "boolean" }, "bot": { "$ref": "#/definitions/ChannelAccount", "description": "The bot address for this conversation" }, "members": { "description": "Members to add to the conversation", "type": "array", "items": { "$ref": "#/definitions/ChannelAccount" } }, "topicName": { "description": "(Optional) Topic of the conversation (if supported by the channel)", "type": "string" } } }, "ChannelAccount": { "description": "Channel account information needed to route a message", "type": "object", "properties": { "id": { "description": "Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456)", "type": "string" }, "name": { "description": "Display friendly name", "type": "string" } } }, "Object": { "type": "object", "properties": {} }, "ResourceResponse": { "description": "A response containing a resource ID", "type": "object", "properties": { "id": { "description": "Id of the resource", "type": "string" } } }, "Activity": { "description": "An Activity is the basic communication type for the Bot Framework 3.0 protocol", "type": "object", "properties": { "type": { "description": "The type of the activity [message|contactRelationUpdate|converationUpdate|typing]", "type": "string" }, "id": { "description": "Id for the activity", "type": "string" }, "timestamp": { "format": "date-time", "description": "UTC Time when message was sent (Set by service)", "type": "string" }, "localTimestamp": { "format": "date-time", "description": "Local time when message was sent (set by client Ex: 2016-09-23T13:07:49.4714686-07:00)", "type": "string" }, "serviceUrl": { "description": "Service endpoint", "type": "string" }, "channelId": { "description": "ChannelId the activity was on", "type": "string" }, "from": { "$ref": "#/definitions/ChannelAccount", "description": "Sender address" }, "conversation": { "$ref": "#/definitions/ConversationAccount", "description": "Conversation" }, "recipient": { "$ref": "#/definitions/ChannelAccount", "description": "(Outbound to bot only) Bot's address that received the message" }, "textFormat": { "description": "Format of text fields [plain|markdown] Default:markdown", "type": "string" }, "attachmentLayout": { "description": "AttachmentLayout - hint for how to deal with multiple attachments Values: [list|carousel] Default:list", "type": "string" }, "membersAdded": { "description": "Array of address added", "type": "array", "items": { "$ref": "#/definitions/ChannelAccount" } }, "membersRemoved": { "description": "Array of addresses removed", "type": "array", "items": { "$ref": "#/definitions/ChannelAccount" } }, "topicName": { "description": "Conversations new topic name", "type": "string" }, "historyDisclosed": { "description": "the previous history of the channel was disclosed", "type": "boolean" }, "locale": { "description": "The language code of the Text field", "type": "string" }, "text": { "description": "Content for the message", "type": "string" }, "summary": { "description": "Text to display if you can't render cards", "type": "string" }, "attachments": { "description": "Attachments", "type": "array", "items": { "$ref": "#/definitions/Attachment" } }, "entities": { "description": "Collection of Entity objects, each of which contains metadata about this activity. Each Entity object is typed.", "type": "array", "items": { "$ref": "#/definitions/Entity" } }, "channelData": { "$ref": "#/definitions/Object", "description": "Channel specific payload" }, "action": { "description": "ContactAdded/Removed action", "type": "string" }, "replyToId": { "description": "the original id this message is a response to", "type": "string" }, "value": { "$ref": "#/definitions/Object", "description": "Open ended value" } } }, "ConversationAccount": { "description": "Channel account information for a conversation", "type": "object", "properties": { "isGroup": { "description": "Is this a reference to a group", "type": "boolean" }, "id": { "description": "Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456)", "type": "string" }, "name": { "description": "Display friendly name", "type": "string" } } }, "Attachment": { "description": "An attachment within an activity", "type": "object", "properties": { "contentType": { "description": "mimetype/Contenttype for the file", "type": "string" }, "contentUrl": { "description": "Content Url", "type": "string" }, "content": { "$ref": "#/definitions/Object", "description": "Embedded content" }, "name": { "description": "(OPTIONAL) The name of the attachment", "type": "string" }, "thumbnailUrl": { "description": "(OPTIONAL) Thumbnail associated with attachment", "type": "string" } } }, "Entity": { "description": "Object of schema.org types", "type": "object", "properties": { "type": { "description": "Entity Type (typically from schema.org types)", "type": "string" } } }, "AttachmentData": { "description": "Attachment data", "type": "object", "properties": { "type": { "description": "content type of the attachmnet", "type": "string" }, "name": { "description": "Name of the attachment", "type": "string" }, "originalBase64": { "format": "byte", "description": "original content", "type": "string" }, "thumbnailBase64": { "format": "byte", "description": "Thumbnail", "type": "string" } } }, "HeroCard": { "description": "A Hero card (card with a single, large image)", "type": "object", "properties": { "title": { "description": "Title of the card", "type": "string" }, "subtitle": { "description": "Subtitle of the card", "type": "string" }, "text": { "description": "Text for the card", "type": "string" }, "images": { "description": "Array of images for the card", "type": "array", "items": { "$ref": "#/definitions/CardImage" } }, "buttons": { "description": "Set of actions applicable to the current card", "type": "array", "items": { "$ref": "#/definitions/CardAction" } }, "tap": { "$ref": "#/definitions/CardAction", "description": "This action will be activated when user taps on the card itself" } } }, "CardImage": { "description": "An image on a card", "type": "object", "properties": { "url": { "description": "URL Thumbnail image for major content property.", "type": "string" }, "alt": { "description": "Image description intended for screen readers", "type": "string" }, "tap": { "$ref": "#/definitions/CardAction", "description": "Action assigned to specific Attachment.E.g.navigate to specific URL or play/open media content" } } }, "CardAction": { "description": "An action on a card", "type": "object", "properties": { "type": { "description": "Defines the type of action implemented by this button.", "type": "string" }, "title": { "description": "Text description which appear on the button.", "type": "string" }, "image": { "description": "URL Picture which will appear on the button, next to text label.", "type": "string" }, "value": { "description": "Supplementary parameter for action. Content of this property depends on the ActionType", "type": "string" } } }, "ThumbnailCard": { "description": "A thumbnail card (card with a single, small thumbnail image)", "type": "object", "properties": { "title": { "description": "Title of the card", "type": "string" }, "subtitle": { "description": "Subtitle of the card", "type": "string" }, "text": { "description": "Text for the card", "type": "string" }, "images": { "description": "Array of images for the card", "type": "array", "items": { "$ref": "#/definitions/CardImage" } }, "buttons": { "description": "Set of actions applicable to the current card", "type": "array", "items": { "$ref": "#/definitions/CardAction" } }, "tap": { "$ref": "#/definitions/CardAction", "description": "This action will be activated when user taps on the card itself" } } }, "ReceiptCard": { "description": "A receipt card", "type": "object", "properties": { "title": { "description": "Title of the card", "type": "string" }, "items": { "description": "Array of Receipt Items", "type": "array", "items": { "$ref": "#/definitions/ReceiptItem" } }, "facts": { "description": "Array of Fact Objects Array of key-value pairs.", "type": "array", "items": { "$ref": "#/definitions/Fact" } }, "tap": { "$ref": "#/definitions/CardAction", "description": "This action will be activated when user taps on the card" }, "total": { "description": "Total amount of money paid (or should be paid)", "type": "string" }, "tax": { "description": "Total amount of TAX paid(or should be paid)", "type": "string" }, "vat": { "description": "Total amount of VAT paid(or should be paid)", "type": "string" }, "buttons": { "description": "Set of actions applicable to the current card", "type": "array", "items": { "$ref": "#/definitions/CardAction" } } } }, "ReceiptItem": { "description": "An item on a receipt card", "type": "object", "properties": { "title": { "description": "Title of the Card", "type": "string" }, "subtitle": { "description": "Subtitle appears just below Title field, differs from Title in font styling only", "type": "string" }, "text": { "description": "Text field appears just below subtitle, differs from Subtitle in font styling only", "type": "string" }, "image": { "$ref": "#/definitions/CardImage", "description": "Image" }, "price": { "description": "Amount with currency", "type": "string" }, "quantity": { "description": "Number of items of given kind", "type": "string" }, "tap": { "$ref": "#/definitions/CardAction", "description": "This action will be activated when user taps on the Item bubble." } } }, "Fact": { "description": "Set of key-value pairs. Advantage of this section is that key and value properties will be \r\n rendered with default style information with some delimiter between them. So there is no need for developer to specify style information.", "type": "object", "properties": { "key": { "description": "The key for this Fact", "type": "string" }, "value": { "description": "The value for this Fact", "type": "string" } } }, "SigninCard": { "description": "A card representing a request to sign in", "type": "object", "properties": { "text": { "description": "Text for signin request", "type": "string" }, "buttons": { "description": "Action to use to perform signin", "type": "array", "items": { "$ref": "#/definitions/CardAction" } } } }, "AudioCard": { "description": "A audio card", "type": "object", "properties": { "aspect": { "description": "Aspect ratio of thumbnail/media placeholder, allowed values are \"16x9\" and \"9x16\"", "type": "string" }, "title": { "description": "Title of the card", "type": "string" }, "subtitle": { "description": "Subtitle of the card", "type": "string" }, "text": { "description": "Text of the card", "type": "string" }, "image": { "$ref": "#/definitions/ThumbnailUrl", "description": "Thumbnail placeholder" }, "media": { "description": "Array of media Url objects", "type": "array", "items": { "$ref": "#/definitions/MediaUrl" } }, "buttons": { "description": "Set of actions applicable to the current card", "type": "array", "items": { "$ref": "#/definitions/CardAction" } }, "shareable": { "description": "Is it OK for this content to be shareable with others (default:true)", "type": "boolean" }, "autoloop": { "description": "Should the client loop playback at end of content (default:true)", "type": "boolean" }, "autostart": { "description": "Should the client automatically start playback of video in this card (default:true)", "type": "boolean" } } }, "ThumbnailUrl": { "description": "Object describing a media thumbnail", "type": "object", "properties": { "url": { "description": "url pointing to an thumbnail to use for media content", "type": "string" }, "alt": { "description": "Alt text to display for screen readers on the thumbnail image", "type": "string" } } }, "MediaUrl": { "description": "MediaUrl data", "type": "object", "properties": { "url": { "description": "Url for the media", "type": "string" }, "profile": { "description": "Optional profile hint to the client to differentiate multiple MediaUrl objects from each other", "type": "string" } } }, "AnimationCard": { "description": "An animation card (Ex: gif or short video clip)", "type": "object", "properties": { "title": { "description": "Title of the card", "type": "string" }, "subtitle": { "description": "Subtitle of the card", "type": "string" }, "text": { "description": "Text of the card", "type": "string" }, "image": { "$ref": "#/definitions/ThumbnailUrl", "description": "Thumbnail placeholder" }, "media": { "description": "Array of media Url objects", "type": "array", "items": { "$ref": "#/definitions/MediaUrl" } }, "buttons": { "description": "Set of actions applicable to the current card", "type": "array", "items": { "$ref": "#/definitions/CardAction" } }, "shareable": { "description": "Is it OK for this content to be shareable with others (default:true)", "type": "boolean" }, "autoloop": { "description": "Should the client loop playback at end of content (default:true)", "type": "boolean" }, "autostart": { "description": "Should the client automatically start playback of video in this card (default:true)", "type": "boolean" } } }, "VideoCard": { "description": "A video card", "type": "object", "properties": { "title": { "description": "Title of the card", "type": "string" }, "subtitle": { "description": "Subtitle of the card", "type": "string" }, "text": { "description": "Text of the card", "type": "string" }, "image": { "$ref": "#/definitions/ThumbnailUrl", "description": "Thumbnail placeholder" }, "media": { "description": "Array of media Url objects", "type": "array", "items": { "$ref": "#/definitions/MediaUrl" } }, "buttons": { "description": "Set of actions applicable to the current card", "type": "array", "items": { "$ref": "#/definitions/CardAction" } }, "shareable": { "description": "Is it OK for this content to be shareable with others (default:true)", "type": "boolean" }, "autoloop": { "description": "Should the client loop playback at end of content (default:true)", "type": "boolean" }, "autostart": { "description": "Should the client automatically start playback of video in this card (default:true)", "type": "boolean" } } }, "GeoCoordinates": { "description": "GeoCoordinates (entity type: \"https://schema.org/GeoCoordinates\")", "type": "object", "properties": { "elevation": { "format": "double", "description": "Elevation of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)", "type": "number" }, "latitude": { "format": "double", "description": "Latitude of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)", "type": "number" }, "longitude": { "format": "double", "description": "Longitude of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)", "type": "number" }, "type": { "description": "The type of the thing", "type": "string" }, "name": { "description": "The name of the thing", "type": "string" } } }, "Place": { "description": "Place (entity type: \"https://schema.org/Place\")", "type": "object", "properties": { "address": { "$ref": "#/definitions/Object", "description": "Address of the place (may be `string` or complex object of type `PostalAddress`)" }, "geo": { "$ref": "#/definitions/Object", "description": "Geo coordinates of the place (may be complex object of type `GeoCoordinates` or `GeoShape`)" }, "hasMap": { "$ref": "#/definitions/Object", "description": "Map to the place (may be `string` (URL) or complex object of type `Map`)" }, "type": { "description": "The type of the thing", "type": "string" }, "name": { "description": "The name of the thing", "type": "string" } } } } }validate-0.24.0/fixtures/go-swagger/bugs/733/000077500000000000000000000000001457312750000205615ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/733/swagger.json000066400000000000000000015667051457312750000231370ustar00rootroot00000000000000{ "basePath": "/latest", "host": "esi.tech.ccp.is", "info": { "description": "An OpenAPI for EVE Online", "title": "EVE Swagger Interface", "version": "0.3.4" }, "paths": { "/alliances/": { "get": { "description": "List all active player alliances\n\n---\n\nAlternate route: `/v1/alliances/`\n\nAlternate route: `/legacy/alliances/`\n\nAlternate route: `/dev/alliances/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_alliances", "parameters": [{ "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "List of Alliance IDs", "examples": { "application/json": [99000001, 99000002] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok integer", "format": "int32", "minimum": 0, "title": "get_alliances_200_ok", "type": "integer", "uniqueItems": true }, "title": "get_alliances_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_alliances_500_internal_server_error", "type": "string" } }, "title": "get_alliances_internal_server_error", "type": "object" } } }, "summary": "List all alliances", "tags": ["Alliance"] } }, "/alliances/names/": { "get": { "description": "Resolve a set of alliance IDs to alliance names\n\n---\n\nAlternate route: `/v1/alliances/names/`\n\nAlternate route: `/legacy/alliances/names/`\n\nAlternate route: `/dev/alliances/names/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_alliances_names", "parameters": [{ "description": "A comma separated list of alliance IDs", "in": "query", "items": { "format": "int64", "type": "integer" }, "minItems": 1, "name": "alliance_ids", "required": true, "type": "array" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "List of id/name associations", "examples": { "application/json": [{ "alliance_id": 1000171, "alliance_name": "Republic University" }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "alliance_id": { "description": "alliance_id integer", "format": "int32", "title": "get_alliances_names_alliance_id", "type": "integer" }, "alliance_name": { "description": "alliance_name string", "title": "get_alliances_names_alliance_name", "type": "string" } }, "required": ["alliance_id", "alliance_name"], "title": "get_alliances_names_200_ok", "type": "object" }, "title": "get_alliances_names_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_alliances_names_500_internal_server_error", "type": "string" } }, "title": "get_alliances_names_internal_server_error", "type": "object" } } }, "summary": "Get alliance names", "tags": ["Alliance"] } }, "/alliances/{alliance_id}/": { "get": { "description": "Public information about an alliance\n\n---\n\nAlternate route: `/v2/alliances/{alliance_id}/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_alliances_alliance_id", "parameters": [{ "description": "An Eve alliance ID", "format": "int32", "in": "path", "name": "alliance_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Public data about an alliance", "examples": { "application/json": { "alliance_name": "C C P Alliance", "date_founded": "2016-06-26T21:00:00Z", "executor_corp": 98356193, "ticker": "" } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "alliance_name": { "description": "the full name of the alliance", "title": "get_alliances_alliance_id_alliance_name", "type": "string" }, "date_founded": { "description": "date_founded string", "format": "date-time", "title": "get_alliances_alliance_id_date_founded", "type": "string" }, "executor_corp": { "description": "the executor corporation ID, if this alliance is not closed", "format": "int32", "title": "get_alliances_alliance_id_executor_corp", "type": "integer" }, "ticker": { "description": "the short name of the alliance", "title": "get_alliances_alliance_id_ticker", "type": "string" } }, "required": ["alliance_name", "ticker", "date_founded"], "title": "get_alliances_alliance_id_ok", "type": "object" } }, "404": { "description": "Alliance not found", "examples": { "application/json": { "error": "Alliance not found" } }, "schema": { "description": "Alliance not found", "properties": { "error": { "description": "error message", "title": "get_alliances_alliance_id_error", "type": "string" } }, "title": "get_alliances_alliance_id_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_alliances_alliance_id_500_internal_server_error", "type": "string" } }, "title": "get_alliances_alliance_id_internal_server_error", "type": "object" } } }, "summary": "Get alliance information", "tags": ["Alliance"] } }, "/alliances/{alliance_id}/corporations/": { "get": { "description": "List all current member corporations of an alliance\n\n---\n\nAlternate route: `/v1/alliances/{alliance_id}/corporations/`\n\nAlternate route: `/legacy/alliances/{alliance_id}/corporations/`\n\nAlternate route: `/dev/alliances/{alliance_id}/corporations/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_alliances_alliance_id_corporations", "parameters": [{ "description": "An EVE alliance ID", "format": "int32", "in": "path", "name": "alliance_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "List of corporation IDs", "examples": { "application/json": [98000001] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok integer", "format": "int32", "minimum": 0, "title": "get_alliances_alliance_id_corporations_200_ok", "type": "integer", "uniqueItems": true }, "title": "get_alliances_alliance_id_corporations_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_alliances_alliance_id_corporations_500_internal_server_error", "type": "string" } }, "title": "get_alliances_alliance_id_corporations_internal_server_error", "type": "object" } } }, "summary": "List alliance's corporations", "tags": ["Alliance"] } }, "/alliances/{alliance_id}/icons/": { "get": { "description": "Get the icon urls for a alliance\n\n---\n\nAlternate route: `/v1/alliances/{alliance_id}/icons/`\n\nAlternate route: `/legacy/alliances/{alliance_id}/icons/`\n\nAlternate route: `/dev/alliances/{alliance_id}/icons/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_alliances_alliance_id_icons", "parameters": [{ "description": "An EVE alliance ID", "format": "int32", "in": "path", "name": "alliance_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Urls for icons for the given alliance id and server", "examples": { "application/json": { "px128x128": "https://imageserver.eveonline.com/Alliance/503818424_128.png", "px64x64": "https://imageserver.eveonline.com/Alliance/503818424_64.png" } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "px128x128": { "description": "px128x128 string", "title": "get_alliances_alliance_id_icons_px128x128", "type": "string" }, "px64x64": { "description": "px64x64 string", "title": "get_alliances_alliance_id_icons_px64x64", "type": "string" } }, "title": "get_alliances_alliance_id_icons_ok", "type": "object" } }, "404": { "description": "No image server for this datasource", "examples": { "application/json": { "error": "No image server for this datasource" } }, "schema": { "description": "No image server for this datasource", "properties": { "error": { "description": "error message", "title": "get_alliances_alliance_id_icons_error", "type": "string" } }, "title": "get_alliances_alliance_id_icons_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_alliances_alliance_id_icons_500_internal_server_error", "type": "string" } }, "title": "get_alliances_alliance_id_icons_internal_server_error", "type": "object" } } }, "summary": "Get alliance icon", "tags": ["Alliance"] } }, "/characters/names/": { "get": { "description": "Resolve a set of character IDs to character names\n\n---\n\nAlternate route: `/v1/characters/names/`\n\nAlternate route: `/legacy/characters/names/`\n\nAlternate route: `/dev/characters/names/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_characters_names", "parameters": [{ "description": "A comma separated list of character IDs", "in": "query", "items": { "format": "int64", "type": "integer" }, "minItems": 1, "name": "character_ids", "required": true, "type": "array" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "List of id/name associations", "examples": { "application/json": [{ "character_id": 95465499, "character_name": "CCP Bartender" }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "character_id": { "description": "character_id integer", "format": "int64", "title": "get_characters_names_character_id", "type": "integer" }, "character_name": { "description": "character_name string", "title": "get_characters_names_character_name", "type": "string" } }, "required": ["character_id", "character_name"], "title": "get_characters_names_200_ok", "type": "object" }, "title": "get_characters_names_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_names_500_internal_server_error", "type": "string" } }, "title": "get_characters_names_internal_server_error", "type": "object" } } }, "summary": "Get character names", "tags": ["Character"] } }, "/characters/{character_id}/": { "get": { "description": "Public information about a character\n\n---\n\nAlternate route: `/v3/characters/{character_id}/`\n\nAlternate route: `/legacy/characters/{character_id}/`\n\nAlternate route: `/dev/characters/{character_id}/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_characters_character_id", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Public data for the given character", "examples": { "application/json": { "ancestry_id": 19, "birthday": "2015-03-24T11:37:00Z", "bloodline_id": 3, "corporation_id": 109299958, "description": "", "gender": "male", "name": "CCP Bartender", "race_id": 2 } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "ancestry_id": { "description": "ancestry_id integer", "format": "int32", "title": "get_characters_character_id_ancestry_id", "type": "integer" }, "birthday": { "description": "Creation date of the character", "format": "date-time", "title": "get_characters_character_id_birthday", "type": "string" }, "bloodline_id": { "description": "bloodline_id integer", "format": "int32", "title": "get_characters_character_id_bloodline_id", "type": "integer" }, "corporation_id": { "description": "The character's corporation ID", "format": "int32", "title": "get_characters_character_id_corporation_id", "type": "integer" }, "description": { "description": "description string", "title": "get_characters_character_id_description", "type": "string" }, "gender": { "description": "gender string", "enum": ["female", "male"], "title": "get_characters_character_id_gender", "type": "string" }, "name": { "description": "The name of the character", "title": "get_characters_character_id_name", "type": "string" }, "race_id": { "description": "race_id integer", "format": "int32", "title": "get_characters_character_id_race_id", "type": "integer" }, "security_status": { "description": "security_status number", "format": "float", "maximum": 10, "minimum": -10, "title": "get_characters_character_id_security_status", "type": "number" } }, "required": ["corporation_id", "birthday", "name", "gender", "race_id", "description", "bloodline_id"], "title": "get_characters_character_id_ok", "type": "object" } }, "422": { "description": "Is not a character ID", "examples": { "application/json": { "error": "98000001 is not a character ID" } }, "schema": { "description": "Is not a character ID", "properties": { "error": { "description": "error message", "title": "get_characters_character_id_error", "type": "string" } }, "title": "get_characters_character_id_unprocessable_entity", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_internal_server_error", "type": "object" } } }, "summary": "Get character's public information", "tags": ["Character"] } }, "/characters/{character_id}/assets/": { "get": { "description": "Return a list of the characters assets\n\n---\n\nAlternate route: `/v1/characters/{character_id}/assets/`\n\nAlternate route: `/legacy/characters/{character_id}/assets/`\n\nAlternate route: `/dev/characters/{character_id}/assets/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_characters_character_id_assets", "parameters": [{ "description": "Character id of the target character", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A flat list of the users assets", "examples": { "application/json": [{ "is_singleton": true, "item_id": 1000000016835, "location_flag": "Hangar", "location_id": 60002959, "location_type": "station", "type_id": 3516 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "is_singleton": { "description": "is_singleton boolean", "title": "get_characters_character_id_assets_is_singleton", "type": "boolean" }, "item_id": { "description": "item_id integer", "format": "int64", "title": "get_characters_character_id_assets_item_id", "type": "integer" }, "location_flag": { "description": "location_flag string", "enum": ["AutoFit", "Cargo", "CorpseBay", "DroneBay", "FleetHangar", "Deliveries", "HiddenModifiers", "Hangar", "HangarAll", "LoSlot0", "LoSlot1", "LoSlot2", "LoSlot3", "LoSlot4", "LoSlot5", "LoSlot6", "LoSlot7", "MedSlot0", "MedSlot1", "MedSlot2", "MedSlot3", "MedSlot4", "MedSlot5", "MedSlot6", "MedSlot7", "HiSlot0", "HiSlot1", "HiSlot2", "HiSlot3", "HiSlot4", "HiSlot5", "HiSlot6", "HiSlot7", "AssetSafety", "Locked", "Unlocked", "Implant", "QuafeBay", "RigSlot0", "RigSlot1", "RigSlot2", "RigSlot3", "RigSlot4", "RigSlot5", "RigSlot6", "RigSlot7", "ShipHangar", "SpecializedFuelBay", "SpecializedOreHold", "SpecializedGasHold", "SpecializedMineralHold", "SpecializedSalvageHold", "SpecializedShipHold", "SpecializedSmallShipHold", "SpecializedMediumShipHold", "SpecializedLargeShipHold", "SpecializedIndustrialShipHold", "SpecializedAmmoHold", "SpecializedCommandCenterHold", "SpecializedPlanetaryCommoditiesHold", "SpecializedMaterialBay", "SubSystemSlot0", "SubSystemSlot1", "SubSystemSlot2", "SubSystemSlot3", "SubSystemSlot4", "SubSystemSlot5", "SubSystemSlot6", "SubSystemSlot7", "FighterBay", "FighterTube0", "FighterTube1", "FighterTube2", "FighterTube3", "FighterTube4"], "title": "get_characters_character_id_assets_location_flag", "type": "string" }, "location_id": { "description": "location_id integer", "format": "int64", "title": "get_characters_character_id_assets_location_id", "type": "integer" }, "location_type": { "description": "location_type string", "enum": ["station", "solar_system", "other"], "title": "get_characters_character_id_assets_location_type", "type": "string" }, "quantity": { "description": "quantity integer", "format": "int32", "title": "get_characters_character_id_assets_quantity", "type": "integer" }, "type_id": { "description": "type_id integer", "format": "int32", "title": "get_characters_character_id_assets_type_id", "type": "integer" } }, "required": ["type_id", "location_id", "location_type", "item_id", "location_flag", "is_singleton"], "title": "get_characters_character_id_assets_200_ok", "type": "object" }, "title": "get_characters_character_id_assets_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-assets.read_assets.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_assets_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_assets_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_assets_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_assets_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-assets.read_assets.v1"] }], "summary": "Get character assets", "tags": ["Assets"] } }, "/characters/{character_id}/bookmarks/": { "get": { "description": "List your character's personal bookmarks\n\n---\n\nAlternate route: `/v1/characters/{character_id}/bookmarks/`\n\nAlternate route: `/legacy/characters/{character_id}/bookmarks/`\n\nAlternate route: `/dev/characters/{character_id}/bookmarks/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_characters_character_id_bookmarks", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of bookmarks", "examples": { "application/json": [{ "bookmark_id": 32, "create_date": "2016-08-09T11:57:47Z", "creator_id": 90000001, "folder_id": 5, "memo": "aoeu ( Citadel )", "note": "", "owner_id": 90000001, "target": { "item": { "item_id": 1000000012668, "type_id": 35832 }, "location_id": 30000005 } }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "bookmark_id": { "description": "bookmark_id integer", "format": "int64", "title": "get_characters_character_id_bookmarks_bookmark_id", "type": "integer" }, "create_date": { "description": "create_date string", "format": "date-time", "title": "get_characters_character_id_bookmarks_create_date", "type": "string" }, "creator_id": { "description": "creator_id integer", "format": "int32", "title": "get_characters_character_id_bookmarks_creator_id", "type": "integer" }, "folder_id": { "description": "folder_id integer", "format": "int32", "title": "get_characters_character_id_bookmarks_folder_id", "type": "integer" }, "memo": { "description": "memo string", "title": "get_characters_character_id_bookmarks_memo", "type": "string" }, "note": { "description": "note string", "title": "get_characters_character_id_bookmarks_note", "type": "string" }, "owner_id": { "description": "owner_id integer", "format": "int32", "title": "get_characters_character_id_bookmarks_owner_id", "type": "integer" }, "target": { "description": "target object", "properties": { "coordinates": { "description": "coordinates object", "properties": { "x": { "description": "x number", "format": "double", "title": "get_characters_character_id_bookmarks_x", "type": "number" }, "y": { "description": "y number", "format": "double", "title": "get_characters_character_id_bookmarks_y", "type": "number" }, "z": { "description": "z number", "format": "double", "title": "get_characters_character_id_bookmarks_z", "type": "number" } }, "required": ["x", "y", "z"], "title": "get_characters_character_id_bookmarks_coordinates", "type": "object" }, "item": { "description": "item object", "properties": { "item_id": { "description": "item_id integer", "format": "int64", "title": "get_characters_character_id_bookmarks_item_id", "type": "integer" }, "type_id": { "description": "type_id integer", "format": "int32", "title": "get_characters_character_id_bookmarks_type_id", "type": "integer" } }, "required": ["item_id", "type_id"], "title": "get_characters_character_id_bookmarks_item", "type": "object" }, "location_id": { "description": "location_id integer", "format": "int64", "title": "get_characters_character_id_bookmarks_location_id", "type": "integer" } }, "required": ["location_id"], "title": "get_characters_character_id_bookmarks_target", "type": "object" } }, "required": ["bookmark_id", "creator_id", "owner_id", "create_date", "memo", "note", "target"], "title": "get_characters_character_id_bookmarks_200_ok", "type": "object" }, "title": "get_characters_character_id_bookmarks_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-bookmarks.read_character_bookmarks.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_bookmarks_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_bookmarks_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_bookmarks_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_bookmarks_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-bookmarks.read_character_bookmarks.v1"] }], "summary": "List bookmarks", "tags": ["Bookmarks"] } }, "/characters/{character_id}/bookmarks/folders/": { "get": { "description": "List your character's personal bookmark folders\n\n---\n\nAlternate route: `/v1/characters/{character_id}/bookmarks/folders/`\n\nAlternate route: `/legacy/characters/{character_id}/bookmarks/folders/`\n\nAlternate route: `/dev/characters/{character_id}/bookmarks/folders/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_characters_character_id_bookmarks_folders", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "List of bookmark folders", "examples": { "application/json": [{ "folder_id": 5, "name": "Icecream", "owner_id": 90000001 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "folder_id": { "description": "folder_id integer", "format": "int32", "title": "get_characters_character_id_bookmarks_folders_folder_id", "type": "integer" }, "name": { "description": "name string", "title": "get_characters_character_id_bookmarks_folders_name", "type": "string" }, "owner_id": { "description": "owner_id integer", "format": "int32", "title": "get_characters_character_id_bookmarks_folders_owner_id", "type": "integer" } }, "title": "get_characters_character_id_bookmarks_folders_200_ok", "type": "object" }, "title": "get_characters_character_id_bookmarks_folders_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-bookmarks.read_character_bookmarks.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_bookmarks_folders_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_bookmarks_folders_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_bookmarks_folders_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_bookmarks_folders_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-bookmarks.read_character_bookmarks.v1"] }], "summary": "List bookmark folders", "tags": ["Bookmarks"] } }, "/characters/{character_id}/calendar/": { "get": { "description": "Get 50 event summaries from the calendar. If no event ID is given,\nthe resource will return the next 50 chronological event summaries\nfrom now. If an event ID is specified, it will return the next 50\nchronological event summaries from after that event.\n\n\n---\n\nAlternate route: `/v1/characters/{character_id}/calendar/`\n\nAlternate route: `/legacy/characters/{character_id}/calendar/`\n\nAlternate route: `/dev/characters/{character_id}/calendar/`\n\n\n---\n\nThis route is cached for up to 5 seconds", "operationId": "get_characters_character_id_calendar", "parameters": [{ "description": "The character to retrieve events from", "format": "int64", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "description": "The event ID to retrieve events from", "format": "int32", "in": "query", "name": "from_event", "required": false, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A collection of event summaries", "examples": { "application/json": [{ "event_date": "2016-06-26T20:00:00Z", "event_id": 1386435, "event_response": "accepted", "importance": 0, "title": "o7 The EVE Online Show" }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "Up to 50 events from now or the event you requested\n", "items": { "description": "event", "properties": { "event_date": { "description": "event_date string", "format": "date-time", "title": "get_characters_character_id_calendar_event_date", "type": "string" }, "event_id": { "description": "event_id integer", "format": "int32", "title": "get_characters_character_id_calendar_event_id", "type": "integer" }, "event_response": { "description": "event_response string", "enum": ["declined", "not_responded", "accepted", "tentative"], "title": "get_characters_character_id_calendar_event_response", "type": "string" }, "importance": { "description": "importance integer", "format": "int32", "title": "get_characters_character_id_calendar_importance", "type": "integer" }, "title": { "description": "title string", "title": "get_characters_character_id_calendar_title", "type": "string" } }, "title": "get_characters_character_id_calendar_200_ok", "type": "object" }, "title": "get_characters_character_id_calendar_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-calendar.read_calendar_events.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_calendar_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_calendar_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_calendar_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_calendar_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-calendar.read_calendar_events.v1"] }], "summary": "List calendar event summaries", "tags": ["Calendar"] } }, "/characters/{character_id}/calendar/{event_id}/": { "get": { "description": "Get all the information for a specific event\n\n---\n\nAlternate route: `/v3/characters/{character_id}/calendar/{event_id}/`\n\nAlternate route: `/dev/characters/{character_id}/calendar/{event_id}/`\n\n\n---\n\nThis route is cached for up to 5 seconds", "operationId": "get_characters_character_id_calendar_event_id", "parameters": [{ "description": "The character id requesting the event", "format": "int64", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "description": "The id of the event requested", "format": "int32", "in": "path", "name": "event_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Full details of a specific event", "examples": { "application/json": { "date": "2016-06-26T21:00:00Z", "duration": 60, "event_id": 1386435, "importance": 1, "owner_id": 1, "owner_name": "EVE System", "owner_type": "eve_server", "response": "Undecided", "text": "o7: The EVE Online Show features latest developer news, fast paced action, community overviews and a lot more with CCP Guard and CCP Mimic. Join the thrilling o7 live broadcast at 20:00 EVE time (=UTC) on EVE TV. Don't miss it!", "title": "o7 The EVE Online Show" } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "Full details of a specific event", "properties": { "date": { "description": "date string", "format": "date-time", "title": "get_characters_character_id_calendar_event_id_date", "type": "string" }, "duration": { "description": "Length in minutes", "format": "int64", "title": "get_characters_character_id_calendar_event_id_duration", "type": "integer" }, "event_id": { "description": "event_id integer", "format": "int32", "title": "get_characters_character_id_calendar_event_id_event_id", "type": "integer" }, "importance": { "description": "importance integer", "format": "int32", "title": "get_characters_character_id_calendar_event_id_importance", "type": "integer" }, "owner_id": { "description": "owner_id integer", "format": "int64", "title": "get_characters_character_id_calendar_event_id_owner_id", "type": "integer" }, "owner_name": { "description": "owner_name string", "title": "get_characters_character_id_calendar_event_id_owner_name", "type": "string" }, "owner_type": { "description": "owner_type string", "enum": ["eve_server", "corporation", "faction", "character", "alliance"], "title": "get_characters_character_id_calendar_event_id_owner_type", "type": "string" }, "response": { "description": "response string", "title": "get_characters_character_id_calendar_event_id_response", "type": "string" }, "text": { "description": "text string", "title": "get_characters_character_id_calendar_event_id_text", "type": "string" }, "title": { "description": "title string", "title": "get_characters_character_id_calendar_event_id_title", "type": "string" } }, "required": ["event_id", "owner_id", "owner_name", "date", "title", "duration", "importance", "response", "text", "owner_type"], "title": "get_characters_character_id_calendar_event_id_ok", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-calendar.read_calendar_events.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_calendar_event_id_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_calendar_event_id_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_calendar_event_id_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_calendar_event_id_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-calendar.read_calendar_events.v1"] }], "summary": "Get an event", "tags": ["Calendar"] }, "put": { "description": "Set your response status to an event\n\n---\n\nAlternate route: `/v3/characters/{character_id}/calendar/{event_id}/`\n\nAlternate route: `/dev/characters/{character_id}/calendar/{event_id}/`\n", "operationId": "put_characters_character_id_calendar_event_id", "parameters": [{ "description": "The character ID requesting the event", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "description": "The ID of the event requested", "format": "int32", "in": "path", "name": "event_id", "required": true, "type": "integer" }, { "description": "The response value to set, overriding current value.", "in": "body", "name": "response", "required": true, "schema": { "description": "response schema", "properties": { "response": { "description": "response string", "enum": ["accepted", "declined", "tentative"], "title": "put_characters_character_id_calendar_event_id_response", "type": "string" } }, "required": ["response"], "title": "put_characters_character_id_calendar_event_id_response" } }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Event updated" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-calendar.respond_calendar_events.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "put_characters_character_id_calendar_event_id_403_forbidden", "type": "string" } }, "title": "put_characters_character_id_calendar_event_id_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "put_characters_character_id_calendar_event_id_500_internal_server_error", "type": "string" } }, "title": "put_characters_character_id_calendar_event_id_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-calendar.respond_calendar_events.v1"] }], "summary": "Respond to an event", "tags": ["Calendar"] } }, "/characters/{character_id}/clones/": { "get": { "description": "A list of the character's clones\n\n---\n\nAlternate route: `/v2/characters/{character_id}/clones/`\n\nAlternate route: `/dev/characters/{character_id}/clones/`\n\n\n---\n\nThis route is cached for up to 120 seconds", "operationId": "get_characters_character_id_clones", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Clone information for the given character", "examples": { "application/json": { "home_location": { "location_id": 1021348135816, "location_type": "structure" }, "jump_clones": [{ "implants": [22118], "location_id": 60003463, "location_type": "station" }, { "implants": [], "location_id": 1021348135816, "location_type": "structure" }] } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "home_location": { "description": "home_location object", "properties": { "location_id": { "description": "location_id integer", "format": "int64", "title": "get_characters_character_id_clones_location_id", "type": "integer" }, "location_type": { "description": "location_type string", "enum": ["station", "structure"], "title": "get_characters_character_id_clones_location_type", "type": "string" } }, "title": "get_characters_character_id_clones_home_location", "type": "object" }, "jump_clones": { "description": "jump_clones array", "items": { "description": "jump_clone object", "properties": { "implants": { "description": "implants array", "items": { "description": "implant integer", "format": "int32", "title": "get_characters_character_id_clones_implant", "type": "integer" }, "title": "get_characters_character_id_clones_implants", "type": "array" }, "location_id": { "description": "location_id integer", "format": "int64", "title": "get_characters_character_id_clones_location_id", "type": "integer" }, "location_type": { "description": "location_type string", "enum": ["station", "structure"], "title": "get_characters_character_id_clones_location_type", "type": "string" } }, "title": "get_characters_character_id_clones_jump_clone", "type": "object" }, "title": "get_characters_character_id_clones_jump_clones", "type": "array" }, "last_jump_date": { "description": "last_jump_date string", "format": "date-time", "title": "get_characters_character_id_clones_last_jump_date", "type": "string" } }, "required": ["jump_clones"], "title": "get_characters_character_id_clones_ok", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-clones.read_clones.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_clones_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_clones_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_clones_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_clones_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-clones.read_clones.v1"] }], "summary": "Get clones", "tags": ["Clones"] } }, "/characters/{character_id}/contacts/": { "delete": { "description": "Bulk delete contacts\n\n---\n\nAlternate route: `/v1/characters/{character_id}/contacts/`\n\nAlternate route: `/legacy/characters/{character_id}/contacts/`\n\nAlternate route: `/dev/characters/{character_id}/contacts/`\n", "operationId": "delete_characters_character_id_contacts", "parameters": [{ "description": "ID for a character", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "description": "A list of contacts to edit", "in": "body", "name": "contact_ids", "required": true, "schema": { "description": "contact_ids array", "items": { "description": "ID of the contact to edit", "format": "int32", "title": "delete_characters_character_id_contacts_contact_id", "type": "integer" }, "maxLength": 20, "minLength": 1, "title": "delete_characters_character_id_contacts_contact_ids", "type": "array" } }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Contacts deleted" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-characters.write_contacts.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "delete_characters_character_id_contacts_403_forbidden", "type": "string" } }, "title": "delete_characters_character_id_contacts_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "delete_characters_character_id_contacts_500_internal_server_error", "type": "string" } }, "title": "delete_characters_character_id_contacts_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-characters.write_contacts.v1"] }], "summary": "Delete contacts", "tags": ["Contacts"] }, "get": { "description": "Return contacts of a character\n\n---\n\nAlternate route: `/v1/characters/{character_id}/contacts/`\n\nAlternate route: `/legacy/characters/{character_id}/contacts/`\n\nAlternate route: `/dev/characters/{character_id}/contacts/`\n\n\n---\n\nThis route is cached for up to 300 seconds", "operationId": "get_characters_character_id_contacts", "parameters": [{ "description": "ID for a character", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": 1, "description": "page integer", "format": "int32", "in": "query", "minimum": 1, "name": "page", "required": false, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of contacts", "examples": { "application/json": [{ "contact_id": 123, "contact_type": "character", "is_blocked": false, "is_watched": true, "standing": 10.0 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "contact_id": { "description": "contact_id integer", "format": "int32", "title": "get_characters_character_id_contacts_contact_id", "type": "integer" }, "contact_type": { "description": "contact_type string", "enum": ["character", "corporation", "alliance", "faction"], "title": "get_characters_character_id_contacts_contact_type", "type": "string" }, "is_blocked": { "description": "Whether this contact is in the blocked list. Note a missing value denotes unknown, not true or false", "title": "get_characters_character_id_contacts_is_blocked", "type": "boolean" }, "is_watched": { "description": "Whether this contact is being watched", "title": "get_characters_character_id_contacts_is_watched", "type": "boolean" }, "label_id": { "description": "Custom label of the contact", "format": "int64", "title": "get_characters_character_id_contacts_label_id", "type": "integer" }, "standing": { "description": "Standing of the contact", "format": "float", "title": "get_characters_character_id_contacts_standing", "type": "number" } }, "required": ["standing", "contact_type", "contact_id"], "title": "get_characters_character_id_contacts_200_ok", "type": "object" }, "title": "get_characters_character_id_contacts_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-characters.read_contacts.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_contacts_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_contacts_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_contacts_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_contacts_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-characters.read_contacts.v1"] }], "summary": "Get contacts", "tags": ["Contacts"] }, "post": { "description": "Bulk add contacts with same settings\n\n---\n\nAlternate route: `/v1/characters/{character_id}/contacts/`\n\nAlternate route: `/legacy/characters/{character_id}/contacts/`\n\nAlternate route: `/dev/characters/{character_id}/contacts/`\n", "operationId": "post_characters_character_id_contacts", "parameters": [{ "description": "ID for a character", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "description": "Standing for the new contact", "format": "float", "in": "query", "maximum": 10, "minimum": -10, "name": "standing", "required": true, "type": "number" }, { "default": false, "description": "Whether the new contact should be watched, note this is only effective on characters", "in": "query", "name": "watched", "required": false, "type": "boolean" }, { "default": 0, "description": "Add a custom label to the new contact", "format": "int64", "in": "query", "name": "label_id", "required": false, "type": "integer" }, { "description": "A list of contacts to add", "in": "body", "name": "contact_ids", "required": true, "schema": { "description": "contact_ids array", "items": { "description": "ID of the contact to add", "format": "int32", "title": "post_characters_character_id_contacts_contact_id", "type": "integer" }, "maxLength": 20, "minLength": 1, "title": "post_characters_character_id_contacts_contact_ids", "type": "array" } }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "201": { "description": "A list of contact ids that successfully created", "examples": { "application/json": [123, 456] }, "schema": { "description": "201 created array", "items": { "description": "201 created integer", "format": "int32", "title": "post_characters_character_id_contacts_201_created", "type": "integer" }, "title": "post_characters_character_id_contacts_created", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-characters.write_contacts.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "post_characters_character_id_contacts_403_forbidden", "type": "string" } }, "title": "post_characters_character_id_contacts_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "post_characters_character_id_contacts_500_internal_server_error", "type": "string" } }, "title": "post_characters_character_id_contacts_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-characters.write_contacts.v1"] }], "summary": "Add contacts", "tags": ["Contacts"] }, "put": { "description": "Bulk edit contacts with same settings\n\n---\n\nAlternate route: `/v1/characters/{character_id}/contacts/`\n\nAlternate route: `/legacy/characters/{character_id}/contacts/`\n\nAlternate route: `/dev/characters/{character_id}/contacts/`\n", "operationId": "put_characters_character_id_contacts", "parameters": [{ "description": "ID for a character", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "description": "Standing for the contact", "format": "float", "in": "query", "maximum": 10, "minimum": -10, "name": "standing", "required": true, "type": "number" }, { "default": false, "description": "Whether the contact should be watched, note this is only effective on characters", "in": "query", "name": "watched", "required": false, "type": "boolean" }, { "default": 0, "description": "Add a custom label to the contact, use 0 for clearing label", "format": "int64", "in": "query", "name": "label_id", "required": false, "type": "integer" }, { "description": "A list of contacts to edit", "in": "body", "name": "contact_ids", "required": true, "schema": { "description": "contact_ids array", "items": { "description": "ID of the contact to edit", "format": "int32", "title": "put_characters_character_id_contacts_contact_id", "type": "integer" }, "maxLength": 20, "minLength": 1, "title": "put_characters_character_id_contacts_contact_ids", "type": "array" } }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Contacts updated" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-characters.write_contacts.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "put_characters_character_id_contacts_403_forbidden", "type": "string" } }, "title": "put_characters_character_id_contacts_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "put_characters_character_id_contacts_500_internal_server_error", "type": "string" } }, "title": "put_characters_character_id_contacts_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-characters.write_contacts.v1"] }], "summary": "Edit contacts", "tags": ["Contacts"] } }, "/characters/{character_id}/contacts/labels/": { "get": { "description": "Return custom labels for contacts the character defined\n\n---\n\nAlternate route: `/v1/characters/{character_id}/contacts/labels/`\n\nAlternate route: `/legacy/characters/{character_id}/contacts/labels/`\n\nAlternate route: `/dev/characters/{character_id}/contacts/labels/`\n\n\n---\n\nThis route is cached for up to 300 seconds", "operationId": "get_characters_character_id_contacts_labels", "parameters": [{ "description": "ID for a character", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of contact labels", "examples": { "application/json": [{ "label_id": 123, "label_name": "Friends" }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "label_id": { "description": "label_id integer", "format": "int64", "title": "get_characters_character_id_contacts_labels_label_id", "type": "integer" }, "label_name": { "description": "label_name string", "title": "get_characters_character_id_contacts_labels_label_name", "type": "string" } }, "required": ["label_id", "label_name"], "title": "get_characters_character_id_contacts_labels_200_ok", "type": "object" }, "title": "get_characters_character_id_contacts_labels_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-characters.read_contacts.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_contacts_labels_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_contacts_labels_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_contacts_labels_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_contacts_labels_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-characters.read_contacts.v1"] }], "summary": "Get contact labels", "tags": ["Contacts"] } }, "/characters/{character_id}/corporationhistory/": { "get": { "description": "Get a list of all the corporations a character has been a member of\n\n---\n\nAlternate route: `/v1/characters/{character_id}/corporationhistory/`\n\nAlternate route: `/legacy/characters/{character_id}/corporationhistory/`\n\nAlternate route: `/dev/characters/{character_id}/corporationhistory/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_characters_character_id_corporationhistory", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Corporation history for the given character", "examples": { "application/json": [{ "corporation_id": 90000001, "is_deleted": false, "record_id": 500, "start_date": "2016-06-26T20:00:00Z" }, { "corporation_id": 90000002, "is_deleted": false, "record_id": 501, "start_date": "2016-07-26T20:00:00Z" }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "corporation_id": { "description": "corporation_id integer", "format": "int32", "title": "get_characters_character_id_corporationhistory_corporation_id", "type": "integer" }, "is_deleted": { "description": "True if the corporation has been deleted", "title": "get_characters_character_id_corporationhistory_is_deleted", "type": "boolean" }, "record_id": { "description": "An incrementing ID that can be used to canonically establish order of records in cases where dates may be ambiguous", "format": "int32", "title": "get_characters_character_id_corporationhistory_record_id", "type": "integer" }, "start_date": { "description": "start_date string", "format": "date-time", "title": "get_characters_character_id_corporationhistory_start_date", "type": "string" } }, "title": "get_characters_character_id_corporationhistory_200_ok", "type": "object" }, "title": "get_characters_character_id_corporationhistory_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_corporationhistory_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_corporationhistory_internal_server_error", "type": "object" } } }, "summary": "Get corporation history", "tags": ["Character"] } }, "/characters/{character_id}/cspa/": { "post": { "description": "Takes a source character ID in the url and a set of target character ID's in the body, returns a CSPA charge cost\n\n---\n\nAlternate route: `/v3/characters/{character_id}/cspa/`\n\nAlternate route: `/legacy/characters/{character_id}/cspa/`\n\nAlternate route: `/dev/characters/{character_id}/cspa/`\n", "operationId": "post_characters_character_id_cspa", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "description": "The target characters to calculate the charge for", "in": "body", "name": "characters", "required": true, "schema": { "description": "characters schema", "properties": { "characters": { "description": "characters array", "items": { "description": "character integer", "format": "int32", "title": "post_characters_character_id_cspa_character", "type": "integer" }, "minItems": 1, "title": "post_characters_character_id_cspa_characters", "type": "array", "uniqueItems": true } }, "required": ["characters"], "title": "post_characters_character_id_cspa_characters" } }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "201": { "description": "Aggregate cost of sending a mail from the source character to the target characters, in ISK hundredths", "examples": { "application/json": { "cost": 295000 } }, "schema": { "description": "201 created object", "properties": { "cost": { "description": "cost integer", "format": "int64", "title": "post_characters_character_id_cspa_cost", "type": "integer" } }, "title": "post_characters_character_id_cspa_created", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-characters.read_contacts.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "post_characters_character_id_cspa_403_forbidden", "type": "string" } }, "title": "post_characters_character_id_cspa_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "post_characters_character_id_cspa_500_internal_server_error", "type": "string" } }, "title": "post_characters_character_id_cspa_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-characters.read_contacts.v1"] }], "summary": "Calculate a CSPA charge cost", "tags": ["Character"] } }, "/characters/{character_id}/killmails/recent/": { "get": { "description": "Return a list of character's recent kills and losses\n\n---\n\nAlternate route: `/v1/characters/{character_id}/killmails/recent/`\n\nAlternate route: `/legacy/characters/{character_id}/killmails/recent/`\n\nAlternate route: `/dev/characters/{character_id}/killmails/recent/`\n\n\n---\n\nThis route is cached for up to 120 seconds", "operationId": "get_characters_character_id_killmails_recent", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": 50, "description": "How many killmails to return at maximum", "format": "int32", "in": "query", "maximum": 5000, "name": "max_count", "required": false, "type": "integer" }, { "description": "Only return killmails with ID smaller than this.\n", "format": "int32", "in": "query", "name": "max_kill_id", "required": false, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of killmail IDs and hashes", "examples": { "application/json": [{ "killmail_hash": "8eef5e8fb6b88fe3407c489df33822b2e3b57a5e", "killmail_id": 2 }, { "killmail_hash": "b41ccb498ece33d64019f64c0db392aa3aa701fb", "killmail_id": 1 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "killmail_hash": { "description": "A hash of this killmail", "title": "get_characters_character_id_killmails_recent_killmail_hash", "type": "string" }, "killmail_id": { "description": "ID of this killmail", "format": "int32", "title": "get_characters_character_id_killmails_recent_killmail_id", "type": "integer" } }, "required": ["killmail_id", "killmail_hash"], "title": "get_characters_character_id_killmails_recent_200_ok", "type": "object" }, "title": "get_characters_character_id_killmails_recent_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-killmails.read_killmails.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_killmails_recent_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_killmails_recent_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_killmails_recent_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_killmails_recent_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-killmails.read_killmails.v1"] }], "summary": "List kills and losses", "tags": ["Killmails"] } }, "/characters/{character_id}/location/": { "get": { "description": "Information about the characters current location. Returns the current solar system id, and also the current station or structure ID if applicable.\n\n---\n\nAlternate route: `/v1/characters/{character_id}/location/`\n\nAlternate route: `/legacy/characters/{character_id}/location/`\n\nAlternate route: `/dev/characters/{character_id}/location/`\n\n\n---\n\nThis route is cached for up to 5 seconds", "operationId": "get_characters_character_id_location", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Information about the characters current location. Returns the current solar system id, and also the current station or structure ID if applicable.", "examples": { "application/json": { "solar_system_id": 30002505, "structure_id": 1000000016989 } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "solar_system_id": { "description": "solar_system_id integer", "format": "int32", "title": "get_characters_character_id_location_solar_system_id", "type": "integer" }, "station_id": { "description": "station_id integer", "format": "int32", "title": "get_characters_character_id_location_station_id", "type": "integer" }, "structure_id": { "description": "structure_id integer", "format": "int64", "title": "get_characters_character_id_location_structure_id", "type": "integer" } }, "required": ["solar_system_id"], "title": "get_characters_character_id_location_ok", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-location.read_location.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_location_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_location_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_location_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_location_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-location.read_location.v1"] }], "summary": "Get character location", "tags": ["Location"] } }, "/characters/{character_id}/mail/": { "get": { "description": "Return the 50 most recent mail headers belonging to the character that match the query criteria. Queries can be filtered by label, and last_mail_id can be used to paginate backwards.\n\n---\n\nAlternate route: `/v1/characters/{character_id}/mail/`\n\nAlternate route: `/legacy/characters/{character_id}/mail/`\n\nAlternate route: `/dev/characters/{character_id}/mail/`\n\n\n---\n\nThis route is cached for up to 30 seconds", "operationId": "get_characters_character_id_mail", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "description": "Fetch only mails that match one or more of the given labels", "in": "query", "items": { "format": "int64", "minimum": 0, "type": "integer" }, "minItems": 1, "name": "labels", "required": false, "type": "array", "uniqueItems": true }, { "description": "List only mail with an ID lower than the given ID, if present", "format": "int32", "in": "query", "name": "last_mail_id", "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "The requested mail", "examples": { "application/json": [{ "from": 90000001, "is_read": true, "labels": [3], "mail_id": 7, "recipients": [{ "recipient_id": 90000002, "recipient_type": "character" }], "subject": "Title for EVE Mail", "timestamp": "2015-09-30T16:07:00Z" }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "from": { "description": "From whom the mail was sent", "format": "int32", "title": "get_characters_character_id_mail_from", "type": "integer" }, "is_read": { "description": "is_read boolean", "title": "get_characters_character_id_mail_is_read", "type": "boolean" }, "labels": { "description": "labels array", "items": { "description": "label integer", "format": "int64", "title": "get_characters_character_id_mail_label", "type": "integer" }, "maxItems": 25, "minimum": 0, "title": "get_characters_character_id_mail_labels", "type": "array", "uniqueItems": true }, "mail_id": { "description": "mail_id integer", "format": "int64", "title": "get_characters_character_id_mail_mail_id", "type": "integer" }, "recipients": { "description": "Recipients of the mail", "items": { "description": "recipient object", "properties": { "recipient_id": { "description": "recipient_id integer", "format": "int32", "title": "get_characters_character_id_mail_recipient_id", "type": "integer" }, "recipient_type": { "description": "recipient_type string", "enum": ["alliance", "character", "corporation", "mailing_list"], "title": "get_characters_character_id_mail_recipient_type", "type": "string" } }, "required": ["recipient_type", "recipient_id"], "title": "get_characters_character_id_mail_recipient", "type": "object" }, "maxItems": 50, "minItems": 1, "title": "get_characters_character_id_mail_recipients", "type": "array", "uniqueItems": true }, "subject": { "description": "Mail subject", "title": "get_characters_character_id_mail_subject", "type": "string" }, "timestamp": { "description": "When the mail was sent", "format": "date-time", "title": "get_characters_character_id_mail_timestamp", "type": "string" } }, "title": "get_characters_character_id_mail_200_ok", "type": "object" }, "title": "get_characters_character_id_mail_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-mail.read_mail.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_mail_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_mail_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_mail_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_mail_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-mail.read_mail.v1"] }], "summary": "Return mail headers", "tags": ["Mail"] }, "post": { "description": "Create and send a new mail\n\n---\n\nAlternate route: `/v1/characters/{character_id}/mail/`\n\nAlternate route: `/legacy/characters/{character_id}/mail/`\n\nAlternate route: `/dev/characters/{character_id}/mail/`\n", "operationId": "post_characters_character_id_mail", "parameters": [{ "description": "The sender's character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "description": "The mail to send", "in": "body", "name": "mail", "required": true, "schema": { "description": "mail schema", "properties": { "approved_cost": { "default": 0, "description": "approved_cost integer", "format": "int64", "title": "post_characters_character_id_mail_approved_cost", "type": "integer" }, "body": { "description": "body string", "maxLength": 10000, "title": "post_characters_character_id_mail_body", "type": "string" }, "recipients": { "description": "recipients array", "items": { "description": "recipient object", "properties": { "recipient_id": { "description": "recipient_id integer", "format": "int32", "title": "post_characters_character_id_mail_recipient_id", "type": "integer" }, "recipient_type": { "description": "recipient_type string", "enum": ["alliance", "character", "corporation", "mailing_list"], "title": "post_characters_character_id_mail_recipient_type", "type": "string" } }, "required": ["recipient_type", "recipient_id"], "title": "post_characters_character_id_mail_recipient", "type": "object" }, "maxItems": 50, "minItems": 1, "title": "post_characters_character_id_mail_recipients", "type": "array" }, "subject": { "description": "subject string", "maxLength": 1000, "title": "post_characters_character_id_mail_subject", "type": "string" } }, "required": ["recipients", "subject", "body"], "title": "post_characters_character_id_mail_mail" } }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "201": { "description": "Mail created", "examples": { "application/json": 13 }, "schema": { "description": "Mail ID", "format": "int32", "title": "post_characters_character_id_mail_created", "type": "integer" } }, "400": { "description": "Only one corporation, alliance, or mailing list can be the\nrecipient of a mail\n", "examples": { "application/json": { "error": "Bad request message" } }, "schema": { "description": "Bad request", "properties": { "error": { "description": "Bad request message", "title": "post_characters_character_id_mail_400_bad_request", "type": "string" } }, "title": "post_characters_character_id_mail_bad_request", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-mail.send_mail.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "post_characters_character_id_mail_403_forbidden", "type": "string" } }, "title": "post_characters_character_id_mail_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "post_characters_character_id_mail_500_internal_server_error", "type": "string" } }, "title": "post_characters_character_id_mail_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-mail.send_mail.v1"] }], "summary": "Send a new mail", "tags": ["Mail"] } }, "/characters/{character_id}/mail/labels/": { "get": { "description": "Return a list of the users mail labels, unread counts for each label and a total unread count.\n\n---\n\nAlternate route: `/v3/characters/{character_id}/mail/labels/`\n\nAlternate route: `/dev/characters/{character_id}/mail/labels/`\n\n\n---\n\nThis route is cached for up to 30 seconds", "operationId": "get_characters_character_id_mail_labels", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of mail labels and unread counts", "examples": { "application/json": { "labels": [{ "color_hex": "#660066", "label_id": 16, "name": "PINK", "unread_count": 4 }, { "color_hex": "#ffffff", "label_id": 17, "name": "WHITE", "unread_count": 1 }], "total_unread_count": 5 } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "labels": { "description": "labels array", "items": { "description": "label object", "properties": { "color": { "default": "#ffffff", "description": "color string", "enum": ["#ffffff", "#ffff01", "#ff6600", "#fe0000", "#9a0000", "#660066", "#0000fe", "#0099ff", "#01ffff", "#00ff33", "#349800", "#006634", "#666666", "#999999", "#e6e6e6", "#ffffcd", "#99ffff", "#ccff9a"], "title": "get_characters_character_id_mail_labels_color", "type": "string" }, "label_id": { "description": "label_id integer", "format": "int32", "minimum": 0, "title": "get_characters_character_id_mail_labels_label_id", "type": "integer" }, "name": { "description": "name string", "maxLength": 40, "title": "get_characters_character_id_mail_labels_name", "type": "string" }, "unread_count": { "description": "unread_count integer", "format": "int32", "minimum": 0, "title": "get_characters_character_id_mail_labels_unread_count", "type": "integer" } }, "title": "get_characters_character_id_mail_labels_label", "type": "object" }, "title": "get_characters_character_id_mail_labels_labels", "type": "array" }, "total_unread_count": { "description": "total_unread_count integer", "format": "int32", "minimum": 0, "title": "get_characters_character_id_mail_labels_total_unread_count", "type": "integer" } }, "title": "get_characters_character_id_mail_labels_ok", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-mail.read_mail.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_mail_labels_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_mail_labels_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_mail_labels_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_mail_labels_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-mail.read_mail.v1"] }], "summary": "Get mail labels and unread counts", "tags": ["Mail"] }, "post": { "description": "Create a mail label\n\n---\n\nAlternate route: `/v2/characters/{character_id}/mail/labels/`\n\nAlternate route: `/legacy/characters/{character_id}/mail/labels/`\n\nAlternate route: `/dev/characters/{character_id}/mail/labels/`\n", "operationId": "post_characters_character_id_mail_labels", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "description": "Label to create", "in": "body", "name": "label", "schema": { "description": "label object", "properties": { "color": { "default": "#ffffff", "description": "Hexadecimal string representing label color,\nin RGB format\n", "enum": ["#ffffff", "#ffff01", "#ff6600", "#fe0000", "#9a0000", "#660066", "#0000fe", "#0099ff", "#01ffff", "#00ff33", "#349800", "#006634", "#666666", "#999999", "#e6e6e6", "#ffffcd", "#99ffff", "#ccff9a"], "title": "post_characters_character_id_mail_labels_color", "type": "string" }, "name": { "description": "name string", "maxLength": 40, "minLength": 1, "title": "post_characters_character_id_mail_labels_name", "type": "string" } }, "required": ["name"], "title": "post_characters_character_id_mail_labels_label", "type": "object" } }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "201": { "description": "Label created", "examples": { "application/json": 128 }, "schema": { "description": "Label ID", "format": "int64", "title": "post_characters_character_id_mail_labels_created", "type": "integer" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-mail.organize_mail.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "post_characters_character_id_mail_labels_403_forbidden", "type": "string" } }, "title": "post_characters_character_id_mail_labels_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "post_characters_character_id_mail_labels_500_internal_server_error", "type": "string" } }, "title": "post_characters_character_id_mail_labels_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-mail.organize_mail.v1"] }], "summary": "Create a mail label", "tags": ["Mail"] } }, "/characters/{character_id}/mail/lists/": { "get": { "description": "Return all mailing lists that the character is subscribed to\n\n\n---\n\nAlternate route: `/v1/characters/{character_id}/mail/lists/`\n\nAlternate route: `/legacy/characters/{character_id}/mail/lists/`\n\nAlternate route: `/dev/characters/{character_id}/mail/lists/`\n\n\n---\n\nThis route is cached for up to 120 seconds", "operationId": "get_characters_character_id_mail_lists", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Mailing lists", "examples": { "application/json": [{ "mailing_list_id": 1, "name": "test_mailing_list" }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "mailing_list_id": { "description": "Mailing list ID", "format": "int32", "title": "get_characters_character_id_mail_lists_mailing_list_id", "type": "integer" }, "name": { "description": "name string", "title": "get_characters_character_id_mail_lists_name", "type": "string" } }, "required": ["mailing_list_id", "name"], "title": "get_characters_character_id_mail_lists_200_ok", "type": "object" }, "title": "get_characters_character_id_mail_lists_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-mail.read_mail.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_mail_lists_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_mail_lists_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_mail_lists_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_mail_lists_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-mail.read_mail.v1"] }], "summary": "Return mailing list subscriptions", "tags": ["Mail"] } }, "/characters/{character_id}/mail/{mail_id}/": { "delete": { "description": "Delete a mail\n\n---\n\nAlternate route: `/v1/characters/{character_id}/mail/{mail_id}/`\n\nAlternate route: `/legacy/characters/{character_id}/mail/{mail_id}/`\n\nAlternate route: `/dev/characters/{character_id}/mail/{mail_id}/`\n", "operationId": "delete_characters_character_id_mail_mail_id", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "description": "An EVE mail ID", "format": "int32", "in": "path", "name": "mail_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Mail deleted" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-mail.organize_mail.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "delete_characters_character_id_mail_mail_id_403_forbidden", "type": "string" } }, "title": "delete_characters_character_id_mail_mail_id_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "delete_characters_character_id_mail_mail_id_500_internal_server_error", "type": "string" } }, "title": "delete_characters_character_id_mail_mail_id_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-mail.organize_mail.v1"] }], "summary": "Delete a mail", "tags": ["Mail"] }, "get": { "description": "Return the contents of an EVE mail\n\n---\n\nAlternate route: `/v1/characters/{character_id}/mail/{mail_id}/`\n\nAlternate route: `/legacy/characters/{character_id}/mail/{mail_id}/`\n\nAlternate route: `/dev/characters/{character_id}/mail/{mail_id}/`\n\n\n---\n\nThis route is cached for up to 30 seconds", "operationId": "get_characters_character_id_mail_mail_id", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "description": "An EVE mail ID", "format": "int32", "in": "path", "name": "mail_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Contents of a mail", "examples": { "application/json": { "body": "blah blah blah", "from": 90000001, "labels": [2, 32], "read": false, "subject": "test", "timestamp": "2015-09-30T16:07:00Z" } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "body": { "description": "Mail's body", "title": "get_characters_character_id_mail_mail_id_body", "type": "string" }, "from": { "description": "From whom the mail was sent", "format": "int32", "title": "get_characters_character_id_mail_mail_id_from", "type": "integer" }, "labels": { "description": "Labels attached to the mail", "items": { "description": "label integer", "format": "int64", "minimum": 0, "title": "get_characters_character_id_mail_mail_id_label", "type": "integer", "uniqueItems": true }, "title": "get_characters_character_id_mail_mail_id_labels", "type": "array" }, "read": { "description": "Whether the mail is flagged as read", "title": "get_characters_character_id_mail_mail_id_read", "type": "boolean" }, "recipients": { "description": "Recipients of the mail", "items": { "description": "recipient object", "properties": { "recipient_id": { "description": "recipient_id integer", "format": "int32", "title": "get_characters_character_id_mail_mail_id_recipient_id", "type": "integer" }, "recipient_type": { "description": "recipient_type string", "enum": ["alliance", "character", "corporation", "mailing_list"], "title": "get_characters_character_id_mail_mail_id_recipient_type", "type": "string" } }, "required": ["recipient_type", "recipient_id"], "title": "get_characters_character_id_mail_mail_id_recipient", "type": "object" }, "maxItems": 50, "minItems": 1, "title": "get_characters_character_id_mail_mail_id_recipients", "type": "array", "uniqueItems": true }, "subject": { "description": "Mail subject", "title": "get_characters_character_id_mail_mail_id_subject", "type": "string" }, "timestamp": { "description": "When the mail was sent", "format": "date-time", "title": "get_characters_character_id_mail_mail_id_timestamp", "type": "string" } }, "title": "get_characters_character_id_mail_mail_id_ok", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-mail.read_mail.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_mail_mail_id_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_mail_mail_id_forbidden", "type": "object" } }, "404": { "description": "Mail not found", "examples": { "application/json": { "error": "Not found message" } }, "schema": { "description": "Not found", "properties": { "error": { "description": "Not found message", "title": "get_characters_character_id_mail_mail_id_404_not_found", "type": "string" } }, "title": "get_characters_character_id_mail_mail_id_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_mail_mail_id_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_mail_mail_id_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-mail.read_mail.v1"] }], "summary": "Return a mail", "tags": ["Mail"] }, "put": { "description": "Update metadata about a mail\n\n---\n\nAlternate route: `/v1/characters/{character_id}/mail/{mail_id}/`\n\nAlternate route: `/legacy/characters/{character_id}/mail/{mail_id}/`\n\nAlternate route: `/dev/characters/{character_id}/mail/{mail_id}/`\n", "operationId": "put_characters_character_id_mail_mail_id", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "description": "An EVE mail ID", "format": "int32", "in": "path", "name": "mail_id", "required": true, "type": "integer" }, { "description": "Data used to update the mail", "in": "body", "name": "contents", "required": true, "schema": { "description": "contents object", "properties": { "labels": { "description": "Labels to assign to the mail. Pre-existing labels are unassigned.", "items": { "description": "label integer", "format": "int64", "minimum": 0, "title": "put_characters_character_id_mail_mail_id_label", "type": "integer", "uniqueItems": true }, "title": "put_characters_character_id_mail_mail_id_labels", "type": "array" }, "read": { "description": "Whether the mail is flagged as read", "title": "put_characters_character_id_mail_mail_id_read", "type": "boolean" } }, "title": "put_characters_character_id_mail_mail_id_contents", "type": "object" } }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Mail updated" }, "400": { "description": "Invalid label ID; or No parameters in body -- nothing to do", "examples": { "application/json": { "error": "Bad request message" } }, "schema": { "description": "Bad request", "properties": { "error": { "description": "Bad request message", "title": "put_characters_character_id_mail_mail_id_400_bad_request", "type": "string" } }, "title": "put_characters_character_id_mail_mail_id_bad_request", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-mail.organize_mail.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "put_characters_character_id_mail_mail_id_403_forbidden", "type": "string" } }, "title": "put_characters_character_id_mail_mail_id_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "put_characters_character_id_mail_mail_id_500_internal_server_error", "type": "string" } }, "title": "put_characters_character_id_mail_mail_id_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-mail.organize_mail.v1"] }], "summary": "Update metadata about a mail", "tags": ["Mail"] } }, "/characters/{character_id}/planets/": { "get": { "description": "Returns a list of all planetary colonies owned by a character.\n\n---\n\nAlternate route: `/v1/characters/{character_id}/planets/`\n\nAlternate route: `/legacy/characters/{character_id}/planets/`\n\nAlternate route: `/dev/characters/{character_id}/planets/`\n\n\n---\n\nThis route is cached for up to 600 seconds", "operationId": "get_characters_character_id_planets", "parameters": [{ "description": "Character id of the target character", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "List of colonies", "examples": { "application/json": [{ "last_update": "2016-11-28T16:42:51Z", "num_pins": 1, "owner_id": 90000001, "planet_id": 40023691, "planet_type": "plasma", "solar_system_id": 30000379, "upgrade_level": 0 }, { "last_update": "2016-11-28T16:41:54Z", "num_pins": 1, "owner_id": 90000001, "planet_id": 40023697, "planet_type": "barren", "solar_system_id": 30000379, "upgrade_level": 0 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "last_update": { "description": "last_update string", "format": "date-time", "title": "get_characters_character_id_planets_last_update", "type": "string" }, "num_pins": { "description": "num_pins integer", "format": "int32", "minimum": 1, "title": "get_characters_character_id_planets_num_pins", "type": "integer" }, "owner_id": { "description": "owner_id integer", "format": "int32", "title": "get_characters_character_id_planets_owner_id", "type": "integer" }, "planet_id": { "description": "planet_id integer", "format": "int32", "title": "get_characters_character_id_planets_planet_id", "type": "integer" }, "planet_type": { "description": "planet_type string", "enum": ["temperate", "barren", "oceanic", "ice", "gas", "lava", "storm", "plasma"], "title": "get_characters_character_id_planets_planet_type", "type": "string" }, "solar_system_id": { "description": "solar_system_id integer", "format": "int32", "title": "get_characters_character_id_planets_solar_system_id", "type": "integer" }, "upgrade_level": { "description": "upgrade_level integer", "format": "int32", "maximum": 5, "minimum": 0, "title": "get_characters_character_id_planets_upgrade_level", "type": "integer" } }, "required": ["solar_system_id", "planet_id", "planet_type", "owner_id", "last_update", "upgrade_level", "num_pins"], "title": "get_characters_character_id_planets_200_ok", "type": "object" }, "title": "get_characters_character_id_planets_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-planets.manage_planets.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_planets_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_planets_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_planets_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_planets_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-planets.manage_planets.v1"] }], "summary": "Get colonies", "tags": ["Planetary Interaction"] } }, "/characters/{character_id}/planets/{planet_id}/": { "get": { "description": "Returns full details on the layout of a single planetary colony, including links, pins and routes. Note: Planetary information is only recalculated when the colony is viewed through the client. Information on this endpoint will not update until this criteria is met.\n\n---\n\nAlternate route: `/v1/characters/{character_id}/planets/{planet_id}/`\n\nAlternate route: `/legacy/characters/{character_id}/planets/{planet_id}/`\n\nAlternate route: `/dev/characters/{character_id}/planets/{planet_id}/`\n\n\n---\n\nThis route is cached for up to 600 seconds", "operationId": "get_characters_character_id_planets_planet_id", "parameters": [{ "description": "Character id of the target character", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "description": "Planet id of the target planet", "format": "int32", "in": "path", "name": "planet_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Colony layout", "examples": { "application/json": { "links": [{ "destination_pin_id": 1000000017022, "link_level": 0, "source_pin_id": 1000000017021 }], "pins": [{ "is_running": true, "latitude": 1.55087844973, "longitude": 0.717145933308, "pin_id": 1000000017021, "type_id": 2254 }, { "is_running": true, "latitude": 1.53360639935, "longitude": 0.709775584394, "pin_id": 1000000017022, "type_id": 2256 }], "routes": [{ "content_type_id": 2393, "destination_pin_id": 1000000017030, "quantity": 20, "route_id": 4, "source_pin_id": 1000000017029 }] } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "links": { "description": "links array", "items": { "description": "link object", "properties": { "destination_pin_id": { "description": "destination_pin_id integer", "format": "int64", "title": "get_characters_character_id_planets_planet_id_destination_pin_id", "type": "integer" }, "link_level": { "description": "link_level integer", "format": "int32", "maximum": 10, "minimum": 0, "title": "get_characters_character_id_planets_planet_id_link_level", "type": "integer" }, "source_pin_id": { "description": "source_pin_id integer", "format": "int64", "title": "get_characters_character_id_planets_planet_id_source_pin_id", "type": "integer" } }, "required": ["source_pin_id", "destination_pin_id", "link_level"], "title": "get_characters_character_id_planets_planet_id_link", "type": "object" }, "title": "get_characters_character_id_planets_planet_id_links", "type": "array" }, "pins": { "description": "pins array", "items": { "description": "pin object", "properties": { "expiry_time": { "description": "expiry_time string", "format": "date-time", "title": "get_characters_character_id_planets_planet_id_expiry_time", "type": "string" }, "extractor_details": { "description": "extractor_details object", "properties": { "cycle_time": { "description": "in seconds", "format": "int32", "title": "get_characters_character_id_planets_planet_id_cycle_time", "type": "integer" }, "head_radius": { "description": "head_radius number", "format": "float", "title": "get_characters_character_id_planets_planet_id_head_radius", "type": "number" }, "heads": { "description": "heads array", "items": { "description": "head object", "properties": { "head_id": { "description": "head_id integer", "format": "int32", "maximum": 9, "minimum": 0, "title": "get_characters_character_id_planets_planet_id_head_id", "type": "integer" }, "latitude": { "description": "latitude number", "format": "float", "title": "get_characters_character_id_planets_planet_id_latitude", "type": "number" }, "longitude": { "description": "longitude number", "format": "float", "title": "get_characters_character_id_planets_planet_id_longitude", "type": "number" } }, "required": ["head_id", "latitude", "longitude"], "title": "get_characters_character_id_planets_planet_id_head", "type": "object" }, "title": "get_characters_character_id_planets_planet_id_heads", "type": "array" }, "product_type_id": { "description": "product_type_id integer", "format": "int32", "title": "get_characters_character_id_planets_planet_id_product_type_id", "type": "integer" }, "qty_per_cycle": { "description": "qty_per_cycle integer", "format": "int32", "title": "get_characters_character_id_planets_planet_id_qty_per_cycle", "type": "integer" } }, "required": ["heads", "product_type_id", "cycle_time", "head_radius", "qty_per_cycle"], "title": "get_characters_character_id_planets_planet_id_extractor_details", "type": "object" }, "factory_details": { "description": "factory_details object", "properties": { "schematic_id": { "description": "schematic_id integer", "format": "int32", "title": "get_characters_character_id_planets_planet_id_schematic_id", "type": "integer" } }, "required": ["schematic_id"], "title": "get_characters_character_id_planets_planet_id_factory_details", "type": "object" }, "install_time": { "description": "install_time string", "format": "date-time", "title": "get_characters_character_id_planets_planet_id_install_time", "type": "string" }, "last_cycle_start": { "description": "last_cycle_start string", "format": "date-time", "title": "get_characters_character_id_planets_planet_id_last_cycle_start", "type": "string" }, "latitude": { "description": "latitude number", "format": "float", "title": "get_characters_character_id_planets_planet_id_latitude", "type": "number" }, "longitude": { "description": "longitude number", "format": "float", "title": "get_characters_character_id_planets_planet_id_longitude", "type": "number" }, "pin_id": { "description": "pin_id integer", "format": "int64", "title": "get_characters_character_id_planets_planet_id_pin_id", "type": "integer" }, "schematic_id": { "description": "schematic_id integer", "format": "int32", "title": "get_characters_character_id_planets_planet_id_schematic_id", "type": "integer" }, "type_id": { "description": "type_id integer", "format": "int32", "title": "get_characters_character_id_planets_planet_id_type_id", "type": "integer" } }, "required": ["pin_id", "type_id", "latitude", "longitude"], "title": "get_characters_character_id_planets_planet_id_pin", "type": "object" }, "title": "get_characters_character_id_planets_planet_id_pins", "type": "array" }, "routes": { "description": "routes array", "items": { "description": "route object", "properties": { "content_type_id": { "description": "content_type_id integer", "format": "int32", "title": "get_characters_character_id_planets_planet_id_content_type_id", "type": "integer" }, "destination_pin_id": { "description": "destination_pin_id integer", "format": "int64", "title": "get_characters_character_id_planets_planet_id_destination_pin_id", "type": "integer" }, "quantity": { "description": "quantity integer", "format": "int64", "title": "get_characters_character_id_planets_planet_id_quantity", "type": "integer" }, "route_id": { "description": "route_id integer", "format": "int64", "title": "get_characters_character_id_planets_planet_id_route_id", "type": "integer" }, "source_pin_id": { "description": "source_pin_id integer", "format": "int64", "title": "get_characters_character_id_planets_planet_id_source_pin_id", "type": "integer" }, "waypoints": { "description": "waypoints array", "items": { "description": "waypoint object", "properties": { "order": { "description": "order integer", "format": "int32", "maximum": 5, "minimum": 1, "title": "get_characters_character_id_planets_planet_id_order", "type": "integer" }, "pin_id": { "description": "pin_id integer", "format": "int64", "title": "get_characters_character_id_planets_planet_id_pin_id", "type": "integer" } }, "required": ["pin_id", "order"], "title": "get_characters_character_id_planets_planet_id_waypoint", "type": "object" }, "title": "get_characters_character_id_planets_planet_id_waypoints", "type": "array" } }, "required": ["route_id", "source_pin_id", "destination_pin_id", "content_type_id", "quantity"], "title": "get_characters_character_id_planets_planet_id_route", "type": "object" }, "title": "get_characters_character_id_planets_planet_id_routes", "type": "array" } }, "required": ["links", "pins", "routes"], "title": "get_characters_character_id_planets_planet_id_ok", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-planets.manage_planets.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_planets_planet_id_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_planets_planet_id_forbidden", "type": "object" } }, "404": { "description": "Colony not found", "examples": { "application/json": { "error": "Colony not found" } }, "schema": { "description": "Colony not found", "properties": { "error": { "description": "error message", "title": "get_characters_character_id_planets_planet_id_error", "type": "string" } }, "title": "get_characters_character_id_planets_planet_id_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_planets_planet_id_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_planets_planet_id_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-planets.manage_planets.v1"] }], "summary": "Get colony layout", "tags": ["Planetary Interaction"] } }, "/characters/{character_id}/portrait/": { "get": { "description": "Get portrait urls for a character\n\n---\n\nAlternate route: `/v2/characters/{character_id}/portrait/`\n\nAlternate route: `/dev/characters/{character_id}/portrait/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_characters_character_id_portrait", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Public data for the given character", "examples": { "application/json": { "px128x128": "https://imageserver.eveonline.com/Character/95465499_128.jpg", "px256x256": "https://imageserver.eveonline.com/Character/95465499_256.jpg", "px512x512": "https://imageserver.eveonline.com/Character/95465499_512.jpg", "px64x64": "https://imageserver.eveonline.com/Character/95465499_64.jpg" } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "px128x128": { "description": "px128x128 string", "title": "get_characters_character_id_portrait_px128x128", "type": "string" }, "px256x256": { "description": "px256x256 string", "title": "get_characters_character_id_portrait_px256x256", "type": "string" }, "px512x512": { "description": "px512x512 string", "title": "get_characters_character_id_portrait_px512x512", "type": "string" }, "px64x64": { "description": "px64x64 string", "title": "get_characters_character_id_portrait_px64x64", "type": "string" } }, "title": "get_characters_character_id_portrait_ok", "type": "object" } }, "404": { "description": "No image server for this datasource", "examples": { "application/json": { "error": "No image server for this datasource" } }, "schema": { "description": "No image server for this datasource", "properties": { "error": { "description": "error message", "title": "get_characters_character_id_portrait_error", "type": "string" } }, "title": "get_characters_character_id_portrait_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_portrait_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_portrait_internal_server_error", "type": "object" } } }, "summary": "Get character portraits", "tags": ["Character"] } }, "/characters/{character_id}/search/": { "get": { "description": "Search for entities that match a given sub-string.\n\n---\n\nAlternate route: `/v2/characters/{character_id}/search/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_characters_character_id_search", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "description": "The string to search on", "in": "query", "minLength": 3, "name": "search", "required": true, "type": "string" }, { "description": "Type of entities to search for", "in": "query", "items": { "enum": ["agent", "alliance", "character", "constellation", "corporation", "faction", "inventorytype", "region", "solarsystem", "station", "structure", "wormhole"], "type": "string" }, "minItems": 1, "name": "categories", "required": true, "type": "array", "uniqueItems": true }, { "default": "en-us", "description": "Search locale", "enum": ["en-us", "de", "fr", "ru", "ja", "zh"], "in": "query", "name": "language", "type": "string" }, { "default": false, "description": "Whether the search should be a strict match", "in": "query", "name": "strict", "type": "boolean" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of search results", "examples": { "application/json": { "solarsystem": [30002510], "station": [60004588, 60004594, 60005725, 60009106, 60012721, 60012724, 60012727] } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "agent": { "description": "agent array", "items": { "description": "agent integer", "format": "int32", "title": "get_characters_character_id_search_agent", "type": "integer" }, "title": "get_characters_character_id_search_agent", "type": "array" }, "alliance": { "description": "alliance array", "items": { "description": "alliance integer", "format": "int32", "title": "get_characters_character_id_search_alliance", "type": "integer" }, "title": "get_characters_character_id_search_alliance", "type": "array" }, "character": { "description": "character array", "items": { "description": "character integer", "format": "int32", "title": "get_characters_character_id_search_character", "type": "integer" }, "title": "get_characters_character_id_search_character", "type": "array" }, "constellation": { "description": "constellation array", "items": { "description": "constellation integer", "format": "int32", "title": "get_characters_character_id_search_constellation", "type": "integer" }, "title": "get_characters_character_id_search_constellation", "type": "array" }, "corporation": { "description": "corporation array", "items": { "description": "corporation integer", "format": "int32", "title": "get_characters_character_id_search_corporation", "type": "integer" }, "title": "get_characters_character_id_search_corporation", "type": "array" }, "faction": { "description": "faction array", "items": { "description": "faction integer", "format": "int32", "title": "get_characters_character_id_search_faction", "type": "integer" }, "title": "get_characters_character_id_search_faction", "type": "array" }, "inventorytype": { "description": "inventorytype array", "items": { "description": "inventorytype integer", "format": "int32", "title": "get_characters_character_id_search_inventorytype", "type": "integer" }, "title": "get_characters_character_id_search_inventorytype", "type": "array" }, "region": { "description": "region array", "items": { "description": "region integer", "format": "int32", "title": "get_characters_character_id_search_region", "type": "integer" }, "title": "get_characters_character_id_search_region", "type": "array" }, "solarsystem": { "description": "solarsystem array", "items": { "description": "solarsystem integer", "format": "int32", "title": "get_characters_character_id_search_solarsystem", "type": "integer" }, "title": "get_characters_character_id_search_solarsystem", "type": "array" }, "station": { "description": "station array", "items": { "description": "station integer", "format": "int32", "title": "get_characters_character_id_search_station", "type": "integer" }, "title": "get_characters_character_id_search_station", "type": "array" }, "structure": { "description": "structure array", "items": { "description": "structure integer", "format": "int64", "title": "get_characters_character_id_search_structure", "type": "integer" }, "title": "get_characters_character_id_search_structure", "type": "array" }, "wormhole": { "description": "wormhole array", "items": { "description": "wormhole integer", "format": "int32", "title": "get_characters_character_id_search_wormhole", "type": "integer" }, "title": "get_characters_character_id_search_wormhole", "type": "array" } }, "title": "get_characters_character_id_search_ok", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-search.search_structures.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_search_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_search_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_search_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_search_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-search.search_structures.v1"] }], "summary": "Search on a string", "tags": ["Search"] } }, "/characters/{character_id}/ship/": { "get": { "description": "Get the current ship type, name and id\n\n---\n\nAlternate route: `/v1/characters/{character_id}/ship/`\n\nAlternate route: `/legacy/characters/{character_id}/ship/`\n\nAlternate route: `/dev/characters/{character_id}/ship/`\n\n\n---\n\nThis route is cached for up to 5 seconds", "operationId": "get_characters_character_id_ship", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Get the current ship type, name and id", "examples": { "application/json": { "ship_item_id": 1000000016991, "ship_name": "SPACESHIPS!!!", "ship_type_id": 1233 } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "ship_item_id": { "description": "Item id's are unique to a ship and persist until it is repackaged. This value can be used to track repeated uses of a ship, or detect when a pilot changes into a different instance of the same ship type.", "format": "int64", "title": "get_characters_character_id_ship_ship_item_id", "type": "integer" }, "ship_name": { "description": "ship_name string", "title": "get_characters_character_id_ship_ship_name", "type": "string" }, "ship_type_id": { "description": "ship_type_id integer", "format": "int32", "title": "get_characters_character_id_ship_ship_type_id", "type": "integer" } }, "required": ["ship_type_id", "ship_item_id", "ship_name"], "title": "get_characters_character_id_ship_ok", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-location.read_ship_type.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_ship_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_ship_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_ship_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_ship_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-location.read_ship_type.v1"] }], "summary": "Get current ship", "tags": ["Location"] } }, "/characters/{character_id}/skillqueue/": { "get": { "description": "List the configured skill queue for the given character\n\n---\n\nAlternate route: `/v2/characters/{character_id}/skillqueue/`\n\nAlternate route: `/legacy/characters/{character_id}/skillqueue/`\n\nAlternate route: `/dev/characters/{character_id}/skillqueue/`\n\n\n---\n\nThis route is cached for up to 120 seconds", "operationId": "get_characters_character_id_skillqueue", "parameters": [{ "description": "Character id of the target character", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "The current skill queue, sorted ascending by finishing time", "examples": { "application/json": [{ "finish_date": "2016-06-29T10:47:00Z", "finished_level": 3, "queue_position": 0, "skill_id": 1, "start_date": "2016-06-29T10:46:00Z" }, { "finish_date": "2016-07-15T10:47:00Z", "finished_level": 4, "queue_position": 1, "skill_id": 1, "start_date": "2016-06-29T10:47:00Z" }, { "finish_date": "2016-08-30T10:47:00Z", "finished_level": 2, "queue_position": 2, "skill_id": 2, "start_date": "2016-07-15T10:47:00Z" }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "finish_date": { "description": "finish_date string", "format": "date-time", "title": "get_characters_character_id_skillqueue_finish_date", "type": "string" }, "finished_level": { "description": "finished_level integer", "format": "int32", "maximum": 5, "minimum": 0, "title": "get_characters_character_id_skillqueue_finished_level", "type": "integer" }, "level_end_sp": { "description": "level_end_sp integer", "format": "int32", "title": "get_characters_character_id_skillqueue_level_end_sp", "type": "integer" }, "level_start_sp": { "description": "Amount of SP that was in the skill when it started training it's current level. Used to calculate % of current level complete.", "format": "int32", "title": "get_characters_character_id_skillqueue_level_start_sp", "type": "integer" }, "queue_position": { "description": "queue_position integer", "format": "int32", "title": "get_characters_character_id_skillqueue_queue_position", "type": "integer" }, "skill_id": { "description": "skill_id integer", "format": "int32", "title": "get_characters_character_id_skillqueue_skill_id", "type": "integer" }, "start_date": { "description": "start_date string", "format": "date-time", "title": "get_characters_character_id_skillqueue_start_date", "type": "string" }, "training_start_sp": { "description": "training_start_sp integer", "format": "int32", "title": "get_characters_character_id_skillqueue_training_start_sp", "type": "integer" } }, "required": ["skill_id", "finished_level", "queue_position"], "title": "get_characters_character_id_skillqueue_200_ok", "type": "object" }, "title": "get_characters_character_id_skillqueue_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-skills.read_skillqueue.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_skillqueue_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_skillqueue_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_skillqueue_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_skillqueue_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-skills.read_skillqueue.v1"] }], "summary": "Get character's skill queue", "tags": ["Skills"] } }, "/characters/{character_id}/skills/": { "get": { "description": "List all trained skills for the given character\n\n---\n\nAlternate route: `/v3/characters/{character_id}/skills/`\n\nAlternate route: `/dev/characters/{character_id}/skills/`\n\n\n---\n\nThis route is cached for up to 120 seconds", "operationId": "get_characters_character_id_skills", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Known skills for the character", "examples": { "application/json": { "skills": [{ "current_skill_level": 1, "skill_id": 1, "skillpoints_in_skill": 10000 }, { "current_skill_level": 1, "skill_id": 2, "skillpoints_in_skill": 10000 }], "total_sp": 20000 } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "skills": { "description": "skills array", "items": { "description": "skill object", "properties": { "current_skill_level": { "description": "current_skill_level integer", "format": "int32", "title": "get_characters_character_id_skills_current_skill_level", "type": "integer" }, "skill_id": { "description": "skill_id integer", "format": "int32", "title": "get_characters_character_id_skills_skill_id", "type": "integer" }, "skillpoints_in_skill": { "description": "skillpoints_in_skill integer", "format": "int64", "title": "get_characters_character_id_skills_skillpoints_in_skill", "type": "integer" } }, "title": "get_characters_character_id_skills_skill", "type": "object" }, "title": "get_characters_character_id_skills_skills", "type": "array" }, "total_sp": { "description": "total_sp integer", "format": "int64", "title": "get_characters_character_id_skills_total_sp", "type": "integer" } }, "title": "get_characters_character_id_skills_ok", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-skills.read_skills.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_skills_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_skills_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_skills_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_skills_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-skills.read_skills.v1"] }], "summary": "Get character skills", "tags": ["Skills"] } }, "/characters/{character_id}/wallets/": { "get": { "description": "List your wallets and their balances. Characters typically have only one wallet, with wallet_id 1000 being the master wallet.\n\n---\n\nAlternate route: `/v1/characters/{character_id}/wallets/`\n\nAlternate route: `/legacy/characters/{character_id}/wallets/`\n\nAlternate route: `/dev/characters/{character_id}/wallets/`\n\n\n---\n\nThis route is cached for up to 120 seconds", "operationId": "get_characters_character_id_wallets", "parameters": [{ "description": "An EVE character ID", "format": "int32", "in": "path", "name": "character_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Wallet data for selected user", "examples": { "application/json": [{ "balance": 295000, "wallet_id": 1000 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "balance": { "description": "Wallet's balance in ISK hundredths.", "format": "int64", "title": "get_characters_character_id_wallets_balance", "type": "integer" }, "wallet_id": { "description": "wallet_id integer", "format": "int32", "title": "get_characters_character_id_wallets_wallet_id", "type": "integer" } }, "title": "get_characters_character_id_wallets_200_ok", "type": "object" }, "title": "get_characters_character_id_wallets_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-wallet.read_character_wallet.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_characters_character_id_wallets_403_forbidden", "type": "string" } }, "title": "get_characters_character_id_wallets_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_characters_character_id_wallets_500_internal_server_error", "type": "string" } }, "title": "get_characters_character_id_wallets_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-wallet.read_character_wallet.v1"] }], "summary": "List wallets and balances", "tags": ["Wallet"] } }, "/corporations/names/": { "get": { "description": "Resolve a set of corporation IDs to corporation names\n\n---\n\nAlternate route: `/v1/corporations/names/`\n\nAlternate route: `/legacy/corporations/names/`\n\nAlternate route: `/dev/corporations/names/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_corporations_names", "parameters": [{ "description": "A comma separated list of corporation IDs", "in": "query", "items": { "format": "int64", "type": "integer" }, "minItems": 1, "name": "corporation_ids", "required": true, "type": "array" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "List of id/name associations", "examples": { "application/json": [{ "corporation_id": 1000171, "corporation_name": "Republic University" }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "corporation_id": { "description": "corporation_id integer", "format": "int32", "title": "get_corporations_names_corporation_id", "type": "integer" }, "corporation_name": { "description": "corporation_name string", "title": "get_corporations_names_corporation_name", "type": "string" } }, "required": ["corporation_id", "corporation_name"], "title": "get_corporations_names_200_ok", "type": "object" }, "title": "get_corporations_names_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_corporations_names_500_internal_server_error", "type": "string" } }, "title": "get_corporations_names_internal_server_error", "type": "object" } } }, "summary": "Get corporation names", "tags": ["Corporation"] } }, "/corporations/{corporation_id}/": { "get": { "description": "Public information about a corporation\n\n---\n\nAlternate route: `/v2/corporations/{corporation_id}/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_corporations_corporation_id", "parameters": [{ "description": "An Eve corporation ID", "format": "int32", "in": "path", "name": "corporation_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Public data about a corporation", "examples": { "application/json": { "alliance_id": 434243723, "ceo_id": 180548812, "corporation_name": "C C P", "member_count": 656, "ticker": "-CCP-" } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "alliance_id": { "description": "id of alliance that corporation is a member of, if any", "format": "int32", "title": "get_corporations_corporation_id_alliance_id", "type": "integer" }, "ceo_id": { "description": "ceo_id integer", "format": "int32", "title": "get_corporations_corporation_id_ceo_id", "type": "integer" }, "corporation_name": { "description": "the full name of the corporation", "title": "get_corporations_corporation_id_corporation_name", "type": "string" }, "member_count": { "description": "member_count integer", "format": "int32", "title": "get_corporations_corporation_id_member_count", "type": "integer" }, "ticker": { "description": "the short name of the corporation", "title": "get_corporations_corporation_id_ticker", "type": "string" } }, "required": ["corporation_name", "ticker", "member_count", "ceo_id"], "title": "get_corporations_corporation_id_ok", "type": "object" } }, "404": { "description": "Corporation not found", "examples": { "application/json": { "error": "Not found message" } }, "schema": { "description": "Not found", "properties": { "error": { "description": "Not found message", "title": "get_corporations_corporation_id_404_not_found", "type": "string" } }, "title": "get_corporations_corporation_id_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_corporations_corporation_id_500_internal_server_error", "type": "string" } }, "title": "get_corporations_corporation_id_internal_server_error", "type": "object" } } }, "summary": "Get corporation information", "tags": ["Corporation"] } }, "/corporations/{corporation_id}/alliancehistory/": { "get": { "description": "Get a list of all the alliances a corporation has been a member of\n\n---\n\nAlternate route: `/v1/corporations/{corporation_id}/alliancehistory/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/alliancehistory/`\n\nAlternate route: `/dev/corporations/{corporation_id}/alliancehistory/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_corporations_corporation_id_alliancehistory", "parameters": [{ "description": "An EVE corporation ID", "format": "int32", "in": "path", "name": "corporation_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Alliance history for the given corporation", "examples": { "application/json": [{ "alliance": { "alliance_id": 99000006, "is_deleted": false }, "record_id": 23, "start_date": "2016-10-25T14:46:00Z" }, { "record_id": 1, "start_date": "2015-07-06T20:56:00Z" }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "alliance": { "description": "alliance object", "properties": { "alliance_id": { "description": "alliance_id integer", "format": "int32", "title": "get_corporations_corporation_id_alliancehistory_alliance_id", "type": "integer" }, "is_deleted": { "description": "True if the alliance has been deleted", "title": "get_corporations_corporation_id_alliancehistory_is_deleted", "type": "boolean" } }, "required": ["alliance_id", "is_deleted"], "title": "get_corporations_corporation_id_alliancehistory_alliance", "type": "object" }, "record_id": { "description": "An incrementing ID that can be used to canonically establish order of records in cases where dates may be ambiguous", "format": "int32", "title": "get_corporations_corporation_id_alliancehistory_record_id", "type": "integer" }, "start_date": { "description": "start_date string", "format": "date-time", "title": "get_corporations_corporation_id_alliancehistory_start_date", "type": "string" } }, "required": ["start_date", "record_id"], "title": "get_corporations_corporation_id_alliancehistory_200_ok", "type": "object" }, "title": "get_corporations_corporation_id_alliancehistory_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_corporations_corporation_id_alliancehistory_500_internal_server_error", "type": "string" } }, "title": "get_corporations_corporation_id_alliancehistory_internal_server_error", "type": "object" } } }, "summary": "Get alliance history", "tags": ["Corporation"] } }, "/corporations/{corporation_id}/icons/": { "get": { "description": "Get the icon urls for a corporation\n\n---\n\nAlternate route: `/v1/corporations/{corporation_id}/icons/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/icons/`\n\nAlternate route: `/dev/corporations/{corporation_id}/icons/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_corporations_corporation_id_icons", "parameters": [{ "description": "An EVE corporation ID", "format": "int32", "in": "path", "name": "corporation_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Urls for icons for the given corporation id and server", "examples": { "application/json": { "px128x128": "https://imageserver.eveonline.com/Corporation/1000010_128.png", "px256x256": "https://imageserver.eveonline.com/Corporation/1000010_256.png", "px64x64": "https://imageserver.eveonline.com/Corporation/1000010_64.png" } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "px128x128": { "description": "px128x128 string", "title": "get_corporations_corporation_id_icons_px128x128", "type": "string" }, "px256x256": { "description": "px256x256 string", "title": "get_corporations_corporation_id_icons_px256x256", "type": "string" }, "px64x64": { "description": "px64x64 string", "title": "get_corporations_corporation_id_icons_px64x64", "type": "string" } }, "title": "get_corporations_corporation_id_icons_ok", "type": "object" } }, "404": { "description": "No image server for this datasource", "examples": { "application/json": { "error": "No image server for this datasource" } }, "schema": { "description": "No image server for this datasource", "properties": { "error": { "description": "error message", "title": "get_corporations_corporation_id_icons_error", "type": "string" } }, "title": "get_corporations_corporation_id_icons_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_corporations_corporation_id_icons_500_internal_server_error", "type": "string" } }, "title": "get_corporations_corporation_id_icons_internal_server_error", "type": "object" } } }, "summary": "Get corporation icon", "tags": ["Corporation"] } }, "/corporations/{corporation_id}/members/": { "get": { "description": "Read the current list of members if the calling character is a member.\n\n---\n\nAlternate route: `/v2/corporations/{corporation_id}/members/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/members/`\n\nAlternate route: `/dev/corporations/{corporation_id}/members/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_corporations_corporation_id_members", "parameters": [{ "description": "A corporation ID", "format": "int32", "in": "path", "name": "corporation_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "List of member character IDs", "examples": { "application/json": [{ "character_id": 90000001 }, { "character_id": 90000002 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "character_id": { "description": "character_id integer", "format": "int32", "title": "get_corporations_corporation_id_members_character_id", "type": "integer" } }, "required": ["character_id"], "title": "get_corporations_corporation_id_members_200_ok", "type": "object" }, "title": "get_corporations_corporation_id_members_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-corporations.read_corporation_membership.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_corporations_corporation_id_members_403_forbidden", "type": "string" } }, "title": "get_corporations_corporation_id_members_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_corporations_corporation_id_members_500_internal_server_error", "type": "string" } }, "title": "get_corporations_corporation_id_members_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-corporations.read_corporation_membership.v1"] }], "summary": "Get corporation members", "tags": ["Corporation"] } }, "/corporations/{corporation_id}/roles/": { "get": { "description": "Return the roles of all members if the character has the personnel manager role or any grantable role.\n\n---\n\nAlternate route: `/v1/corporations/{corporation_id}/roles/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/roles/`\n\nAlternate route: `/dev/corporations/{corporation_id}/roles/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_corporations_corporation_id_roles", "parameters": [{ "description": "A corporation ID", "format": "int32", "in": "path", "name": "corporation_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "List of member character ID's and roles", "examples": { "application/json": [{ "character_id": 1000171, "roles": ["Director", "Station_Manager"] }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "character_id": { "description": "character_id integer", "format": "int32", "title": "get_corporations_corporation_id_roles_character_id", "type": "integer" }, "grantable_roles": { "description": "grantable_roles array", "items": { "description": "grantable_role string", "enum": ["Director", "Personnel_Manager", "Accountant", "Security_Officer", "Factory_Manager", "Station_Manager", "Auditor", "Hangar_Take_1", "Hangar_Take_2", "Hangar_Take_3", "Hangar_Take_4", "Hangar_Take_5", "Hangar_Take_6", "Hangar_Take_7", "Hangar_Query_1", "Hangar_Query_2", "Hangar_Query_3", "Hangar_Query_4", "Hangar_Query_5", "Hangar_Query_6", "Hangar_Query_7", "Account_Take_1", "Account_Take_2", "Account_Take_3", "Account_Take_4", "Account_Take_5", "Account_Take_6", "Account_Take_7", "Diplomat", "Config_Equipment", "Container_Take_1", "Container_Take_2", "Container_Take_3", "Container_Take_4", "Container_Take_5", "Container_Take_6", "Container_Take_7", "Rent_Office", "Rent_Factory_Facility", "Rent_Research_Facility", "Junior_Accountant", "Config_Starbase_Equipment", "Trader", "Communications_Officer", "Contract_Manager", "Starbase_Defense_Operator", "Starbase_Fuel_Technician", "Fitting_Manager", "Terrestrial_Combat_Officer", "Terrestrial_Logistics_Officer"], "title": "get_corporations_corporation_id_roles_grantable_role", "type": "string", "uniqueItems": true }, "title": "get_corporations_corporation_id_roles_grantable_roles", "type": "array" }, "grantable_roles_at_base": { "description": "grantable_roles_at_base array", "items": { "description": "grantable_roles_at_base string", "enum": ["Director", "Personnel_Manager", "Accountant", "Security_Officer", "Factory_Manager", "Station_Manager", "Auditor", "Hangar_Take_1", "Hangar_Take_2", "Hangar_Take_3", "Hangar_Take_4", "Hangar_Take_5", "Hangar_Take_6", "Hangar_Take_7", "Hangar_Query_1", "Hangar_Query_2", "Hangar_Query_3", "Hangar_Query_4", "Hangar_Query_5", "Hangar_Query_6", "Hangar_Query_7", "Account_Take_1", "Account_Take_2", "Account_Take_3", "Account_Take_4", "Account_Take_5", "Account_Take_6", "Account_Take_7", "Diplomat", "Config_Equipment", "Container_Take_1", "Container_Take_2", "Container_Take_3", "Container_Take_4", "Container_Take_5", "Container_Take_6", "Container_Take_7", "Rent_Office", "Rent_Factory_Facility", "Rent_Research_Facility", "Junior_Accountant", "Config_Starbase_Equipment", "Trader", "Communications_Officer", "Contract_Manager", "Starbase_Defense_Operator", "Starbase_Fuel_Technician", "Fitting_Manager", "Terrestrial_Combat_Officer", "Terrestrial_Logistics_Officer"], "title": "get_corporations_corporation_id_roles_grantable_roles_at_base", "type": "string", "uniqueItems": true }, "title": "get_corporations_corporation_id_roles_grantable_roles_at_base", "type": "array" }, "grantable_roles_at_hq": { "description": "grantable_roles_at_hq array", "items": { "description": "grantable_roles_at_hq string", "enum": ["Director", "Personnel_Manager", "Accountant", "Security_Officer", "Factory_Manager", "Station_Manager", "Auditor", "Hangar_Take_1", "Hangar_Take_2", "Hangar_Take_3", "Hangar_Take_4", "Hangar_Take_5", "Hangar_Take_6", "Hangar_Take_7", "Hangar_Query_1", "Hangar_Query_2", "Hangar_Query_3", "Hangar_Query_4", "Hangar_Query_5", "Hangar_Query_6", "Hangar_Query_7", "Account_Take_1", "Account_Take_2", "Account_Take_3", "Account_Take_4", "Account_Take_5", "Account_Take_6", "Account_Take_7", "Diplomat", "Config_Equipment", "Container_Take_1", "Container_Take_2", "Container_Take_3", "Container_Take_4", "Container_Take_5", "Container_Take_6", "Container_Take_7", "Rent_Office", "Rent_Factory_Facility", "Rent_Research_Facility", "Junior_Accountant", "Config_Starbase_Equipment", "Trader", "Communications_Officer", "Contract_Manager", "Starbase_Defense_Operator", "Starbase_Fuel_Technician", "Fitting_Manager", "Terrestrial_Combat_Officer", "Terrestrial_Logistics_Officer"], "title": "get_corporations_corporation_id_roles_grantable_roles_at_hq", "type": "string", "uniqueItems": true }, "title": "get_corporations_corporation_id_roles_grantable_roles_at_hq", "type": "array" }, "grantable_roles_at_other": { "description": "grantable_roles_at_other array", "items": { "description": "grantable_roles_at_other string", "enum": ["Director", "Personnel_Manager", "Accountant", "Security_Officer", "Factory_Manager", "Station_Manager", "Auditor", "Hangar_Take_1", "Hangar_Take_2", "Hangar_Take_3", "Hangar_Take_4", "Hangar_Take_5", "Hangar_Take_6", "Hangar_Take_7", "Hangar_Query_1", "Hangar_Query_2", "Hangar_Query_3", "Hangar_Query_4", "Hangar_Query_5", "Hangar_Query_6", "Hangar_Query_7", "Account_Take_1", "Account_Take_2", "Account_Take_3", "Account_Take_4", "Account_Take_5", "Account_Take_6", "Account_Take_7", "Diplomat", "Config_Equipment", "Container_Take_1", "Container_Take_2", "Container_Take_3", "Container_Take_4", "Container_Take_5", "Container_Take_6", "Container_Take_7", "Rent_Office", "Rent_Factory_Facility", "Rent_Research_Facility", "Junior_Accountant", "Config_Starbase_Equipment", "Trader", "Communications_Officer", "Contract_Manager", "Starbase_Defense_Operator", "Starbase_Fuel_Technician", "Fitting_Manager", "Terrestrial_Combat_Officer", "Terrestrial_Logistics_Officer"], "title": "get_corporations_corporation_id_roles_grantable_roles_at_other", "type": "string", "uniqueItems": true }, "title": "get_corporations_corporation_id_roles_grantable_roles_at_other", "type": "array" }, "roles": { "description": "roles array", "items": { "description": "role string", "enum": ["Director", "Personnel_Manager", "Accountant", "Security_Officer", "Factory_Manager", "Station_Manager", "Auditor", "Hangar_Take_1", "Hangar_Take_2", "Hangar_Take_3", "Hangar_Take_4", "Hangar_Take_5", "Hangar_Take_6", "Hangar_Take_7", "Hangar_Query_1", "Hangar_Query_2", "Hangar_Query_3", "Hangar_Query_4", "Hangar_Query_5", "Hangar_Query_6", "Hangar_Query_7", "Account_Take_1", "Account_Take_2", "Account_Take_3", "Account_Take_4", "Account_Take_5", "Account_Take_6", "Account_Take_7", "Diplomat", "Config_Equipment", "Container_Take_1", "Container_Take_2", "Container_Take_3", "Container_Take_4", "Container_Take_5", "Container_Take_6", "Container_Take_7", "Rent_Office", "Rent_Factory_Facility", "Rent_Research_Facility", "Junior_Accountant", "Config_Starbase_Equipment", "Trader", "Communications_Officer", "Contract_Manager", "Starbase_Defense_Operator", "Starbase_Fuel_Technician", "Fitting_Manager", "Terrestrial_Combat_Officer", "Terrestrial_Logistics_Officer"], "title": "get_corporations_corporation_id_roles_role", "type": "string", "uniqueItems": true }, "title": "get_corporations_corporation_id_roles_roles", "type": "array" }, "roles_at_base": { "description": "roles_at_base array", "items": { "description": "roles_at_base string", "enum": ["Director", "Personnel_Manager", "Accountant", "Security_Officer", "Factory_Manager", "Station_Manager", "Auditor", "Hangar_Take_1", "Hangar_Take_2", "Hangar_Take_3", "Hangar_Take_4", "Hangar_Take_5", "Hangar_Take_6", "Hangar_Take_7", "Hangar_Query_1", "Hangar_Query_2", "Hangar_Query_3", "Hangar_Query_4", "Hangar_Query_5", "Hangar_Query_6", "Hangar_Query_7", "Account_Take_1", "Account_Take_2", "Account_Take_3", "Account_Take_4", "Account_Take_5", "Account_Take_6", "Account_Take_7", "Diplomat", "Config_Equipment", "Container_Take_1", "Container_Take_2", "Container_Take_3", "Container_Take_4", "Container_Take_5", "Container_Take_6", "Container_Take_7", "Rent_Office", "Rent_Factory_Facility", "Rent_Research_Facility", "Junior_Accountant", "Config_Starbase_Equipment", "Trader", "Communications_Officer", "Contract_Manager", "Starbase_Defense_Operator", "Starbase_Fuel_Technician", "Fitting_Manager", "Terrestrial_Combat_Officer", "Terrestrial_Logistics_Officer"], "title": "get_corporations_corporation_id_roles_roles_at_base", "type": "string", "uniqueItems": true }, "title": "get_corporations_corporation_id_roles_roles_at_base", "type": "array" }, "roles_at_hq": { "description": "roles_at_hq array", "items": { "description": "roles_at_hq string", "enum": ["Director", "Personnel_Manager", "Accountant", "Security_Officer", "Factory_Manager", "Station_Manager", "Auditor", "Hangar_Take_1", "Hangar_Take_2", "Hangar_Take_3", "Hangar_Take_4", "Hangar_Take_5", "Hangar_Take_6", "Hangar_Take_7", "Hangar_Query_1", "Hangar_Query_2", "Hangar_Query_3", "Hangar_Query_4", "Hangar_Query_5", "Hangar_Query_6", "Hangar_Query_7", "Account_Take_1", "Account_Take_2", "Account_Take_3", "Account_Take_4", "Account_Take_5", "Account_Take_6", "Account_Take_7", "Diplomat", "Config_Equipment", "Container_Take_1", "Container_Take_2", "Container_Take_3", "Container_Take_4", "Container_Take_5", "Container_Take_6", "Container_Take_7", "Rent_Office", "Rent_Factory_Facility", "Rent_Research_Facility", "Junior_Accountant", "Config_Starbase_Equipment", "Trader", "Communications_Officer", "Contract_Manager", "Starbase_Defense_Operator", "Starbase_Fuel_Technician", "Fitting_Manager", "Terrestrial_Combat_Officer", "Terrestrial_Logistics_Officer"], "title": "get_corporations_corporation_id_roles_roles_at_hq", "type": "string", "uniqueItems": true }, "title": "get_corporations_corporation_id_roles_roles_at_hq", "type": "array" }, "roles_at_other": { "description": "roles_at_other array", "items": { "description": "roles_at_other string", "enum": ["Director", "Personnel_Manager", "Accountant", "Security_Officer", "Factory_Manager", "Station_Manager", "Auditor", "Hangar_Take_1", "Hangar_Take_2", "Hangar_Take_3", "Hangar_Take_4", "Hangar_Take_5", "Hangar_Take_6", "Hangar_Take_7", "Hangar_Query_1", "Hangar_Query_2", "Hangar_Query_3", "Hangar_Query_4", "Hangar_Query_5", "Hangar_Query_6", "Hangar_Query_7", "Account_Take_1", "Account_Take_2", "Account_Take_3", "Account_Take_4", "Account_Take_5", "Account_Take_6", "Account_Take_7", "Diplomat", "Config_Equipment", "Container_Take_1", "Container_Take_2", "Container_Take_3", "Container_Take_4", "Container_Take_5", "Container_Take_6", "Container_Take_7", "Rent_Office", "Rent_Factory_Facility", "Rent_Research_Facility", "Junior_Accountant", "Config_Starbase_Equipment", "Trader", "Communications_Officer", "Contract_Manager", "Starbase_Defense_Operator", "Starbase_Fuel_Technician", "Fitting_Manager", "Terrestrial_Combat_Officer", "Terrestrial_Logistics_Officer"], "title": "get_corporations_corporation_id_roles_roles_at_other", "type": "string", "uniqueItems": true }, "title": "get_corporations_corporation_id_roles_roles_at_other", "type": "array" } }, "required": ["character_id"], "title": "get_corporations_corporation_id_roles_200_ok", "type": "object" }, "title": "get_corporations_corporation_id_roles_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-corporations.read_corporation_membership.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_corporations_corporation_id_roles_403_forbidden", "type": "string" } }, "title": "get_corporations_corporation_id_roles_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_corporations_corporation_id_roles_500_internal_server_error", "type": "string" } }, "title": "get_corporations_corporation_id_roles_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-corporations.read_corporation_membership.v1"] }], "summary": "Get corporation member roles", "tags": ["Corporation"] } }, "/fleets/{fleet_id}/": { "get": { "description": "Return details about a fleet\n\n---\n\nAlternate route: `/v1/fleets/{fleet_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/`\n\nAlternate route: `/dev/fleets/{fleet_id}/`\n\n\n---\n\nThis route is cached for up to 5 seconds", "operationId": "get_fleets_fleet_id", "parameters": [{ "description": "ID for a fleet", "format": "int64", "in": "path", "name": "fleet_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Details about a fleet", "examples": { "application/json": { "is_free_move": false, "is_registered": false, "is_voice_enabled": false, "motd": "This is an awesome fleet!" } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "is_free_move": { "description": "Is free-move enabled", "title": "get_fleets_fleet_id_is_free_move", "type": "boolean" }, "is_registered": { "description": "Does the fleet have an active fleet advertisement", "title": "get_fleets_fleet_id_is_registered", "type": "boolean" }, "is_voice_enabled": { "description": "Is EVE Voice enabled", "title": "get_fleets_fleet_id_is_voice_enabled", "type": "boolean" }, "motd": { "description": "Fleet MOTD in CCP flavoured HTML", "title": "get_fleets_fleet_id_motd", "type": "string" } }, "required": ["motd", "is_free_move", "is_registered", "is_voice_enabled"], "title": "get_fleets_fleet_id_ok", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-fleets.read_fleet.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_fleets_fleet_id_403_forbidden", "type": "string" } }, "title": "get_fleets_fleet_id_forbidden", "type": "object" } }, "404": { "description": "The fleet does not exist or you don't have access to it", "examples": { "application/json": { "error": "fleet 123 not found" } }, "schema": { "description": "404 not found object", "properties": { "error": { "description": "error message", "title": "get_fleets_fleet_id_error", "type": "string" } }, "title": "get_fleets_fleet_id_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_fleets_fleet_id_500_internal_server_error", "type": "string" } }, "title": "get_fleets_fleet_id_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-fleets.read_fleet.v1"] }], "summary": "Get fleet information", "tags": ["Fleets"] }, "put": { "description": "Update settings about a fleet\n\n---\n\nAlternate route: `/v1/fleets/{fleet_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/`\n\nAlternate route: `/dev/fleets/{fleet_id}/`\n", "operationId": "put_fleets_fleet_id", "parameters": [{ "description": "ID for a fleet", "format": "int64", "in": "path", "name": "fleet_id", "required": true, "type": "integer" }, { "description": "What to update for this fleet", "in": "body", "name": "new_settings", "required": true, "schema": { "description": "new_settings object", "properties": { "is_free_move": { "description": "Should free-move be enabled in the fleet", "title": "put_fleets_fleet_id_is_free_move", "type": "boolean" }, "motd": { "description": "New fleet MOTD in CCP flavoured HTML", "title": "put_fleets_fleet_id_motd", "type": "string" } }, "title": "put_fleets_fleet_id_new_settings", "type": "object" } }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Fleet updated" }, "400": { "description": "Invalid request body", "examples": { "application/json": { "error": "Bad request message" } }, "schema": { "description": "Bad request", "properties": { "error": { "description": "Bad request message", "title": "put_fleets_fleet_id_400_bad_request", "type": "string" } }, "title": "put_fleets_fleet_id_bad_request", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-fleets.write_fleet.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "put_fleets_fleet_id_403_forbidden", "type": "string" } }, "title": "put_fleets_fleet_id_forbidden", "type": "object" } }, "404": { "description": "The fleet does not exist or you don't have access to it", "examples": { "application/json": { "error": "fleet 123 not found" } }, "schema": { "description": "404 not found object", "properties": { "error": { "description": "Error message", "title": "put_fleets_fleet_id_error", "type": "string" } }, "title": "put_fleets_fleet_id_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "put_fleets_fleet_id_500_internal_server_error", "type": "string" } }, "title": "put_fleets_fleet_id_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-fleets.write_fleet.v1"] }], "summary": "Update fleet", "tags": ["Fleets"] } }, "/fleets/{fleet_id}/members/": { "get": { "description": "Return information about fleet members\n\n---\n\nAlternate route: `/v1/fleets/{fleet_id}/members/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/members/`\n\nAlternate route: `/dev/fleets/{fleet_id}/members/`\n\n\n---\n\nThis route is cached for up to 5 seconds", "operationId": "get_fleets_fleet_id_members", "parameters": [{ "description": "ID for a fleet", "format": "int64", "in": "path", "name": "fleet_id", "required": true, "type": "integer" }, { "default": "en", "description": "Language to use in the response", "enum": ["de", "en", "fr", "ja", "ru", "zh"], "in": "header", "name": "Accept-Language", "type": "string" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of fleet members", "examples": { "application/json": [{ "character_id": 93265215, "join_time": "2016-04-29T12:34:56Z", "role": "squad_commander", "role_name": "Squad Commander (Boss)", "ship_type_id": 33328, "solar_system_id": 30003729, "squad_id": 3129411261968, "station_id": 61000180, "takes_fleet_warp": true, "wing_id": 2073711261968 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Content-Language": { "description": "The language used in the response", "enum": ["de", "en", "fr", "ja", "ru", "zh"], "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "character_id": { "description": "character_id integer", "format": "int32", "title": "get_fleets_fleet_id_members_character_id", "type": "integer" }, "join_time": { "description": "join_time string", "format": "date-time", "title": "get_fleets_fleet_id_members_join_time", "type": "string" }, "role": { "description": "Member\u2019s role in fleet", "enum": ["fleet_commander", "wing_commander", "squad_commander", "squad_member"], "title": "get_fleets_fleet_id_members_role", "type": "string" }, "role_name": { "description": "Localized role names", "title": "get_fleets_fleet_id_members_role_name", "type": "string" }, "ship_type_id": { "description": "ship_type_id integer", "format": "int32", "title": "get_fleets_fleet_id_members_ship_type_id", "type": "integer" }, "solar_system_id": { "description": "Solar system the member is located in", "format": "int32", "title": "get_fleets_fleet_id_members_solar_system_id", "type": "integer" }, "squad_id": { "description": "ID of the squad the member is in. If not applicable, will be set to -1", "format": "int64", "title": "get_fleets_fleet_id_members_squad_id", "type": "integer" }, "station_id": { "description": "Station in which the member is docked in, if applicable", "format": "int64", "title": "get_fleets_fleet_id_members_station_id", "type": "integer" }, "takes_fleet_warp": { "description": "Whether the member take fleet warps", "title": "get_fleets_fleet_id_members_takes_fleet_warp", "type": "boolean" }, "wing_id": { "description": "ID of the wing the member is in. If not applicable, will be set to -1", "format": "int64", "title": "get_fleets_fleet_id_members_wing_id", "type": "integer" } }, "required": ["character_id", "ship_type_id", "wing_id", "squad_id", "role", "role_name", "join_time", "takes_fleet_warp", "solar_system_id"], "title": "get_fleets_fleet_id_members_200_ok", "type": "object" }, "title": "get_fleets_fleet_id_members_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-fleets.read_fleet.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_fleets_fleet_id_members_403_forbidden", "type": "string" } }, "title": "get_fleets_fleet_id_members_forbidden", "type": "object" } }, "404": { "description": "The fleet does not exist or you don't have access to it", "examples": { "application/json": { "error": "fleet 123 not found" } }, "schema": { "description": "404 not found object", "properties": { "error": { "description": "error message", "title": "get_fleets_fleet_id_members_error", "type": "string" } }, "title": "get_fleets_fleet_id_members_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_fleets_fleet_id_members_500_internal_server_error", "type": "string" } }, "title": "get_fleets_fleet_id_members_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-fleets.read_fleet.v1"] }], "summary": "Get fleet members", "tags": ["Fleets"] }, "post": { "description": "Invite a character into the fleet, if a character has a CSPA charge set, it is not possible to invite them to the fleet using ESI\n\n---\n\nAlternate route: `/v1/fleets/{fleet_id}/members/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/members/`\n\nAlternate route: `/dev/fleets/{fleet_id}/members/`\n", "operationId": "post_fleets_fleet_id_members", "parameters": [{ "description": "ID for a fleet", "format": "int64", "in": "path", "name": "fleet_id", "required": true, "type": "integer" }, { "description": "Details of the invitation", "in": "body", "name": "invitation", "required": true, "schema": { "description": "invitation object", "properties": { "character_id": { "description": "The character you want to invite", "format": "int32", "title": "post_fleets_fleet_id_members_character_id", "type": "integer" }, "role": { "description": "- If a character is invited with the `fleet_commander` role, neither `wing_id` or `squad_id` should be specified - If a character is invited with the `wing_commander` role, only `wing_id` should be specified - If a character is invited with the `squad_commander` role, both `wing_id` and `squad_id` should be specified - If a character is invited with the `squad_member` role, `wing_id` and `squad_id` should either both be specified or not specified at all. If they aren\u2019t specified, the invited character will join any squad with available positions\n", "enum": ["fleet_commander", "wing_commander", "squad_commander", "squad_member"], "title": "post_fleets_fleet_id_members_role", "type": "string" }, "squad_id": { "description": "squad_id integer", "format": "int64", "minimum": 0, "title": "post_fleets_fleet_id_members_squad_id", "type": "integer" }, "wing_id": { "description": "wing_id integer", "format": "int64", "minimum": 0, "title": "post_fleets_fleet_id_members_wing_id", "type": "integer" } }, "required": ["character_id", "role"], "title": "post_fleets_fleet_id_members_invitation", "type": "object" } }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Fleet invitation sent" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-fleets.write_fleet.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "post_fleets_fleet_id_members_403_forbidden", "type": "string" } }, "title": "post_fleets_fleet_id_members_forbidden", "type": "object" } }, "404": { "description": "The fleet does not exist or you don't have access to it", "examples": { "application/json": { "error": "fleet 123 not found" } }, "schema": { "description": "404 not found object", "properties": { "error": { "description": "Error message", "title": "post_fleets_fleet_id_members_error", "type": "string" } }, "title": "post_fleets_fleet_id_members_not_found", "type": "object" } }, "422": { "description": "Errors in invitation", "examples": { "application/json": { "error": "missing wing_id" } }, "schema": { "description": "422 unprocessable entity object", "properties": { "error": { "description": "error message", "title": "post_fleets_fleet_id_members_error", "type": "string" } }, "title": "post_fleets_fleet_id_members_unprocessable_entity", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "post_fleets_fleet_id_members_500_internal_server_error", "type": "string" } }, "title": "post_fleets_fleet_id_members_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-fleets.write_fleet.v1"] }], "summary": "Create fleet invitation", "tags": ["Fleets"] } }, "/fleets/{fleet_id}/members/{member_id}/": { "delete": { "description": "Kick a fleet member\n\n---\n\nAlternate route: `/v1/fleets/{fleet_id}/members/{member_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/members/{member_id}/`\n\nAlternate route: `/dev/fleets/{fleet_id}/members/{member_id}/`\n", "operationId": "delete_fleets_fleet_id_members_member_id", "parameters": [{ "description": "ID for a fleet", "format": "int64", "in": "path", "name": "fleet_id", "required": true, "type": "integer" }, { "description": "The character ID of a member in this fleet", "format": "int32", "in": "path", "name": "member_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Fleet member kicked" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-fleets.write_fleet.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "delete_fleets_fleet_id_members_member_id_403_forbidden", "type": "string" } }, "title": "delete_fleets_fleet_id_members_member_id_forbidden", "type": "object" } }, "404": { "description": "The fleet does not exist or you don't have access to it", "examples": { "application/json": { "error": "fleet 123 not found" } }, "schema": { "description": "404 not found object", "properties": { "error": { "description": "Error message", "title": "delete_fleets_fleet_id_members_member_id_error", "type": "string" } }, "title": "delete_fleets_fleet_id_members_member_id_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "delete_fleets_fleet_id_members_member_id_500_internal_server_error", "type": "string" } }, "title": "delete_fleets_fleet_id_members_member_id_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-fleets.write_fleet.v1"] }], "summary": "Kick fleet member", "tags": ["Fleets"] }, "put": { "description": "Move a fleet member around\n\n---\n\nAlternate route: `/v1/fleets/{fleet_id}/members/{member_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/members/{member_id}/`\n\nAlternate route: `/dev/fleets/{fleet_id}/members/{member_id}/`\n", "operationId": "put_fleets_fleet_id_members_member_id", "parameters": [{ "description": "ID for a fleet", "format": "int64", "in": "path", "name": "fleet_id", "required": true, "type": "integer" }, { "description": "The character ID of a member in this fleet", "format": "int32", "in": "path", "name": "member_id", "required": true, "type": "integer" }, { "description": "Details of the invitation", "in": "body", "name": "movement", "required": true, "schema": { "description": "movement object", "properties": { "role": { "description": "- If a character is moved to the `fleet_commander` role, neither `wing_id` or `squad_id` should be specified - If a character is moved to the `wing_commander` role, only `wing_id` should be specified - If a character is moved to the `squad_commander` role, both `wing_id` and `squad_id` should be specified - If a character is moved to the `squad_member` role, both `wing_id` and `squad_id` should be specified\n", "enum": ["fleet_commander", "wing_commander", "squad_commander", "squad_member"], "title": "put_fleets_fleet_id_members_member_id_role", "type": "string" }, "squad_id": { "description": "squad_id integer", "format": "int64", "minimum": 0, "title": "put_fleets_fleet_id_members_member_id_squad_id", "type": "integer" }, "wing_id": { "description": "wing_id integer", "format": "int64", "minimum": 0, "title": "put_fleets_fleet_id_members_member_id_wing_id", "type": "integer" } }, "required": ["role"], "title": "put_fleets_fleet_id_members_member_id_movement", "type": "object" } }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Fleet invitation sent" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-fleets.write_fleet.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "put_fleets_fleet_id_members_member_id_403_forbidden", "type": "string" } }, "title": "put_fleets_fleet_id_members_member_id_forbidden", "type": "object" } }, "404": { "description": "The fleet does not exist or you don't have access to it", "examples": { "application/json": { "error": "fleet 123 not found" } }, "schema": { "description": "404 not found object", "properties": { "error": { "description": "Error message", "title": "put_fleets_fleet_id_members_member_id_error", "type": "string" } }, "title": "put_fleets_fleet_id_members_member_id_not_found", "type": "object" } }, "422": { "description": "Errors in invitation", "examples": { "application/json": { "error": "missing wing_id" } }, "schema": { "description": "422 unprocessable entity object", "properties": { "error": { "description": "error message", "title": "put_fleets_fleet_id_members_member_id_error", "type": "string" } }, "title": "put_fleets_fleet_id_members_member_id_unprocessable_entity", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "put_fleets_fleet_id_members_member_id_500_internal_server_error", "type": "string" } }, "title": "put_fleets_fleet_id_members_member_id_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-fleets.write_fleet.v1"] }], "summary": "Move fleet member", "tags": ["Fleets"] } }, "/fleets/{fleet_id}/squads/{squad_id}/": { "delete": { "description": "Delete a fleet squad, only empty squads can be deleted\n\n---\n\nAlternate route: `/v1/fleets/{fleet_id}/squads/{squad_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/squads/{squad_id}/`\n\nAlternate route: `/dev/fleets/{fleet_id}/squads/{squad_id}/`\n", "operationId": "delete_fleets_fleet_id_squads_squad_id", "parameters": [{ "description": "ID for a fleet", "format": "int64", "in": "path", "name": "fleet_id", "required": true, "type": "integer" }, { "description": "The squad to delete", "format": "int64", "in": "path", "name": "squad_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Squad deleted" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-fleets.write_fleet.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "delete_fleets_fleet_id_squads_squad_id_403_forbidden", "type": "string" } }, "title": "delete_fleets_fleet_id_squads_squad_id_forbidden", "type": "object" } }, "404": { "description": "The fleet does not exist or you don't have access to it", "examples": { "application/json": { "error": "fleet 123 not found" } }, "schema": { "description": "404 not found object", "properties": { "error": { "description": "Error message", "title": "delete_fleets_fleet_id_squads_squad_id_error", "type": "string" } }, "title": "delete_fleets_fleet_id_squads_squad_id_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "delete_fleets_fleet_id_squads_squad_id_500_internal_server_error", "type": "string" } }, "title": "delete_fleets_fleet_id_squads_squad_id_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-fleets.write_fleet.v1"] }], "summary": "Delete fleet squad", "tags": ["Fleets"] }, "put": { "description": "Rename a fleet squad\n\n---\n\nAlternate route: `/v1/fleets/{fleet_id}/squads/{squad_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/squads/{squad_id}/`\n\nAlternate route: `/dev/fleets/{fleet_id}/squads/{squad_id}/`\n", "operationId": "put_fleets_fleet_id_squads_squad_id", "parameters": [{ "description": "ID for a fleet", "format": "int64", "in": "path", "name": "fleet_id", "required": true, "type": "integer" }, { "description": "The squad to rename", "format": "int64", "in": "path", "name": "squad_id", "required": true, "type": "integer" }, { "description": "New name of the squad", "in": "body", "name": "naming", "required": true, "schema": { "description": "naming object", "properties": { "name": { "description": "name string", "maxLength": 10, "title": "put_fleets_fleet_id_squads_squad_id_name", "type": "string" } }, "required": ["name"], "title": "put_fleets_fleet_id_squads_squad_id_naming", "type": "object" } }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Squad renamed" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-fleets.write_fleet.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "put_fleets_fleet_id_squads_squad_id_403_forbidden", "type": "string" } }, "title": "put_fleets_fleet_id_squads_squad_id_forbidden", "type": "object" } }, "404": { "description": "The fleet does not exist or you don't have access to it", "examples": { "application/json": { "error": "fleet 123 not found" } }, "schema": { "description": "404 not found object", "properties": { "error": { "description": "Error message", "title": "put_fleets_fleet_id_squads_squad_id_error", "type": "string" } }, "title": "put_fleets_fleet_id_squads_squad_id_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "put_fleets_fleet_id_squads_squad_id_500_internal_server_error", "type": "string" } }, "title": "put_fleets_fleet_id_squads_squad_id_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-fleets.write_fleet.v1"] }], "summary": "Rename fleet squad", "tags": ["Fleets"] } }, "/fleets/{fleet_id}/wings/": { "get": { "description": "Return information about wings in a fleet\n\n---\n\nAlternate route: `/v1/fleets/{fleet_id}/wings/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/wings/`\n\nAlternate route: `/dev/fleets/{fleet_id}/wings/`\n\n\n---\n\nThis route is cached for up to 5 seconds", "operationId": "get_fleets_fleet_id_wings", "parameters": [{ "description": "ID for a fleet", "format": "int64", "in": "path", "name": "fleet_id", "required": true, "type": "integer" }, { "default": "en", "description": "Language to use in the response", "enum": ["de", "en", "fr", "ja", "ru", "zh"], "in": "header", "name": "Accept-Language", "type": "string" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of fleet wings", "examples": { "application/json": [{ "id": 2073711261968, "name": "Wing 1", "squads": [{ "id": 3129411261968, "name": "Squad 1" }] }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Content-Language": { "description": "The language used in the response", "enum": ["de", "en", "fr", "ja", "ru", "zh"], "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "id": { "description": "id integer", "format": "int64", "title": "get_fleets_fleet_id_wings_id", "type": "integer" }, "name": { "description": "name string", "title": "get_fleets_fleet_id_wings_name", "type": "string" }, "squads": { "description": "squads array", "items": { "description": "squad object", "properties": { "id": { "description": "id integer", "format": "int64", "title": "get_fleets_fleet_id_wings_id", "type": "integer" }, "name": { "description": "name string", "title": "get_fleets_fleet_id_wings_name", "type": "string" } }, "required": ["name", "id"], "title": "get_fleets_fleet_id_wings_squad", "type": "object" }, "title": "get_fleets_fleet_id_wings_squads", "type": "array" } }, "required": ["name", "id", "squads"], "title": "get_fleets_fleet_id_wings_200_ok", "type": "object" }, "title": "get_fleets_fleet_id_wings_ok", "type": "array" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-fleets.read_fleet.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_fleets_fleet_id_wings_403_forbidden", "type": "string" } }, "title": "get_fleets_fleet_id_wings_forbidden", "type": "object" } }, "404": { "description": "The fleet does not exist or you don't have access to it", "examples": { "application/json": { "error": "fleet 123 not found" } }, "schema": { "description": "404 not found object", "properties": { "error": { "description": "error message", "title": "get_fleets_fleet_id_wings_error", "type": "string" } }, "title": "get_fleets_fleet_id_wings_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_fleets_fleet_id_wings_500_internal_server_error", "type": "string" } }, "title": "get_fleets_fleet_id_wings_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-fleets.read_fleet.v1"] }], "summary": "Get fleet wings", "tags": ["Fleets"] }, "post": { "description": "Create a new wing in a fleet\n\n---\n\nAlternate route: `/v1/fleets/{fleet_id}/wings/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/wings/`\n\nAlternate route: `/dev/fleets/{fleet_id}/wings/`\n", "operationId": "post_fleets_fleet_id_wings", "parameters": [{ "description": "ID for a fleet", "format": "int64", "in": "path", "name": "fleet_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "201": { "description": "Wing created", "examples": { "application/json": { "wing_id": 123 } }, "schema": { "description": "201 created object", "properties": { "wing_id": { "description": "The wing_id of the newly created wing", "format": "int64", "title": "post_fleets_fleet_id_wings_wing_id", "type": "integer" } }, "required": ["wing_id"], "title": "post_fleets_fleet_id_wings_created", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-fleets.write_fleet.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "post_fleets_fleet_id_wings_403_forbidden", "type": "string" } }, "title": "post_fleets_fleet_id_wings_forbidden", "type": "object" } }, "404": { "description": "The fleet does not exist or you don't have access to it", "examples": { "application/json": { "error": "fleet 123 not found" } }, "schema": { "description": "404 not found object", "properties": { "error": { "description": "Error message", "title": "post_fleets_fleet_id_wings_error", "type": "string" } }, "title": "post_fleets_fleet_id_wings_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "post_fleets_fleet_id_wings_500_internal_server_error", "type": "string" } }, "title": "post_fleets_fleet_id_wings_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-fleets.write_fleet.v1"] }], "summary": "Create fleet wing", "tags": ["Fleets"] } }, "/fleets/{fleet_id}/wings/{wing_id}/": { "delete": { "description": "Delete a fleet wing, only empty wings can be deleted. The wing may contain squads, but the squads must be empty\n\n---\n\nAlternate route: `/v1/fleets/{fleet_id}/wings/{wing_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/wings/{wing_id}/`\n\nAlternate route: `/dev/fleets/{fleet_id}/wings/{wing_id}/`\n", "operationId": "delete_fleets_fleet_id_wings_wing_id", "parameters": [{ "description": "ID for a fleet", "format": "int64", "in": "path", "name": "fleet_id", "required": true, "type": "integer" }, { "description": "The wing to delete", "format": "int64", "in": "path", "name": "wing_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Wing deleted" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-fleets.write_fleet.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "delete_fleets_fleet_id_wings_wing_id_403_forbidden", "type": "string" } }, "title": "delete_fleets_fleet_id_wings_wing_id_forbidden", "type": "object" } }, "404": { "description": "The fleet does not exist or you don't have access to it", "examples": { "application/json": { "error": "fleet 123 not found" } }, "schema": { "description": "404 not found object", "properties": { "error": { "description": "Error message", "title": "delete_fleets_fleet_id_wings_wing_id_error", "type": "string" } }, "title": "delete_fleets_fleet_id_wings_wing_id_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "delete_fleets_fleet_id_wings_wing_id_500_internal_server_error", "type": "string" } }, "title": "delete_fleets_fleet_id_wings_wing_id_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-fleets.write_fleet.v1"] }], "summary": "Delete fleet wing", "tags": ["Fleets"] }, "put": { "description": "Rename a fleet wing\n\n---\n\nAlternate route: `/v1/fleets/{fleet_id}/wings/{wing_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/wings/{wing_id}/`\n\nAlternate route: `/dev/fleets/{fleet_id}/wings/{wing_id}/`\n", "operationId": "put_fleets_fleet_id_wings_wing_id", "parameters": [{ "description": "ID for a fleet", "format": "int64", "in": "path", "name": "fleet_id", "required": true, "type": "integer" }, { "description": "The wing to rename", "format": "int64", "in": "path", "name": "wing_id", "required": true, "type": "integer" }, { "description": "New name of the wing", "in": "body", "name": "naming", "required": true, "schema": { "description": "naming object", "properties": { "name": { "description": "name string", "maxLength": 10, "title": "put_fleets_fleet_id_wings_wing_id_name", "type": "string" } }, "required": ["name"], "title": "put_fleets_fleet_id_wings_wing_id_naming", "type": "object" } }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Wing renamed" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-fleets.write_fleet.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "put_fleets_fleet_id_wings_wing_id_403_forbidden", "type": "string" } }, "title": "put_fleets_fleet_id_wings_wing_id_forbidden", "type": "object" } }, "404": { "description": "The fleet does not exist or you don't have access to it", "examples": { "application/json": { "error": "fleet 123 not found" } }, "schema": { "description": "404 not found object", "properties": { "error": { "description": "Error message", "title": "put_fleets_fleet_id_wings_wing_id_error", "type": "string" } }, "title": "put_fleets_fleet_id_wings_wing_id_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "put_fleets_fleet_id_wings_wing_id_500_internal_server_error", "type": "string" } }, "title": "put_fleets_fleet_id_wings_wing_id_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-fleets.write_fleet.v1"] }], "summary": "Rename fleet wing", "tags": ["Fleets"] } }, "/fleets/{fleet_id}/wings/{wing_id}/squads/": { "post": { "description": "Create a new squad in a fleet\n\n---\n\nAlternate route: `/v1/fleets/{fleet_id}/wings/{wing_id}/squads/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/wings/{wing_id}/squads/`\n\nAlternate route: `/dev/fleets/{fleet_id}/wings/{wing_id}/squads/`\n", "operationId": "post_fleets_fleet_id_wings_wing_id_squads", "parameters": [{ "description": "ID for a fleet", "format": "int64", "in": "path", "name": "fleet_id", "required": true, "type": "integer" }, { "description": "The wing_id to create squad in", "format": "int64", "in": "path", "name": "wing_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "201": { "description": "Squad created", "examples": { "application/json": { "squad_id": 123 } }, "schema": { "description": "201 created object", "properties": { "squad_id": { "description": "The squad_id of the newly created squad", "format": "int64", "title": "post_fleets_fleet_id_wings_wing_id_squads_squad_id", "type": "integer" } }, "required": ["squad_id"], "title": "post_fleets_fleet_id_wings_wing_id_squads_created", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-fleets.write_fleet.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "post_fleets_fleet_id_wings_wing_id_squads_403_forbidden", "type": "string" } }, "title": "post_fleets_fleet_id_wings_wing_id_squads_forbidden", "type": "object" } }, "404": { "description": "The fleet does not exist or you don't have access to it", "examples": { "application/json": { "error": "fleet 123 not found" } }, "schema": { "description": "404 not found object", "properties": { "error": { "description": "Error message", "title": "post_fleets_fleet_id_wings_wing_id_squads_error", "type": "string" } }, "title": "post_fleets_fleet_id_wings_wing_id_squads_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "post_fleets_fleet_id_wings_wing_id_squads_500_internal_server_error", "type": "string" } }, "title": "post_fleets_fleet_id_wings_wing_id_squads_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-fleets.write_fleet.v1"] }], "summary": "Create fleet squad", "tags": ["Fleets"] } }, "/incursions/": { "get": { "description": "Return a list of current incursions\n\n---\n\nAlternate route: `/v1/incursions/`\n\nAlternate route: `/legacy/incursions/`\n\nAlternate route: `/dev/incursions/`\n\n\n---\n\nThis route is cached for up to 300 seconds", "operationId": "get_incursions", "parameters": [{ "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of incursions", "examples": { "application/json": [{ "constellation_id": 20000607, "faction_id": 500019, "has_boss": true, "infested_solar_systems": [30004148, 30004149, 30004150, 30004151, 30004152, 30004153, 30004154], "influence": 1.0, "staging_solar_system_id": 30004154, "state": "mobilizing", "type": "Incursion" }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "constellation_id": { "description": "The constellation id in which this incursion takes place", "format": "int32", "title": "get_incursions_constellation_id", "type": "integer" }, "faction_id": { "description": "The attacking faction's id", "format": "int32", "title": "get_incursions_faction_id", "type": "integer" }, "has_boss": { "description": "Whether the final encounter has boss or not", "title": "get_incursions_has_boss", "type": "boolean" }, "infested_solar_systems": { "description": "A list of infested solar system ids that are a part of this incursion", "items": { "description": "infested_solar_system integer", "format": "int32", "title": "get_incursions_infested_solar_system", "type": "integer" }, "title": "get_incursions_infested_solar_systems", "type": "array" }, "influence": { "description": "Influence of this incursion as a float from 0 to 1", "format": "float", "title": "get_incursions_influence", "type": "number" }, "staging_solar_system_id": { "description": "Staging solar system for this incursion", "format": "int32", "title": "get_incursions_staging_solar_system_id", "type": "integer" }, "state": { "description": "The state of this incursion", "enum": ["withdrawing", "mobilizing", "established"], "title": "get_incursions_state", "type": "string" }, "type": { "description": "The type of this incursion", "title": "get_incursions_type", "type": "string" } }, "required": ["type", "state", "influence", "has_boss", "faction_id", "constellation_id", "staging_solar_system_id", "infested_solar_systems"], "title": "get_incursions_200_ok", "type": "object" }, "title": "get_incursions_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_incursions_500_internal_server_error", "type": "string" } }, "title": "get_incursions_internal_server_error", "type": "object" } } }, "summary": "List incursions", "tags": ["Incursions"] } }, "/industry/facilities/": { "get": { "description": "Return a list of industry facilities\n\n---\n\nAlternate route: `/v1/industry/facilities/`\n\nAlternate route: `/legacy/industry/facilities/`\n\nAlternate route: `/dev/industry/facilities/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_industry_facilities", "parameters": [{ "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of prices", "examples": { "application/json": [{ "facility_id": 60012544, "owner_id": 1000126, "region_id": 10000001, "solar_system_id": 30000032, "tax": 0.1, "type_id": 2502 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "facility_id": { "description": "ID of the facility", "format": "int64", "title": "get_industry_facilities_facility_id", "type": "integer" }, "owner_id": { "description": "Owner of the facility", "format": "int32", "title": "get_industry_facilities_owner_id", "type": "integer" }, "region_id": { "description": "Region ID where the facility is", "format": "int32", "title": "get_industry_facilities_region_id", "type": "integer" }, "solar_system_id": { "description": "Solar system ID where the facility is", "format": "int32", "title": "get_industry_facilities_solar_system_id", "type": "integer" }, "tax": { "description": "Tax imposed by the facility", "format": "float", "title": "get_industry_facilities_tax", "type": "number" }, "type_id": { "description": "Type ID of the facility", "format": "int32", "title": "get_industry_facilities_type_id", "type": "integer" } }, "required": ["facility_id", "owner_id", "type_id", "solar_system_id", "region_id"], "title": "get_industry_facilities_200_ok", "type": "object" }, "title": "get_industry_facilities_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_industry_facilities_500_internal_server_error", "type": "string" } }, "title": "get_industry_facilities_internal_server_error", "type": "object" } } }, "summary": "List industry facilities", "tags": ["Industry"] } }, "/industry/systems/": { "get": { "description": "Return cost indices for solar systems\n\n---\n\nAlternate route: `/v1/industry/systems/`\n\nAlternate route: `/legacy/industry/systems/`\n\nAlternate route: `/dev/industry/systems/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_industry_systems", "parameters": [{ "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of cost indicies", "examples": { "application/json": [{ "cost_indices": [{ "activity": "invention", "cost_index": 0.00480411064973412 }], "solar_system_id": 30011392 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "cost_indices": { "description": "cost_indices array", "items": { "description": "cost_indice object", "properties": { "activity": { "description": "activity string", "enum": ["none", "manufacturing", "researching_technology", "researching_time_efficiency", "researching_material_efficiency", "copying", "duplicating", "invention", "reverse_engineering"], "title": "get_industry_systems_activity", "type": "string" }, "cost_index": { "description": "cost_index number", "format": "float", "title": "get_industry_systems_cost_index", "type": "number" } }, "required": ["activity", "cost_index"], "title": "get_industry_systems_cost_indice", "type": "object" }, "title": "get_industry_systems_cost_indices", "type": "array" }, "solar_system_id": { "description": "solar_system_id integer", "format": "int32", "title": "get_industry_systems_solar_system_id", "type": "integer" } }, "required": ["solar_system_id", "cost_indices"], "title": "get_industry_systems_200_ok", "type": "object" }, "title": "get_industry_systems_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_industry_systems_500_internal_server_error", "type": "string" } }, "title": "get_industry_systems_internal_server_error", "type": "object" } } }, "summary": "List solar system cost indices", "tags": ["Industry"] } }, "/insurance/prices/": { "get": { "description": "Return available insurance levels for all ship types\n\n---\n\nAlternate route: `/v1/insurance/prices/`\n\nAlternate route: `/legacy/insurance/prices/`\n\nAlternate route: `/dev/insurance/prices/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_insurance_prices", "parameters": [{ "default": "en", "description": "Language to use in the response", "enum": ["de", "en", "fr", "ja", "ru", "zh"], "in": "header", "name": "Accept-Language", "type": "string" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of insurance levels for all ship types", "examples": { "application/json": [{ "levels": [{ "cost": 10.0, "name": "Basic", "payout": 20.0 }], "type_id": 1 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Content-Language": { "description": "The language used in the response", "enum": ["de", "en", "fr", "ja", "ru", "zh"], "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "levels": { "description": "A list of a available insurance levels for this ship type", "items": { "description": "level object", "properties": { "cost": { "description": "cost number", "format": "float", "title": "get_insurance_prices_cost", "type": "number" }, "name": { "description": "Localized insurance level", "title": "get_insurance_prices_name", "type": "string" }, "payout": { "description": "payout number", "format": "float", "title": "get_insurance_prices_payout", "type": "number" } }, "required": ["cost", "payout", "name"], "title": "get_insurance_prices_level", "type": "object" }, "title": "get_insurance_prices_levels", "type": "array" }, "type_id": { "description": "type_id integer", "format": "int32", "title": "get_insurance_prices_type_id", "type": "integer" } }, "required": ["type_id", "levels"], "title": "get_insurance_prices_200_ok", "type": "object" }, "title": "get_insurance_prices_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_insurance_prices_500_internal_server_error", "type": "string" } }, "title": "get_insurance_prices_internal_server_error", "type": "object" } } }, "summary": "List insurance levels", "tags": ["Insurance"] } }, "/killmails/{killmail_id}/{killmail_hash}/": { "get": { "description": "Return a single killmail from its ID and hash\n\n---\n\nAlternate route: `/v1/killmails/{killmail_id}/{killmail_hash}/`\n\nAlternate route: `/legacy/killmails/{killmail_id}/{killmail_hash}/`\n\nAlternate route: `/dev/killmails/{killmail_id}/{killmail_hash}/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_killmails_killmail_id_killmail_hash", "parameters": [{ "description": "The killmail ID to be queried", "format": "int32", "in": "path", "name": "killmail_id", "required": true, "type": "integer" }, { "description": "The killmail hash for verification", "in": "path", "name": "killmail_hash", "required": true, "type": "string" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A killmail", "examples": { "application/json": { "attackers": [{ "character_id": 95810944, "corporation_id": 1000179, "damage_done": 5745, "faction_id": 500003, "final_blow": true, "security_status": -0.3, "ship_type_id": 17841, "weapon_type_id": 3074 }], "killmail_id": 56733821, "killmail_time": "2016-10-22T17:13:36Z", "solar_system_id": 30002976, "victim": { "alliance_id": 621338554, "character_id": 92796241, "corporation_id": 841363671, "damage_taken": 5745, "items": [{ "flag": 20, "item_type_id": 5973, "quantity_dropped": 1, "singleton": 0 }], "position": { "x": 452186600569.4748, "y": 146704961490.90222, "z": 109514596532.54477 }, "ship_type_id": 17812 } } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "attackers": { "description": "attackers array", "items": { "description": "attacker object", "properties": { "alliance_id": { "description": "alliance_id integer", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_alliance_id", "type": "integer" }, "character_id": { "description": "character_id integer", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_character_id", "type": "integer" }, "corporation_id": { "description": "corporation_id integer", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_corporation_id", "type": "integer" }, "damage_done": { "description": "damage_done integer", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_damage_done", "type": "integer" }, "faction_id": { "description": "faction_id integer", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_faction_id", "type": "integer" }, "final_blow": { "description": "Was the attacker the one to achieve the final blow\n", "title": "get_killmails_killmail_id_killmail_hash_final_blow", "type": "boolean" }, "security_status": { "description": "Security status for the attacker\n", "format": "float", "title": "get_killmails_killmail_id_killmail_hash_security_status", "type": "number" }, "ship_type_id": { "description": "What ship was the attacker flying\n", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_ship_type_id", "type": "integer" }, "weapon_type_id": { "description": "What weapon was used by the attacker for the kill\n", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_weapon_type_id", "type": "integer" } }, "required": ["security_status", "final_blow", "damage_done"], "title": "get_killmails_killmail_id_killmail_hash_attacker", "type": "object" }, "title": "get_killmails_killmail_id_killmail_hash_attackers", "type": "array" }, "killmail_id": { "description": "ID of the killmail", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_killmail_id", "type": "integer" }, "killmail_time": { "description": "Time that the victim was killed and the killmail generated\n", "format": "date-time", "title": "get_killmails_killmail_id_killmail_hash_killmail_time", "type": "string" }, "moon_id": { "description": "Moon if the kill took place at one", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_moon_id", "type": "integer" }, "solar_system_id": { "description": "Solar system that the kill took place in\n", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_solar_system_id", "type": "integer" }, "victim": { "description": "victim object", "properties": { "alliance_id": { "description": "alliance_id integer", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_alliance_id", "type": "integer" }, "character_id": { "description": "character_id integer", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_character_id", "type": "integer" }, "corporation_id": { "description": "corporation_id integer", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_corporation_id", "type": "integer" }, "damage_taken": { "description": "How much total damage was taken by the victim\n", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_damage_taken", "type": "integer" }, "faction_id": { "description": "faction_id integer", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_faction_id", "type": "integer" }, "items": { "description": "items array", "items": { "description": "item object", "properties": { "flag": { "description": "Flag for the location of the item\n", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_flag", "type": "integer" }, "item_type_id": { "description": "item_type_id integer", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_item_type_id", "type": "integer" }, "items": { "description": "items array", "items": { "description": "item object", "properties": { "flag": { "description": "flag integer", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_flag", "type": "integer" }, "item_type_id": { "description": "item_type_id integer", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_item_type_id", "type": "integer" }, "quantity_destroyed": { "description": "quantity_destroyed integer", "format": "int64", "title": "get_killmails_killmail_id_killmail_hash_quantity_destroyed", "type": "integer" }, "quantity_dropped": { "description": "quantity_dropped integer", "format": "int64", "title": "get_killmails_killmail_id_killmail_hash_quantity_dropped", "type": "integer" }, "singleton": { "description": "singleton integer", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_singleton", "type": "integer" } }, "required": ["item_type_id", "singleton", "flag"], "title": "get_killmails_killmail_id_killmail_hash_item", "type": "object" }, "title": "get_killmails_killmail_id_killmail_hash_items", "type": "array" }, "quantity_destroyed": { "description": "How many of the item were destroyed if any\n", "format": "int64", "title": "get_killmails_killmail_id_killmail_hash_quantity_destroyed", "type": "integer" }, "quantity_dropped": { "description": "How many of the item were dropped if any\n", "format": "int64", "title": "get_killmails_killmail_id_killmail_hash_quantity_dropped", "type": "integer" }, "singleton": { "description": "singleton integer", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_singleton", "type": "integer" } }, "required": ["item_type_id", "singleton", "flag"], "title": "get_killmails_killmail_id_killmail_hash_item", "type": "object" }, "title": "get_killmails_killmail_id_killmail_hash_items", "type": "array" }, "position": { "description": "Coordinates of the victim in Cartesian space relative to the Sun\n", "properties": { "x": { "description": "x number", "format": "float", "title": "get_killmails_killmail_id_killmail_hash_x", "type": "number" }, "y": { "description": "y number", "format": "float", "title": "get_killmails_killmail_id_killmail_hash_y", "type": "number" }, "z": { "description": "z number", "format": "float", "title": "get_killmails_killmail_id_killmail_hash_z", "type": "number" } }, "required": ["x", "y", "z"], "title": "get_killmails_killmail_id_killmail_hash_position", "type": "object" }, "ship_type_id": { "description": "The ship that the victim was piloting and was destroyed\n", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_ship_type_id", "type": "integer" } }, "required": ["damage_taken", "ship_type_id"], "title": "get_killmails_killmail_id_killmail_hash_victim", "type": "object" }, "war_id": { "description": "War if the killmail is generated in relation to an official war\n", "format": "int32", "title": "get_killmails_killmail_id_killmail_hash_war_id", "type": "integer" } }, "required": ["killmail_id", "killmail_time", "victim", "attackers", "solar_system_id"], "title": "get_killmails_killmail_id_killmail_hash_ok", "type": "object" } }, "422": { "description": "Errors in query parameters", "examples": { "application/json": { "error": "56769403 and/or 2ec3ac328d4ac4769817285be884cc6c004efa0c is not valid\n" } }, "schema": { "description": "killmail_id and/or killmail_hash is not valid", "properties": { "error": { "description": "error message", "title": "get_killmails_killmail_id_killmail_hash_error", "type": "string" } }, "title": "get_killmails_killmail_id_killmail_hash_unprocessable_entity", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_killmails_killmail_id_killmail_hash_500_internal_server_error", "type": "string" } }, "title": "get_killmails_killmail_id_killmail_hash_internal_server_error", "type": "object" } } }, "summary": "Get a single killmail", "tags": ["Killmails"] } }, "/markets/prices/": { "get": { "description": "Return a list of prices\n\n---\n\nAlternate route: `/v1/markets/prices/`\n\nAlternate route: `/legacy/markets/prices/`\n\nAlternate route: `/dev/markets/prices/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_markets_prices", "parameters": [{ "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of prices", "examples": { "application/json": [{ "adjusted_price": 306988.09, "average_price": 306292.67, "type_id": 32772 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "adjusted_price": { "description": "adjusted_price number", "format": "float", "title": "get_markets_prices_adjusted_price", "type": "number" }, "average_price": { "description": "average_price number", "format": "float", "title": "get_markets_prices_average_price", "type": "number" }, "type_id": { "description": "type_id integer", "format": "int32", "title": "get_markets_prices_type_id", "type": "integer" } }, "required": ["type_id"], "title": "get_markets_prices_200_ok", "type": "object" }, "title": "get_markets_prices_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_markets_prices_500_internal_server_error", "type": "string" } }, "title": "get_markets_prices_internal_server_error", "type": "object" } } }, "summary": "List market prices", "tags": ["Market"] } }, "/markets/{region_id}/history/": { "get": { "description": "Return a list of historical market statistics for the specified type in a region\n\n---\n\nAlternate route: `/v1/markets/{region_id}/history/`\n\nAlternate route: `/legacy/markets/{region_id}/history/`\n\nAlternate route: `/dev/markets/{region_id}/history/`\n\n\n---\n\nThis route is cached for up to 300 seconds", "operationId": "get_markets_region_id_history", "parameters": [{ "description": "Return statistics in this region", "format": "int32", "in": "path", "name": "region_id", "required": true, "type": "integer" }, { "description": "Return statistics for this type", "format": "int32", "in": "query", "name": "type_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of historical market statistics", "examples": { "application/json": [{ "average": 5.25, "date": "2015-05-01", "highest": 5.27, "lowest": 5.11, "order_count": 2267, "volume": 16276782035 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "average": { "description": "average number", "format": "float", "title": "get_markets_region_id_history_average", "type": "number" }, "date": { "description": "The date of this historical statistic entry", "format": "date", "title": "get_markets_region_id_history_date", "type": "string" }, "highest": { "description": "highest number", "format": "float", "title": "get_markets_region_id_history_highest", "type": "number" }, "lowest": { "description": "lowest number", "format": "float", "title": "get_markets_region_id_history_lowest", "type": "number" }, "order_count": { "description": "Total number of orders happened that day", "format": "int64", "title": "get_markets_region_id_history_order_count", "type": "integer" }, "volume": { "description": "Total", "format": "int64", "title": "get_markets_region_id_history_volume", "type": "integer" } }, "required": ["date", "order_count", "volume", "highest", "average", "lowest"], "title": "get_markets_region_id_history_200_ok", "type": "object" }, "title": "get_markets_region_id_history_ok", "type": "array" } }, "422": { "description": "Errors in query parameters", "examples": { "application/json": { "error": "123 is not a valid market region\n" } }, "schema": { "description": "bad region_id", "properties": { "error": { "description": "error message", "title": "get_markets_region_id_history_error", "type": "string" } }, "title": "get_markets_region_id_history_unprocessable_entity", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_markets_region_id_history_500_internal_server_error", "type": "string" } }, "title": "get_markets_region_id_history_internal_server_error", "type": "object" } } }, "summary": "List historical market statistics in a region", "tags": ["Market"] } }, "/markets/{region_id}/orders/": { "get": { "description": "Return a list of orders in a region\n\n---\n\nAlternate route: `/v1/markets/{region_id}/orders/`\n\nAlternate route: `/legacy/markets/{region_id}/orders/`\n\nAlternate route: `/dev/markets/{region_id}/orders/`\n\n\n---\n\nThis route is cached for up to 300 seconds", "operationId": "get_markets_region_id_orders", "parameters": [{ "description": "Return orders in this region", "format": "int32", "in": "path", "name": "region_id", "required": true, "type": "integer" }, { "description": "Return orders only for this type", "format": "int32", "in": "query", "name": "type_id", "required": false, "type": "integer" }, { "default": "all", "description": "Filter buy/sell orders, return all orders by default. If you query without type_id, we always return both buy and sell orders.\n", "enum": ["buy", "sell", "all"], "in": "query", "name": "order_type", "required": true, "type": "string" }, { "default": 1, "description": "Which page to query, only used for querying without type_id. Starting at 1\n", "format": "int32", "in": "query", "name": "page", "required": false, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of orders", "examples": { "application/json": [{ "duration": 90, "is_buy_order": false, "issued": "2016-09-03T05:12:25Z", "location_id": 60005599, "min_volume": 1, "order_id": 4623824223, "price": 9.9, "range": "region", "type_id": 34, "volume_remain": 1296000, "volume_total": 2000000 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "duration": { "description": "duration integer", "format": "int32", "title": "get_markets_region_id_orders_duration", "type": "integer" }, "is_buy_order": { "description": "is_buy_order boolean", "title": "get_markets_region_id_orders_is_buy_order", "type": "boolean" }, "issued": { "description": "issued string", "format": "date-time", "title": "get_markets_region_id_orders_issued", "type": "string" }, "location_id": { "description": "location_id integer", "format": "int64", "title": "get_markets_region_id_orders_location_id", "type": "integer" }, "min_volume": { "description": "min_volume integer", "format": "int32", "title": "get_markets_region_id_orders_min_volume", "type": "integer" }, "order_id": { "description": "order_id integer", "format": "int64", "title": "get_markets_region_id_orders_order_id", "type": "integer" }, "price": { "description": "price number", "format": "float", "title": "get_markets_region_id_orders_price", "type": "number" }, "range": { "description": "range string", "enum": ["station", "region", "solarsystem", "1", "2", "3", "4", "5", "10", "20", "30", "40"], "title": "get_markets_region_id_orders_range", "type": "string" }, "type_id": { "description": "type_id integer", "format": "int32", "title": "get_markets_region_id_orders_type_id", "type": "integer" }, "volume_remain": { "description": "volume_remain integer", "format": "int32", "title": "get_markets_region_id_orders_volume_remain", "type": "integer" }, "volume_total": { "description": "volume_total integer", "format": "int32", "title": "get_markets_region_id_orders_volume_total", "type": "integer" } }, "required": ["order_id", "type_id", "location_id", "volume_total", "volume_remain", "min_volume", "price", "is_buy_order", "duration", "issued", "range"], "title": "get_markets_region_id_orders_200_ok", "type": "object" }, "title": "get_markets_region_id_orders_ok", "type": "array" } }, "422": { "description": "Errors in query parameters", "examples": { "application/json": { "error": "123 is not a valid market region\n" } }, "schema": { "description": "bad region_id", "properties": { "error": { "description": "error message", "title": "get_markets_region_id_orders_error", "type": "string" } }, "title": "get_markets_region_id_orders_unprocessable_entity", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_markets_region_id_orders_500_internal_server_error", "type": "string" } }, "title": "get_markets_region_id_orders_internal_server_error", "type": "object" } } }, "summary": "List orders in a region", "tags": ["Market"] } }, "/search/": { "get": { "description": "Search for entities that match a given sub-string.\n\n---\n\nAlternate route: `/v1/search/`\n\nAlternate route: `/legacy/search/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_search", "parameters": [{ "description": "The string to search on", "in": "query", "minLength": 3, "name": "search", "required": true, "type": "string" }, { "description": "Type of entities to search for", "in": "query", "items": { "enum": ["agent", "alliance", "character", "constellation", "corporation", "faction", "inventorytype", "region", "solarsystem", "station", "wormhole"], "type": "string" }, "minItems": 1, "name": "categories", "required": true, "type": "array", "uniqueItems": true }, { "default": "en-us", "description": "Search locale", "enum": ["en-us", "de", "fr", "ru", "ja", "zh"], "in": "query", "name": "language", "type": "string" }, { "default": false, "description": "Whether the search should be a strict match", "in": "query", "name": "strict", "type": "boolean" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of search results", "examples": { "application/json": { "solarsystem": [30002510], "station": [60004588, 60004594, 60005725, 60009106, 60012721, 60012724, 60012727] } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "agent": { "description": "agent array", "items": { "description": "agent integer", "format": "int32", "title": "get_search_agent", "type": "integer" }, "title": "get_search_agent", "type": "array" }, "alliance": { "description": "alliance array", "items": { "description": "alliance integer", "format": "int32", "title": "get_search_alliance", "type": "integer" }, "title": "get_search_alliance", "type": "array" }, "character": { "description": "character array", "items": { "description": "character integer", "format": "int32", "title": "get_search_character", "type": "integer" }, "title": "get_search_character", "type": "array" }, "constellation": { "description": "constellation array", "items": { "description": "constellation integer", "format": "int32", "title": "get_search_constellation", "type": "integer" }, "title": "get_search_constellation", "type": "array" }, "corporation": { "description": "corporation array", "items": { "description": "corporation integer", "format": "int32", "title": "get_search_corporation", "type": "integer" }, "title": "get_search_corporation", "type": "array" }, "faction": { "description": "faction array", "items": { "description": "faction integer", "format": "int32", "title": "get_search_faction", "type": "integer" }, "title": "get_search_faction", "type": "array" }, "inventorytype": { "description": "inventorytype array", "items": { "description": "inventorytype integer", "format": "int32", "title": "get_search_inventorytype", "type": "integer" }, "title": "get_search_inventorytype", "type": "array" }, "region": { "description": "region array", "items": { "description": "region integer", "format": "int32", "title": "get_search_region", "type": "integer" }, "title": "get_search_region", "type": "array" }, "solarsystem": { "description": "solarsystem array", "items": { "description": "solarsystem integer", "format": "int32", "title": "get_search_solarsystem", "type": "integer" }, "title": "get_search_solarsystem", "type": "array" }, "station": { "description": "station array", "items": { "description": "station integer", "format": "int32", "title": "get_search_station", "type": "integer" }, "title": "get_search_station", "type": "array" }, "wormhole": { "description": "wormhole array", "items": { "description": "wormhole integer", "format": "int32", "title": "get_search_wormhole", "type": "integer" }, "title": "get_search_wormhole", "type": "array" } }, "title": "get_search_ok", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_search_500_internal_server_error", "type": "string" } }, "title": "get_search_internal_server_error", "type": "object" } } }, "summary": "Search on a string", "tags": ["Search"] } }, "/sovereignty/campaigns/": { "get": { "description": "Shows sovereignty data for campaigns.\n\n---\n\nAlternate route: `/v1/sovereignty/campaigns/`\n\nAlternate route: `/legacy/sovereignty/campaigns/`\n\nAlternate route: `/dev/sovereignty/campaigns/`\n\n\n---\n\nThis route is cached for up to 5 seconds", "operationId": "get_sovereignty_campaigns", "parameters": [{ "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of sovereignty campaigns", "examples": { "application/json": [{ "attackers_score": 0.4, "campaign_id": 32833, "constellation_id": 20000125, "defender_id": 1695357456, "defender_score": 0.6, "event_type": "station_defense", "solar_system_id": 30000856, "start_time": "2016-10-29T14:34:40Z", "structure_id": 61001096 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "attackers_score": { "description": "Score for all attacking parties, only present in Defense Events.\n", "format": "float", "title": "get_sovereignty_campaigns_attackers_score", "type": "number" }, "campaign_id": { "description": "Unique ID for this campaign.", "format": "int32", "title": "get_sovereignty_campaigns_campaign_id", "type": "integer" }, "constellation_id": { "description": "The constellation in which the campaign will take place.\n", "format": "int32", "title": "get_sovereignty_campaigns_constellation_id", "type": "integer" }, "defender_id": { "description": "Defending alliance, only present in Defense Events\n", "format": "int32", "title": "get_sovereignty_campaigns_defender_id", "type": "integer" }, "defender_score": { "description": "Score for the defending alliance, only present in Defense Events.\n", "format": "float", "title": "get_sovereignty_campaigns_defender_score", "type": "number" }, "event_type": { "description": "Type of event this campaign is for. tcu_defense, ihub_defense and station_defense are referred to as \"Defense Events\", station_freeport as \"Freeport Events\".\n", "enum": ["tcu_defense", "ihub_defense", "station_defense", "station_freeport"], "title": "get_sovereignty_campaigns_event_type", "type": "string" }, "participants": { "description": "Alliance participating and their respective scores, only present in Freeport Events.\n", "items": { "description": "participant object", "properties": { "alliance_id": { "description": "alliance_id integer", "format": "int32", "title": "get_sovereignty_campaigns_alliance_id", "type": "integer" }, "score": { "description": "score number", "format": "float", "title": "get_sovereignty_campaigns_score", "type": "number" } }, "required": ["alliance_id", "score"], "title": "get_sovereignty_campaigns_participant", "type": "object" }, "title": "get_sovereignty_campaigns_participants", "type": "array" }, "solar_system_id": { "description": "The solar system the structure is located in.\n", "format": "int32", "title": "get_sovereignty_campaigns_solar_system_id", "type": "integer" }, "start_time": { "description": "Time the event is scheduled to start.\n", "format": "date-time", "title": "get_sovereignty_campaigns_start_time", "type": "string" }, "structure_id": { "description": "The structure item ID that is related to this campaign.\n", "format": "int64", "title": "get_sovereignty_campaigns_structure_id", "type": "integer" } }, "required": ["campaign_id", "structure_id", "solar_system_id", "constellation_id", "event_type", "start_time"], "title": "get_sovereignty_campaigns_200_ok", "type": "object" }, "title": "get_sovereignty_campaigns_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_sovereignty_campaigns_500_internal_server_error", "type": "string" } }, "title": "get_sovereignty_campaigns_internal_server_error", "type": "object" } } }, "summary": "List sovereignty campaigns", "tags": ["Sovereignty"] } }, "/sovereignty/structures/": { "get": { "description": "Shows sovereignty data for structures.\n\n---\n\nAlternate route: `/v1/sovereignty/structures/`\n\nAlternate route: `/legacy/sovereignty/structures/`\n\nAlternate route: `/dev/sovereignty/structures/`\n\n\n---\n\nThis route is cached for up to 120 seconds", "operationId": "get_sovereignty_structures", "parameters": [{ "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of sovereignty structures", "examples": { "application/json": [{ "alliance_id": 498125261, "solar_system_id": 30000570, "structure_id": 1018253388776, "structure_type_id": 32226, "vulnerability_occupancy_level": 2, "vulnerable_end_time": "2016-10-29T05:30:00Z", "vulnerable_start_time": "2016-10-28T20:30:00Z" }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "alliance_id": { "description": "The alliance that owns the structure.\n", "format": "int32", "title": "get_sovereignty_structures_alliance_id", "type": "integer" }, "solar_system_id": { "description": "Solar system in which the structure is located.\n", "format": "int32", "title": "get_sovereignty_structures_solar_system_id", "type": "integer" }, "structure_id": { "description": "Unique item ID for this structure.", "format": "int64", "title": "get_sovereignty_structures_structure_id", "type": "integer" }, "structure_type_id": { "description": "A reference to the type of structure this is.\n", "format": "int32", "title": "get_sovereignty_structures_structure_type_id", "type": "integer" }, "vulnerability_occupancy_level": { "description": "The occupancy level for the next or current vulnerability window. This takes into account all development indexes and capital system bonuses. Also known as Activity Defense Multiplier from in the client. It increases the time that attackers must spend using their entosis links on the structure.\n", "format": "float", "title": "get_sovereignty_structures_vulnerability_occupancy_level", "type": "number" }, "vulnerable_end_time": { "description": "The time at which the next or current vulnerability window ends. At the end of a vulnerability window the next window is recalculated and locked in along with the vulnerabilityOccupancyLevel. If the structure is not in 100% entosis control of the defender, it will go in to 'overtime' and stay vulnerable for as long as that situation persists. Only once the defenders have 100% entosis control and has the vulnerableEndTime passed does the vulnerability interval expire and a new one is calculated.\n", "format": "date-time", "title": "get_sovereignty_structures_vulnerable_end_time", "type": "string" }, "vulnerable_start_time": { "description": "The next time at which the structure will become vulnerable. Or the start time of the current window if current time is between this and vulnerableEndTime.\n", "format": "date-time", "title": "get_sovereignty_structures_vulnerable_start_time", "type": "string" } }, "required": ["alliance_id", "solar_system_id", "structure_id", "structure_type_id"], "title": "get_sovereignty_structures_200_ok", "type": "object" }, "title": "get_sovereignty_structures_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_sovereignty_structures_500_internal_server_error", "type": "string" } }, "title": "get_sovereignty_structures_internal_server_error", "type": "object" } } }, "summary": "List sovereignty structures", "tags": ["Sovereignty"] } }, "/ui/autopilot/waypoint/": { "post": { "description": "Set a solar system as autopilot waypoint\n\n---\n\nAlternate route: `/v2/ui/autopilot/waypoint/`\n\nAlternate route: `/dev/ui/autopilot/waypoint/`\n", "operationId": "post_ui_autopilot_waypoint", "parameters": [{ "description": "The destination to travel to, can be solar system, station or structure's id", "format": "int64", "in": "query", "name": "destination_id", "required": true, "type": "integer" }, { "default": false, "description": "Whether clean other waypoints beforing adding this one", "in": "query", "name": "clear_other_waypoints", "required": true, "type": "boolean" }, { "default": false, "description": "Whether this solar system should be added to the beginning of all waypoints", "in": "query", "name": "add_to_beginning", "required": true, "type": "boolean" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Open window request received" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-ui.write_waypoint.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "post_ui_autopilot_waypoint_403_forbidden", "type": "string" } }, "title": "post_ui_autopilot_waypoint_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "post_ui_autopilot_waypoint_500_internal_server_error", "type": "string" } }, "title": "post_ui_autopilot_waypoint_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-ui.write_waypoint.v1"] }], "summary": "Set Autopilot Waypoint", "tags": ["User Interface"] } }, "/ui/openwindow/contract/": { "post": { "description": "Open the contract window inside the client\n\n---\n\nAlternate route: `/v1/ui/openwindow/contract/`\n\nAlternate route: `/legacy/ui/openwindow/contract/`\n\nAlternate route: `/dev/ui/openwindow/contract/`\n", "operationId": "post_ui_openwindow_contract", "parameters": [{ "description": "The contract to open", "format": "int32", "in": "query", "name": "contract_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Open window request received" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-ui.open_window.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "post_ui_openwindow_contract_403_forbidden", "type": "string" } }, "title": "post_ui_openwindow_contract_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "post_ui_openwindow_contract_500_internal_server_error", "type": "string" } }, "title": "post_ui_openwindow_contract_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-ui.open_window.v1"] }], "summary": "Open Contract Window", "tags": ["User Interface"] } }, "/ui/openwindow/information/": { "post": { "description": "Open the information window for a character, corporation or alliance inside the client\n\n---\n\nAlternate route: `/v1/ui/openwindow/information/`\n\nAlternate route: `/legacy/ui/openwindow/information/`\n\nAlternate route: `/dev/ui/openwindow/information/`\n", "operationId": "post_ui_openwindow_information", "parameters": [{ "description": "The target to open", "format": "int32", "in": "query", "name": "target_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Open window request received" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-ui.open_window.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "post_ui_openwindow_information_403_forbidden", "type": "string" } }, "title": "post_ui_openwindow_information_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "post_ui_openwindow_information_500_internal_server_error", "type": "string" } }, "title": "post_ui_openwindow_information_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-ui.open_window.v1"] }], "summary": "Open Information Window", "tags": ["User Interface"] } }, "/ui/openwindow/marketdetails/": { "post": { "description": "Open the market details window for a specific typeID inside the client\n\n---\n\nAlternate route: `/v1/ui/openwindow/marketdetails/`\n\nAlternate route: `/legacy/ui/openwindow/marketdetails/`\n\nAlternate route: `/dev/ui/openwindow/marketdetails/`\n", "operationId": "post_ui_openwindow_marketdetails", "parameters": [{ "description": "The item type to open in market window", "format": "int32", "in": "query", "name": "type_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Open window request received" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-ui.open_window.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "post_ui_openwindow_marketdetails_403_forbidden", "type": "string" } }, "title": "post_ui_openwindow_marketdetails_forbidden", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "post_ui_openwindow_marketdetails_500_internal_server_error", "type": "string" } }, "title": "post_ui_openwindow_marketdetails_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-ui.open_window.v1"] }], "summary": "Open Market Details", "tags": ["User Interface"] } }, "/ui/openwindow/newmail/": { "post": { "description": "Open the New Mail window, according to settings from the request if applicable\n\n---\n\nAlternate route: `/v1/ui/openwindow/newmail/`\n\nAlternate route: `/legacy/ui/openwindow/newmail/`\n\nAlternate route: `/dev/ui/openwindow/newmail/`\n", "operationId": "post_ui_openwindow_newmail", "parameters": [{ "description": "The item type to open in market window", "in": "body", "name": "new_mail", "required": true, "schema": { "description": "new_mail object", "properties": { "body": { "description": "body string", "maxLength": 10000, "title": "post_ui_openwindow_newmail_body", "type": "string" }, "recipients": { "description": "recipients array", "items": { "description": "recipient integer", "format": "int32", "title": "post_ui_openwindow_newmail_recipient", "type": "integer" }, "maxItems": 50, "minItems": 1, "title": "post_ui_openwindow_newmail_recipients", "type": "array" }, "subject": { "description": "subject string", "maxLength": 1000, "title": "post_ui_openwindow_newmail_subject", "type": "string" }, "to_corp_or_alliance_id": { "description": "to_corp_or_alliance_id integer", "format": "int32", "title": "post_ui_openwindow_newmail_to_corp_or_alliance_id", "type": "integer" }, "to_mailing_list_id": { "description": "Corporations, alliances and mailing lists are all types of mailing groups. You may only send to one mailing group, at a time, so you may fill out either this field or the to_corp_or_alliance_ids field", "format": "int32", "title": "post_ui_openwindow_newmail_to_mailing_list_id", "type": "integer" } }, "required": ["subject", "body", "recipients"], "title": "post_ui_openwindow_newmail_new_mail", "type": "object" } }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "204": { "description": "Open window request received" }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-ui.open_window.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "post_ui_openwindow_newmail_403_forbidden", "type": "string" } }, "title": "post_ui_openwindow_newmail_forbidden", "type": "object" } }, "422": { "description": "Errors in request body", "examples": { "application/json": { "error": "error in request body" } }, "schema": { "description": "422 unprocessable entity object", "properties": { "error": { "description": "error message", "title": "post_ui_openwindow_newmail_error", "type": "string" } }, "title": "post_ui_openwindow_newmail_unprocessable_entity", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "post_ui_openwindow_newmail_500_internal_server_error", "type": "string" } }, "title": "post_ui_openwindow_newmail_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-ui.open_window.v1"] }], "summary": "Open New Mail Window", "tags": ["User Interface"] } }, "/universe/names/": { "post": { "description": "Resolve a set of IDs to names and categories. Supported ID's for resolving are: Characters, Corporations, Alliances, Stations, Solar Systems, Constellations, Regions, Types.\n\n---\n\nAlternate route: `/v1/universe/names/`\n\nAlternate route: `/legacy/universe/names/`\n", "operationId": "post_universe_names", "parameters": [{ "description": "The ids to resolve", "in": "body", "name": "ids", "required": true, "schema": { "description": "ids schema", "properties": { "ids": { "description": "ids array", "items": { "description": "id integer", "format": "int32", "title": "post_universe_names_id", "type": "integer" }, "minItems": 1, "title": "post_universe_names_ids", "type": "array", "uniqueItems": true } }, "required": ["ids"], "title": "post_universe_names_ids" } }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "List of id/name associations for a set of ID's. ID's that cannot be resolved are not returned.", "examples": { "application/json": [{ "category": "character", "id": 95465499, "name": "CCP Bartender" }, { "category": "solar_system", "id": 30000142, "name": "Jita" }] }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "category": { "description": "category string", "enum": ["alliance", "character", "constellation", "corporation", "inventory_type", "region", "solar_system", "station"], "title": "post_universe_names_category", "type": "string" }, "id": { "description": "id integer", "format": "int32", "title": "post_universe_names_id", "type": "integer" }, "name": { "description": "name string", "title": "post_universe_names_name", "type": "string" } }, "required": ["id", "name", "category"], "title": "post_universe_names_200_ok", "type": "object" }, "title": "post_universe_names_ok", "type": "array" } }, "404": { "description": "no valid IDs found", "examples": { "application/json": { "error": "Not found message" } }, "schema": { "description": "Not found", "properties": { "error": { "description": "Not found message", "title": "post_universe_names_404_not_found", "type": "string" } }, "title": "post_universe_names_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "post_universe_names_500_internal_server_error", "type": "string" } }, "title": "post_universe_names_internal_server_error", "type": "object" } } }, "summary": "Get names and categories for a set of ID's", "tags": ["Universe"] } }, "/universe/schematics/{schematic_id}/": { "get": { "description": "Get information on a planetary factory schematic\n\n---\n\nAlternate route: `/v1/universe/schematics/{schematic_id}/`\n\nAlternate route: `/legacy/universe/schematics/{schematic_id}/`\n\nAlternate route: `/dev/universe/schematics/{schematic_id}/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_universe_schematics_schematic_id", "parameters": [{ "description": "A PI schematic ID", "format": "int32", "in": "path", "name": "schematic_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Public data about a schematic", "examples": { "application/json": { "cycle_time": 1800, "schematic_name": "Bacteria" } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "cycle_time": { "description": "Time in seconds to process a run", "format": "int32", "title": "get_universe_schematics_schematic_id_cycle_time", "type": "integer" }, "schematic_name": { "description": "schematic_name string", "title": "get_universe_schematics_schematic_id_schematic_name", "type": "string" } }, "required": ["schematic_name", "cycle_time"], "title": "get_universe_schematics_schematic_id_ok", "type": "object" } }, "404": { "description": "Schematic not found", "examples": { "application/json": { "error": "Schematic not found" } }, "schema": { "description": "Schematic not found", "properties": { "error": { "description": "error message", "title": "get_universe_schematics_schematic_id_error", "type": "string" } }, "title": "get_universe_schematics_schematic_id_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_universe_schematics_schematic_id_500_internal_server_error", "type": "string" } }, "title": "get_universe_schematics_schematic_id_internal_server_error", "type": "object" } } }, "summary": "Get schematic information", "tags": ["Planetary Interaction"] } }, "/universe/stations/{station_id}/": { "get": { "description": "Public information on stations\n\n---\n\nAlternate route: `/v1/universe/stations/{station_id}/`\n\nAlternate route: `/legacy/universe/stations/{station_id}/`\n\nAlternate route: `/dev/universe/stations/{station_id}/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_universe_stations_station_id", "parameters": [{ "description": "An Eve station ID", "format": "int32", "in": "path", "name": "station_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Public data about a station", "examples": { "application/json": { "solar_system_id": 30000142, "station_name": "Jita IV Moon IV - Caldari Navy Assembly Plant" } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "solar_system_id": { "description": "solar_system_id integer", "format": "int32", "title": "get_universe_stations_station_id_solar_system_id", "type": "integer" }, "station_name": { "description": "the full name of the station", "title": "get_universe_stations_station_id_station_name", "type": "string" } }, "title": "get_universe_stations_station_id_ok", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_universe_stations_station_id_500_internal_server_error", "type": "string" } }, "title": "get_universe_stations_station_id_internal_server_error", "type": "object" } } }, "summary": "Get station information", "tags": ["Universe"] } }, "/universe/structures/": { "get": { "description": "List all public structures\n\n---\n\nAlternate route: `/v1/universe/structures/`\n\nAlternate route: `/legacy/universe/structures/`\n\nAlternate route: `/dev/universe/structures/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_universe_structures", "parameters": [{ "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "List of public structure IDs", "examples": { "application/json": [1000000017013, 1000000025062] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok integer", "format": "int64", "minimum": 0, "title": "get_universe_structures_200_ok", "type": "integer", "uniqueItems": true }, "title": "get_universe_structures_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_universe_structures_500_internal_server_error", "type": "string" } }, "title": "get_universe_structures_internal_server_error", "type": "object" } } }, "summary": "List all public structures", "tags": ["Universe"] } }, "/universe/structures/{structure_id}/": { "get": { "description": "Returns information on requested structure, if you are on the ACL. Otherwise, returns \"Forbidden\" for all inputs.\n\n---\n\nAlternate route: `/v1/universe/structures/{structure_id}/`\n\nAlternate route: `/legacy/universe/structures/{structure_id}/`\n\nAlternate route: `/dev/universe/structures/{structure_id}/`\n", "operationId": "get_universe_structures_structure_id", "parameters": [{ "description": "An Eve structure ID", "format": "int64", "in": "path", "name": "structure_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Data about a structure", "examples": { "application/json": { "name": "V-3YG7 VI - The Capital", "solar_system_id": 30000142 } }, "schema": { "description": "200 ok object", "properties": { "name": { "description": "The full name of the structure", "title": "get_universe_structures_structure_id_name", "type": "string" }, "position": { "description": "Coordinates of the structure in Cartesian space relative to the Sun, in metres.\n", "properties": { "x": { "description": "x number", "format": "float", "title": "get_universe_structures_structure_id_x", "type": "number" }, "y": { "description": "y number", "format": "float", "title": "get_universe_structures_structure_id_y", "type": "number" }, "z": { "description": "z number", "format": "float", "title": "get_universe_structures_structure_id_z", "type": "number" } }, "required": ["x", "y", "z"], "title": "get_universe_structures_structure_id_position", "type": "object" }, "solar_system_id": { "description": "solar_system_id integer", "format": "int32", "title": "get_universe_structures_structure_id_solar_system_id", "type": "integer" }, "type_id": { "description": "type_id integer", "format": "int32", "title": "get_universe_structures_structure_id_type_id", "type": "integer" } }, "required": ["name", "solar_system_id"], "title": "get_universe_structures_structure_id_ok", "type": "object" } }, "403": { "description": "Forbidden", "examples": { "application/json": { "error": "Token is not valid for scope(s): esi-universe.read_structures.v1" } }, "schema": { "description": "Forbidden", "properties": { "error": { "description": "Forbidden message", "title": "get_universe_structures_structure_id_403_forbidden", "type": "string" } }, "title": "get_universe_structures_structure_id_forbidden", "type": "object" } }, "404": { "description": "Structure not found", "examples": { "application/json": { "error": "Not found message" } }, "schema": { "description": "Not found", "properties": { "error": { "description": "Not found message", "title": "get_universe_structures_structure_id_404_not_found", "type": "string" } }, "title": "get_universe_structures_structure_id_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_universe_structures_structure_id_500_internal_server_error", "type": "string" } }, "title": "get_universe_structures_structure_id_internal_server_error", "type": "object" } } }, "security": [{ "evesso": ["esi-universe.read_structures.v1"] }], "summary": "Get structure information", "tags": ["Universe"] } }, "/universe/systems/{system_id}/": { "get": { "description": "Information on solar systems\n\n---\n\nAlternate route: `/v1/universe/systems/{system_id}/`\n\nAlternate route: `/legacy/universe/systems/{system_id}/`\n\nAlternate route: `/dev/universe/systems/{system_id}/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_universe_systems_system_id", "parameters": [{ "description": "An Eve solar system ID", "format": "int32", "in": "path", "name": "system_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Data about a solar system", "examples": { "application/json": { "solar_system_name": "Jita" } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "solar_system_name": { "description": "the full name of the system", "title": "get_universe_systems_system_id_solar_system_name", "type": "string" } }, "title": "get_universe_systems_system_id_ok", "type": "object" } }, "404": { "description": "System not found", "examples": { "application/json": { "error": "System not found" } }, "schema": { "description": "System not found", "properties": { "error": { "description": "error message", "title": "get_universe_systems_system_id_error", "type": "string" } }, "title": "get_universe_systems_system_id_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_universe_systems_system_id_500_internal_server_error", "type": "string" } }, "title": "get_universe_systems_system_id_internal_server_error", "type": "object" } } }, "summary": "Get solar system information", "tags": ["Universe"] } }, "/universe/types/{type_id}/": { "get": { "description": "Get information on a type\n\n---\n\nAlternate route: `/v1/universe/types/{type_id}/`\n\nAlternate route: `/legacy/universe/types/{type_id}/`\n\nAlternate route: `/dev/universe/types/{type_id}/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_universe_types_type_id", "parameters": [{ "description": "An Eve item type ID", "format": "int32", "in": "path", "name": "type_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Public data about a type", "examples": { "application/json": { "category_id": 6, "graphic_id": 46, "group_id": 25, "type_description": "The Rifter is a very powerful combat frigate and can easily tackle the best frigates out there. It has gone through many radical design phases since its inauguration during the Minmatar Rebellion. The Rifter has a wide variety of offensive capabilities, making it an unpredictable and deadly adversary.", "type_name": "Rifter" } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "category_id": { "description": "category_id integer", "format": "int32", "title": "get_universe_types_type_id_category_id", "type": "integer" }, "graphic_id": { "description": "graphic_id integer", "format": "int32", "title": "get_universe_types_type_id_graphic_id", "type": "integer" }, "group_id": { "description": "group_id integer", "format": "int32", "title": "get_universe_types_type_id_group_id", "type": "integer" }, "icon_id": { "description": "icon_id integer", "format": "int32", "title": "get_universe_types_type_id_icon_id", "type": "integer" }, "type_description": { "description": "type_description string", "title": "get_universe_types_type_id_type_description", "type": "string" }, "type_name": { "description": "type_name string", "title": "get_universe_types_type_id_type_name", "type": "string" } }, "required": ["type_name", "type_description", "group_id", "category_id"], "title": "get_universe_types_type_id_ok", "type": "object" } }, "404": { "description": "Type not found", "examples": { "application/json": { "error": "Type not found" } }, "schema": { "description": "Type not found", "properties": { "error": { "description": "error message", "title": "get_universe_types_type_id_error", "type": "string" } }, "title": "get_universe_types_type_id_not_found", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_universe_types_type_id_500_internal_server_error", "type": "string" } }, "title": "get_universe_types_type_id_internal_server_error", "type": "object" } } }, "summary": "Get type information", "tags": ["Universe"] } }, "/wars/": { "get": { "description": "Return a list of wars\n\n---\n\nAlternate route: `/v1/wars/`\n\nAlternate route: `/legacy/wars/`\n\nAlternate route: `/dev/wars/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_wars", "parameters": [{ "default": 1, "description": "Which page to query, starting at 1, 2000 wars per page.", "format": "int32", "in": "query", "name": "page", "required": false, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of war IDs", "examples": { "application/json": [3, 2, 1] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok integer", "format": "int32", "title": "get_wars_200_ok", "type": "integer" }, "title": "get_wars_ok", "type": "array" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_wars_500_internal_server_error", "type": "string" } }, "title": "get_wars_internal_server_error", "type": "object" } } }, "summary": "List wars", "tags": ["Wars"] } }, "/wars/{war_id}/": { "get": { "description": "Return details about a war\n\n---\n\nAlternate route: `/v1/wars/{war_id}/`\n\nAlternate route: `/legacy/wars/{war_id}/`\n\nAlternate route: `/dev/wars/{war_id}/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_wars_war_id", "parameters": [{ "description": "ID for a war", "format": "int32", "in": "path", "name": "war_id", "required": true, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "Details about a war", "examples": { "application/json": { "aggressor": { "corporation_id": 986665792, "isk_destroyed": 0, "ships_killed": 0 }, "declared": "2004-05-22T05:20:00Z", "defender": { "corporation_id": 1001562011, "isk_destroyed": 0, "ships_killed": 0 }, "id": 1941, "mutual": false, "open_for_allies": false } }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok object", "properties": { "aggressor": { "description": "The aggressor corporation or alliance that declared this war, only contains either corporation_id or alliance_id", "properties": { "alliance_id": { "description": "Alliance ID if and only if the aggressor is an alliance", "format": "int32", "title": "get_wars_war_id_alliance_id", "type": "integer" }, "corporation_id": { "description": "Corporation ID if and only if the aggressor is a corporation", "format": "int32", "title": "get_wars_war_id_corporation_id", "type": "integer" }, "isk_destroyed": { "description": "ISK value of ships the aggressor has destroyed", "format": "float", "title": "get_wars_war_id_isk_destroyed", "type": "number" }, "ships_killed": { "description": "The number of ships the aggressor has killed", "format": "int32", "title": "get_wars_war_id_ships_killed", "type": "integer" } }, "required": ["ships_killed", "isk_destroyed"], "title": "get_wars_war_id_aggressor", "type": "object" }, "allies": { "description": "allied corporations or alliances, each object contains either corporation_id or alliance_id", "items": { "description": "ally object", "properties": { "alliance_id": { "description": "Alliance ID if and only if this ally is an alliance", "format": "int32", "title": "get_wars_war_id_alliance_id", "type": "integer" }, "corporation_id": { "description": "Corporation ID if and only if this ally is a corporation", "format": "int32", "title": "get_wars_war_id_corporation_id", "type": "integer" } }, "title": "get_wars_war_id_ally", "type": "object" }, "title": "get_wars_war_id_allies", "type": "array" }, "declared": { "description": "Time that the war was declared", "format": "date-time", "title": "get_wars_war_id_declared", "type": "string" }, "defender": { "description": "The defending corporation or alliance that declared this war, only contains either corporation_id or alliance_id", "properties": { "alliance_id": { "description": "Alliance ID if and only if the defender is an alliance", "format": "int32", "title": "get_wars_war_id_alliance_id", "type": "integer" }, "corporation_id": { "description": "Corporation ID if and only if the defender is a corporation", "format": "int32", "title": "get_wars_war_id_corporation_id", "type": "integer" }, "isk_destroyed": { "description": "ISK value of ships the defender has killed", "format": "float", "title": "get_wars_war_id_isk_destroyed", "type": "number" }, "ships_killed": { "description": "The number of ships the defender has killed", "format": "int32", "title": "get_wars_war_id_ships_killed", "type": "integer" } }, "required": ["ships_killed", "isk_destroyed"], "title": "get_wars_war_id_defender", "type": "object" }, "finished": { "description": "Time the war ended and shooting was no longer allowed", "format": "date-time", "title": "get_wars_war_id_finished", "type": "string" }, "id": { "description": "ID of the specified war", "format": "int32", "title": "get_wars_war_id_id", "type": "integer" }, "mutual": { "description": "Was the war declared mutual by both parties", "title": "get_wars_war_id_mutual", "type": "boolean" }, "open_for_allies": { "description": "Is the war currently open for allies or not", "title": "get_wars_war_id_open_for_allies", "type": "boolean" }, "retracted": { "description": "Time the war was retracted but both sides could still shoot each other", "format": "date-time", "title": "get_wars_war_id_retracted", "type": "string" }, "started": { "description": "Time when the war started and both sides could shoot each other", "format": "date-time", "title": "get_wars_war_id_started", "type": "string" } }, "required": ["id", "declared", "mutual", "open_for_allies", "aggressor", "defender"], "title": "get_wars_war_id_ok", "type": "object" } }, "422": { "description": "Errors in query parameters", "examples": { "application/json": { "error": "{} is not a valid war ID\n" } }, "schema": { "description": "war_id is not valid", "properties": { "error": { "description": "error message", "title": "get_wars_war_id_error", "type": "string" } }, "title": "get_wars_war_id_unprocessable_entity", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_wars_war_id_500_internal_server_error", "type": "string" } }, "title": "get_wars_war_id_internal_server_error", "type": "object" } } }, "summary": "Get war information", "tags": ["Wars"] } }, "/wars/{war_id}/killmails/": { "get": { "description": "Return a list of kills related to a war\n\n---\n\nAlternate route: `/v1/wars/{war_id}/killmails/`\n\nAlternate route: `/legacy/wars/{war_id}/killmails/`\n\nAlternate route: `/dev/wars/{war_id}/killmails/`\n\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_wars_war_id_killmails", "parameters": [{ "description": "A valid war ID", "format": "int32", "in": "path", "name": "war_id", "required": true, "type": "integer" }, { "default": 1, "description": "Which page to query, starting at 1, 2000 killmails per page.", "format": "int32", "in": "query", "name": "page", "required": false, "type": "integer" }, { "default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility", "singularity"], "in": "query", "name": "datasource", "type": "string" }], "responses": { "200": { "description": "A list of killmail IDs and hashes", "examples": { "application/json": [{ "killmail_hash": "8eef5e8fb6b88fe3407c489df33822b2e3b57a5e", "killmail_id": 2 }, { "killmail_hash": "b41ccb498ece33d64019f64c0db392aa3aa701fb", "killmail_id": 1 }] }, "headers": { "Cache-Control": { "description": "The caching mechanism used", "type": "string" }, "Expires": { "description": "RFC7231 formatted datetime string", "type": "string" }, "Last-Modified": { "description": "RFC7231 formatted datetime string", "type": "string" } }, "schema": { "description": "200 ok array", "items": { "description": "200 ok object", "properties": { "killmail_hash": { "description": "A hash of this killmail", "title": "get_wars_war_id_killmails_killmail_hash", "type": "string" }, "killmail_id": { "description": "ID of this killmail", "format": "int32", "title": "get_wars_war_id_killmails_killmail_id", "type": "integer" } }, "required": ["killmail_id", "killmail_hash"], "title": "get_wars_war_id_killmails_200_ok", "type": "object" }, "title": "get_wars_war_id_killmails_ok", "type": "array" } }, "422": { "description": "Errors in query parameters", "examples": { "application/json": { "error": "{} is not a valid war ID\n" } }, "schema": { "description": "war_id is not valid", "properties": { "error": { "description": "error message", "title": "get_wars_war_id_killmails_error", "type": "string" } }, "title": "get_wars_war_id_killmails_unprocessable_entity", "type": "object" } }, "500": { "description": "Internal server error", "examples": { "application/json": { "error": "uncaught exception: IOError('out of memory')" } }, "schema": { "description": "Internal server error", "properties": { "error": { "description": "Internal server error message", "title": "get_wars_war_id_killmails_500_internal_server_error", "type": "string" } }, "title": "get_wars_war_id_killmails_internal_server_error", "type": "object" } } }, "summary": "List kills for a war", "tags": ["Wars"] } } }, "produces": ["application/json"], "schemes": ["https"], "securityDefinitions": { "evesso": { "authorizationUrl": "https://login.eveonline.com/oauth/authorize", "flow": "implicit", "scopes": { "esi-assets.read_assets.v1": "EVE SSO scope esi-assets.read_assets.v1", "esi-bookmarks.read_character_bookmarks.v1": "EVE SSO scope esi-bookmarks.read_character_bookmarks.v1", "esi-calendar.read_calendar_events.v1": "EVE SSO scope esi-calendar.read_calendar_events.v1", "esi-calendar.respond_calendar_events.v1": "EVE SSO scope esi-calendar.respond_calendar_events.v1", "esi-characters.read_contacts.v1": "EVE SSO scope esi-characters.read_contacts.v1", "esi-characters.write_contacts.v1": "EVE SSO scope esi-characters.write_contacts.v1", "esi-clones.read_clones.v1": "EVE SSO scope esi-clones.read_clones.v1", "esi-corporations.read_corporation_membership.v1": "EVE SSO scope esi-corporations.read_corporation_membership.v1", "esi-fleets.read_fleet.v1": "EVE SSO scope esi-fleets.read_fleet.v1", "esi-fleets.write_fleet.v1": "EVE SSO scope esi-fleets.write_fleet.v1", "esi-killmails.read_killmails.v1": "EVE SSO scope esi-killmails.read_killmails.v1", "esi-location.read_location.v1": "EVE SSO scope esi-location.read_location.v1", "esi-location.read_ship_type.v1": "EVE SSO scope esi-location.read_ship_type.v1", "esi-mail.organize_mail.v1": "EVE SSO scope esi-mail.organize_mail.v1", "esi-mail.read_mail.v1": "EVE SSO scope esi-mail.read_mail.v1", "esi-mail.send_mail.v1": "EVE SSO scope esi-mail.send_mail.v1", "esi-planets.manage_planets.v1": "EVE SSO scope esi-planets.manage_planets.v1", "esi-search.search_structures.v1": "EVE SSO scope esi-search.search_structures.v1", "esi-skills.read_skillqueue.v1": "EVE SSO scope esi-skills.read_skillqueue.v1", "esi-skills.read_skills.v1": "EVE SSO scope esi-skills.read_skills.v1", "esi-ui.open_window.v1": "EVE SSO scope esi-ui.open_window.v1", "esi-ui.write_waypoint.v1": "EVE SSO scope esi-ui.write_waypoint.v1", "esi-universe.read_structures.v1": "EVE SSO scope esi-universe.read_structures.v1", "esi-wallet.read_character_wallet.v1": "EVE SSO scope esi-wallet.read_character_wallet.v1" }, "type": "oauth2" } }, "swagger": "2.0" } validate-0.24.0/fixtures/go-swagger/bugs/740/000077500000000000000000000000001457312750000205575ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/740/swagger.yml000066400000000000000000000023241457312750000227420ustar00rootroot00000000000000swagger: "2.0" info: title: allOf description: allOf bug example version: 0.0.1 schemes: - http consumes: - application/json produces: - application/json definitions: Lol: type: object required: - xxx - yyy - zzz properties: xxx: type: string yyy: type: integer zzz: type: boolean Foo: type: object properties: fauna: $ref: "#/definitions/Lol" flora: $ref: "#/definitions/Lol" fungi: $ref: "#/definitions/Lol" Bar: type: object allOf: - $ref: "#/definitions/Foo" Baz: type: object properties: squirrel: type: string owl: type: string fox: type: string Awol: type: object allOf: - $ref: "#/definitions/Bar" - $ref: "#/definitions/Baz" paths: /awol: put: operationId: setAwol summary: Set Awol parameters: - name: awol in: body required: true description: Awol schema: $ref: "#/definitions/Awol" responses: 201: description: Awol set schema: $ref: "#/definitions/Awol" validate-0.24.0/fixtures/go-swagger/bugs/743/000077500000000000000000000000001457312750000205625ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/743/swagger.yml000066400000000000000000000014431457312750000227460ustar00rootroot00000000000000swagger: "2.0" info: title: Discriminator description: Discriminator bug example version: 0.0.1 schemes: - http consumes: - application/json produces: - application/json definitions: Id: type: object discriminator: type required: - type - id properties: type: type: string id: type: integer Foo: type: object allOf: - $ref: "#/definitions/Id" Bar: type: object properties: bar: type: string Awol: type: object allOf: - $ref: "#/definitions/Foo" - $ref: "#/definitions/Bar" paths: /awol: get: operationId: awol summary: get awol responses: 200: description: awol schema: $ref: "#/definitions/Awol" validate-0.24.0/fixtures/go-swagger/bugs/763/000077500000000000000000000000001457312750000205645ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/763/swagger.yml000066400000000000000000000010431457312750000227440ustar00rootroot00000000000000swagger: '2.0' info: title: Test description: Test Service version: '1.0.0' host: localhost basePath: / produces: - application/json schemes: - http paths: /myMethod: get: operationId: get_test summary: Get a list of int32s. responses: 200: schema: $ref: '#/definitions/test_list' definitions: test_list: type: object properties: the_array: type: array items: minimum: 0 maximum: 10 type: integer format: int32 validate-0.24.0/fixtures/go-swagger/bugs/774/000077500000000000000000000000001457312750000205665ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/774/swagger.yml000066400000000000000000000014171457312750000227530ustar00rootroot00000000000000--- swagger: '2.0' info: version: 0.0.0 title: Breaking API as described by christianklotz paths: /stores: get: operationId: getFoo responses: 200: schema: type: array items: $ref: '#/definitions/Foo' definitions: Foo: type: object properties: hasOmitEmptyTrue: type: array x-omitempty: true items: type: string enum: - some - values hasOmitEmptyFalse: type: array x-omitempty: false items: type: string enum: - some - values noOmitEmpty: type: array items: type: string enum: - some - values validate-0.24.0/fixtures/go-swagger/bugs/776/000077500000000000000000000000001457312750000205705ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/776/error.yaml000066400000000000000000000002231457312750000226020ustar00rootroot00000000000000definitions: Error: type: object properties: code: type: integer format: int32 message: type: string validate-0.24.0/fixtures/go-swagger/bugs/776/item.yaml000066400000000000000000000002501457312750000224070ustar00rootroot00000000000000type: object required: - title properties: id: type: integer format: uint64 readOnly: true title: type: string minLength: 2 maxLength: 80 validate-0.24.0/fixtures/go-swagger/bugs/776/param.yaml000066400000000000000000000010631457312750000225540ustar00rootroot00000000000000--- swagger: "2.0" info: title: Item API description: Item API version: "1.0.0" host: item.api.local basePath: /v1 securityDefinitions: key: type: apiKey name: x-item-token in: header security: - key: [] consumes: - application/json produces: - application/json schemes: - http paths: /item: get: operationId: GetItem parameters: - name: body in: body required: true schema: $ref: "item.yaml" responses: 204: description: item detail response validate-0.24.0/fixtures/go-swagger/bugs/776/spec.yaml000066400000000000000000000007411457312750000224100ustar00rootroot00000000000000--- swagger: "2.0" info: title: Item API description: Item API version: "1.0.0" host: item.api.local basePath: /v1 securityDefinitions: key: type: apiKey name: x-item-token in: header security: - key: [] consumes: - application/json produces: - application/json schemes: - http paths: /item: get: operationId: GetItem responses: 200: description: item detail response schema: $ref: "item.yaml" validate-0.24.0/fixtures/go-swagger/bugs/776/swagger-template.yml000066400000000000000000000006011457312750000245600ustar00rootroot00000000000000swagger: '2.0' info: title: Test version: '1.0.0' host: localhost basePath: / produces: - application/json schemes: - http paths: /healthy: get: operationId: getHealthy responses: default: description: Unexpected error schema: $ref: '#/definitions/Error' definitions: Error: $ref: ./error.yaml#/definitions/Error validate-0.24.0/fixtures/go-swagger/bugs/786/000077500000000000000000000000001457312750000205715ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/786/swagger.yml000066400000000000000000000011271457312750000227540ustar00rootroot00000000000000swagger: '2.0' info: title: Test API description: my test version: "0.1.0" host: test.test.com schemes: - https basePath: / produces: - application/json consumes: - application/json paths: /: get: summary: Find a thing description: It's acool thing tags: - Root responses: 307: description: Redirect to a thing. definitions: MyFirstObject: type: object properties: entree_choice: type: object additionalProperties: type: string enum: - Beef - Vegan validate-0.24.0/fixtures/go-swagger/bugs/789/000077500000000000000000000000001457312750000205745ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/789/swagger.yml000066400000000000000000000226111457312750000227600ustar00rootroot00000000000000swagger: '2.0' basePath: /v1 info: version: experimental title: Planet Mosaics API description: An API to interact with Mosaics generated on Planet's platform. consumes: - application/json produces: - application/json schemes: - https definitions: MosaicSeriesFilter: properties: filterType: type: string filterable: type: string enum: - mosaic_name default: mosaic_name value: type: string required: - filterType - filterable Error: properties: message: description: A descriptive error message. type: string type: object Errors: description: A list of Errors type: array items: $ref: '#/definitions/Error' APIError: description: An APIError communicates both general and field-specific errors. General errors include issues with core API usage as well as conflicts that involve more than one field. Field-specific errors correspond to an individual query parameter or request body attribute. Errors referencing nested fields will be dot-delimited (e.g. user.groups.0.name). properties: field: additionalProperties: $ref: '#/definitions/Errors' type: object general: $ref: '#/definitions/Errors' required: - general - field type: object WriteResponse: type: object required: - ok description: Response of requests to create a mosaic properties: ok: description: If it was successfully created. type: boolean errors: description: A list of validation errors which prevented the request from succeeding items: $ref: '#/definitions/APIError' type: array id: description: The id of the newly created mosaic type: string Mosaic: description: A Mosaic is an object that includes the core metadata for a mosaic that is published on the platform. A Mosaic object may have additional fields depending on its `product_type`. properties: _links: $ref: '#/definitions/MosaicLinks' id: description: A UUID to uniquely identify this Mosaic. format: uuid type: string renditions: description: A list of renditions to consume the Mosaic data. items: $ref: '#/definitions/MosaicRendition' type: array bbox: description: The bounding box representing the extent of the mosaic. format: geojson type: string coordinate_system: description: The coordinate system of this mosaic type: string first_acquired: description: The acquisition date of the oldest scene that contributed to this mosaic. type: string format: date-time last_acquired: description: The acquisition date of the newest scene that contributed to this mosaic. type: string format: date-time interval: description: The interval of the mosaic type: string product_type: description: The product type of this mosaics, currently supported is "timelapse", "basemap" type: string name: description: A name for this mosaic. This does not need to be unique. type: string type: object required: - id - renditions - bbox - coordinate_system - first_acquired - last_acquired - product_type - name MosaicSeries: description: A Mosaic Series is a container to group mosaics that follow that have a specific criteria. This can be likened to a filter on top of mosaics, where a series can be defined as a TOI/AOI on a set Timelapse Mosaics. type: object properties: _links: $ref: '#/definitions/MosaicSeriesLinks' id: description: A UUID to uniquely identify this Mosaic Series. format: uuid type: string name: description: A human readable name for this series type: string interval: description: The interval for the mosaics in the series. type: string product_type: description: The type of product this mosaic is enum: - basemap timelapse l3m type: string selection_filters: type: array description: An array of MosaicSeriesFilters to filter mosaics items: $ref: '#/definitions/MosaicSeriesFilter' required: - id - _links - product_type - name MosaicRendition: type: object properties: name: description: The name of this rendition, e.g. RGB type: string type: description: The type of this rendition, e.g. planet::webtiles::xyz, planet::webtiles::wmts type: string location: description: A URL (possibly a template) pointing to a resource that provides access to the rendition. type: string MosaicListLinks: properties: _self: description: The link back to this list page type: string type: object MosaicSeriesListLinks: properties: _self: description: The link to this listing page type: string type: object MosaicLinks: properties: _self: description: The canonical link to this specific Mosaic type: string type: object MosaicSeriesLinks: properties: _self: description: The canonincal link to this specific Mosaic Series type: string mosaics: description: The canonincal link to the mosaics inside this Mosaic Series type: string type: object MosaicSeriesMosaicsLinks: properties: _self: description: The canonical link back to this list type: string type: object MosaicListPage: properties: _links: $ref: '#/definitions/MosaicListLinks' mosaics: items: $ref: '#/definitions/Mosaic' type: array type: object MosaicSeriesListPage: properties: _links: $ref: '#/definitions/MosaicSeriesListLinks' series: items: $ref: '#/definitions/MosaicSeries' type: array type: object MosaicSeriesMosaicsListPage: properties: _links: $ref: '#/definitions/MosaicSeriesMosaicsLinks' mosaics: items: $ref: '#/definitions/Mosaic' type: array type: object parameters: pSeriesId: description: The Mosaic Series ID in: path name: SeriesId format: uuid required: true type: string paths: /mosaic/experimental/mosaics: post: description: Creates a new mosaic parameters: - name: body in: body description: mosaic to add required: true schema: $ref: '#/definitions/Mosaic' responses: 200: description: Mosaic was successfully created schema: $ref: '#/definitions/WriteResponse' 400: description: There was a validation error schema: $ref: '#/definitions/APIError' put: description: updates a mosaic responses: 200: description: Mosaic was successfully updated schema: $ref: '#/definitions/WriteResponse' 400: description: There was a validation error schema: $ref: '#/definitions/APIError' get: description: Returns all accessible mosaics. For non authenticated users, this returns public mosaics. responses: 200: description: A list of mosaics. schema: $ref: '#/definitions/MosaicListPage' 400: description: There was an error with the request. schema: $ref: '#/definitions/APIError' /mosaic/experimental/series: post: description: Creates a Series responses: 200: description: The series was created. schema: $ref: '#/definitions/WriteResponse' 400: description: There was an error with the request schema: $ref: '#/definitions/APIError' get: description: Returns a list of accessible mosaic series responses: 200: description: A list of Mosaic Series schema: $ref: '#/definitions/MosaicSeriesListPage' 400: description: There was an error with the request. schema: $ref: '#/definitions/APIError' /mosaic/experimental/series/{SeriesId}: get: description: Returns back a single Mosaic Series Record parameters: - $ref: '#/parameters/pSeriesId' responses: 200: description: Gets a single Mosaic Series record. schema: $ref: '#/definitions/MosaicSeries' 400: description: There was an error with the request. schema: $ref: '#/definitions/APIError' /mosaic/experimental/series/{SeriesId}/mosaics: get: description: Returns the list of mosaics in this series. parameters: - $ref: '#/parameters/pSeriesId' responses: 200: description: Returns the list of mosaics in this series. schema: $ref: '#/definitions/MosaicSeriesMosaicsListPage' 400: description: There was an error with the request. schema: $ref: '#/definitions/APIError' validate-0.24.0/fixtures/go-swagger/bugs/809/000077500000000000000000000000001457312750000205655ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/809/swagger.yml000066400000000000000000000011361457312750000227500ustar00rootroot00000000000000swagger: '2.0' info: version: "1.0.0" title: Private to-do list description: | A very simple api description that makes a json only API to submit to do's. produces: - application/json consumes: - application/json paths: /foo: get: parameters: - name: "groups[]" in: query type: array collectionFormat: multi items: type: string definitions: genericResource: description: generic resource properties: meta: type: string required: - meta additionalProperties: type: object validate-0.24.0/fixtures/go-swagger/bugs/811/000077500000000000000000000000001457312750000205565ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/811/swagger.json000066400000000000000000024344461457312750000231310ustar00rootroot00000000000000{ "swagger": "2.0", "schemes": [ "https" ], "host": "api.github.com", "basePath": "/", "x-hasEquivalentPaths": true, "info": { "description": "Powerful collaboration, code review, and code management for open source and private projects.\n", "termsOfService": "https://help.github.com/articles/github-terms-of-service/#b-api-terms", "title": "GitHub", "version": "v3", "x-logo": { "url": "https://api.apis.guru/v2/cache/logo/http_assets-cdn.github.com_images_modules_logos_page_GitHub-Mark.png" }, "x-origin": { "format": "swagger", "url": "https://raw.githubusercontent.com/APIs-guru/unofficial_openapi_specs/master/github.com/v3/swagger.yaml", "version": "2.0" }, "x-preferred": true, "x-providerName": "github.com", "x-unofficialSpec": true }, "externalDocs": { "url": "https://developer.github.com/v3/" }, "consumes": [ "application/json" ], "produces": [ "application/json" ], "securityDefinitions": { "oauth_2_0": { "authorizationUrl": "https://github.com/login/oauth/authorize", "description": "OAuth2 is a protocol that lets external apps request authorization to private\ndetails in a user's GitHub account without getting their password. This is\npreferred over Basic Authentication because tokens can be limited to specific\ntypes of data, and can be revoked by users at any time.\n", "flow": "accessCode", "scopes": { "admin:org": "", "admin:org_hook": "", "admin:public_key": "", "admin:repo_hook": "", "delete_repo": "", "gist": "", "notifications": "", "public_repo": "", "read:org": "", "read:public_key": "", "read:repo_hook": "", "repo": "", "repo:status": "", "repo_deployment": "", "user": "", "user:email": "", "user:follow": "", "write:org": "", "write:public_key": "", "write:repo_hook": "" }, "tokenUrl": "https://github.com/login/oauth/access_token", "type": "oauth2" } }, "paths": { "/emojis": { "get": { "description": "Lists all the emojis available to use on GitHub.", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/emojis" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/events": { "get": { "description": "List public events.", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/events" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/feeds": { "get": { "description": "List Feeds.\nGitHub provides several timeline resources in Atom format. The Feeds API\n lists all the feeds available to the authenticating user.\n", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/feeds" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/gists": { "get": { "description": "List the authenticated user's gists or if called anonymously, this will\nreturn all public gists.\n", "parameters": [ { "description": "Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ.\nOnly gists updated at or after this time are returned.\n", "in": "query", "name": "since", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/gists" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a gist.", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/postGist" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/gist" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/gists/public": { "get": { "description": "List all public gists.", "parameters": [ { "description": "Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ.\nOnly gists updated at or after this time are returned.\n", "in": "query", "name": "since", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/gists" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/gists/starred": { "get": { "description": "List the authenticated user's starred gists.", "parameters": [ { "description": "Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ.\nOnly gists updated at or after this time are returned.\n", "in": "query", "name": "since", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/gists" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/gists/{id}": { "delete": { "description": "Delete a gist.", "parameters": [ { "description": "Id of gist.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get a single gist.", "parameters": [ { "description": "Id of gist.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/gist" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Edit a gist.", "parameters": [ { "description": "Id of gist.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/patchGist" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/gist" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/gists/{id}/comments": { "get": { "description": "List comments on a gist.", "parameters": [ { "description": "Id of gist.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/comments" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a commen", "parameters": [ { "description": "Id of gist.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/commentBody" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/comment" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/gists/{id}/comments/{commentId}": { "delete": { "description": "Delete a comment.", "parameters": [ { "description": "Id of gist.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "Id of comment.", "in": "path", "name": "commentId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get a single comment.", "parameters": [ { "description": "Id of gist.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "Id of comment.", "in": "path", "name": "commentId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/comment" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Edit a comment.", "parameters": [ { "description": "Id of gist.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "Id of comment.", "in": "path", "name": "commentId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/comment" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/comment" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/gists/{id}/forks": { "post": { "description": "Fork a gist.", "parameters": [ { "description": "Id of gist.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Exists." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "404": { "description": "Not exists." } } } }, "/gists/{id}/star": { "delete": { "description": "Unstar a gist.", "parameters": [ { "description": "Id of gist.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Item removed." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Check if a gist is starred.", "parameters": [ { "description": "Id of gist.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Exists." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "404": { "description": "Not exists." } } }, "put": { "description": "Star a gist.", "parameters": [ { "description": "Id of gist.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Starred." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/gitignore/templates": { "get": { "description": "Listing available templates.\nList all templates available to pass as an option when creating a repository.\n", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/gitignore" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/gitignore/templates/{language}": { "get": { "description": "Get a single template.", "parameters": [ { "in": "path", "name": "language", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/gitignore-lang" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/issues": { "get": { "description": "List issues.\nList all issues across all the authenticated user's visible repositories.\n", "parameters": [ { "default": "all", "description": "Issues assigned to you / created by you / mentioning you / you're\nsubscribed to updates for / All issues the authenticated user can see\n", "enum": [ "assigned", "created", "mentioned", "subscribed", "all" ], "in": "query", "name": "filter", "required": true, "type": "string" }, { "default": "open", "enum": [ "open", "closed" ], "in": "query", "name": "state", "required": true, "type": "string" }, { "description": "String list of comma separated Label names. Example - bug,ui,@high.", "in": "query", "name": "labels", "required": true, "type": "string" }, { "default": "created", "enum": [ "created", "updated", "comments" ], "in": "query", "name": "sort", "required": true, "type": "string" }, { "default": "desc", "enum": [ "asc", "desc" ], "in": "query", "name": "direction", "required": true, "type": "string" }, { "description": "Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.\nOnly issues updated at or after this time are returned.\n", "in": "query", "name": "since", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/issues" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/legacy/issues/search/{owner}/{repository}/{state}/{keyword}": { "get": { "description": "Find issues by state and keyword.", "parameters": [ { "description": "The search term.", "in": "path", "name": "keyword", "required": true, "type": "string" }, { "description": "Indicates the state of the issues to return. Can be either open or closed.", "enum": [ "open", "closed" ], "in": "path", "name": "state", "required": true, "type": "string" }, { "in": "path", "name": "owner", "required": true, "type": "string" }, { "in": "path", "name": "repository", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/search-issues-by-keyword" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/legacy/repos/search/{keyword}": { "get": { "description": "Find repositories by keyword. Note, this legacy method does not follow the v3 pagination pattern. This method returns up to 100 results per page and pages can be fetched using the start_page parameter.", "parameters": [ { "description": "The search term", "in": "path", "name": "keyword", "required": true, "type": "string" }, { "default": "desc", "description": "The sort field. if sort param is provided. Can be either asc or desc.", "enum": [ "desc", "asc" ], "in": "query", "name": "order", "type": "string" }, { "description": "Filter results by language", "in": "query", "name": "language", "type": "string" }, { "description": "The page number to fetch", "in": "query", "name": "start_page", "type": "string" }, { "description": "The sort field. One of stars, forks, or updated. Default: results are sorted by best match.", "enum": [ "updated", "stars", "forks" ], "in": "query", "name": "sort", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/search-repositories-by-keyword" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/legacy/user/email/{email}": { "get": { "description": "This API call is added for compatibility reasons only.", "parameters": [ { "description": "The email address", "in": "path", "name": "email", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/search-user-by-email" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/legacy/user/search/{keyword}": { "get": { "description": "Find users by keyword.", "parameters": [ { "description": "The search term", "in": "path", "name": "keyword", "required": true, "type": "string" }, { "default": "desc", "description": "The sort field. if sort param is provided. Can be either asc or desc.", "enum": [ "desc", "asc" ], "in": "query", "name": "order", "type": "string" }, { "description": "The page number to fetch", "in": "query", "name": "start_page", "type": "string" }, { "description": "The sort field. One of stars, forks, or updated. Default: results are sorted by best match.", "enum": [ "updated", "stars", "forks" ], "in": "query", "name": "sort", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/search-users-by-keyword" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/markdown": { "post": { "description": "Render an arbitrary Markdown document", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/markdown" } } ], "produces": [ "text/html" ], "responses": { "200": { "description": "OK" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/markdown/raw": { "post": { "consumes": [ "text/plain" ], "description": "Render a Markdown document in raw mode", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "produces": [ "text/html" ], "responses": { "200": { "description": "OK" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/meta": { "get": { "description": "This gives some information about GitHub.com, the service.", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/meta" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/networks/{owner}/{repo}/events": { "get": { "description": "List public events for a network of repositories.", "parameters": [ { "description": "Name of the owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/events" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/notifications": { "get": { "description": "List your notifications.\nList all notifications for the current user, grouped by repository.\n", "parameters": [ { "description": "True to show notifications marked as read.", "in": "query", "name": "all", "type": "boolean" }, { "description": "True to show only notifications in which the user is directly participating\nor mentioned.\n", "in": "query", "name": "participating", "type": "boolean" }, { "description": "The time should be passed in as UTC in the ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.\nExample: \"2012-10-09T23:39:01Z\".\n", "in": "query", "name": "since", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/notifications" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "put": { "description": "Mark as read.\nMarking a notification as \"read\" removes it from the default view on GitHub.com.\n", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/notificationMarkRead" } } ], "responses": { "205": { "description": "Marked as read." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/notifications/threads/{id}": { "get": { "description": "View a single thread.", "parameters": [ { "description": "Id of thread.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/notifications" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Mark a thread as read", "parameters": [ { "description": "Id of thread.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "205": { "description": "Thread marked as read." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/notifications/threads/{id}/subscription": { "delete": { "description": "Delete a Thread Subscription.", "parameters": [ { "description": "Id of thread.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No Content\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get a Thread Subscription.", "parameters": [ { "description": "Id of thread.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/subscription" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "put": { "description": "Set a Thread Subscription.\nThis lets you subscribe to a thread, or ignore it. Subscribing to a thread\nis unnecessary if the user is already subscribed to the repository. Ignoring\na thread will mute all future notifications (until you comment or get @mentioned).\n", "parameters": [ { "description": "Id of thread.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/putSubscription" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/subscription" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/orgs/{org}": { "get": { "description": "Get an Organization.", "parameters": [ { "description": "Name of organisation.", "in": "path", "name": "org", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/organization" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Edit an Organization.", "parameters": [ { "description": "Name of organisation.", "in": "path", "name": "org", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/patchOrg" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/organization" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/orgs/{org}/events": { "get": { "description": "List public events for an organization.", "parameters": [ { "description": "Name of organisation.", "in": "path", "name": "org", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/events" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/orgs/{org}/issues": { "get": { "description": "List issues.\nList all issues for a given organization for the authenticated user.\n", "parameters": [ { "description": "Name of organisation.", "in": "path", "name": "org", "required": true, "type": "string" }, { "default": "all", "description": "Issues assigned to you / created by you / mentioning you / you're\nsubscribed to updates for / All issues the authenticated user can see\n", "enum": [ "assigned", "created", "mentioned", "subscribed", "all" ], "in": "query", "name": "filter", "required": true, "type": "string" }, { "default": "open", "enum": [ "open", "closed" ], "in": "query", "name": "state", "required": true, "type": "string" }, { "description": "String list of comma separated Label names. Example - bug,ui,@high.", "in": "query", "name": "labels", "required": true, "type": "string" }, { "default": "created", "enum": [ "created", "updated", "comments" ], "in": "query", "name": "sort", "required": true, "type": "string" }, { "default": "desc", "enum": [ "asc", "desc" ], "in": "query", "name": "direction", "required": true, "type": "string" }, { "description": "Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.\nOnly issues updated at or after this time are returned.\n", "in": "query", "name": "since", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/issues" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/orgs/{org}/members": { "get": { "description": "Members list.\nList all users who are members of an organization. A member is a user tha\nbelongs to at least 1 team in the organization. If the authenticated user\nis also an owner of this organization then both concealed and public members\nwill be returned. If the requester is not an owner of the organization the\nquery will be redirected to the public members list.\n", "parameters": [ { "description": "Name of organisation.", "in": "path", "name": "org", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users" } }, "302": { "description": "Response if requester is not an organization member." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/orgs/{org}/members/{username}": { "delete": { "description": "Remove a member.\nRemoving a user from this list will remove them from all teams and they\nwill no longer have any access to the organization's repositories.\n", "parameters": [ { "description": "Name of organisation.", "in": "path", "name": "org", "required": true, "type": "string" }, { "description": "Name of the user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Check if a user is, publicly or privately, a member of the organization.", "parameters": [ { "description": "Name of organisation.", "in": "path", "name": "org", "required": true, "type": "string" }, { "description": "Name of the user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content. Response if requester is an organization member and user is a member\n" }, "302": { "description": "Found. Response if requester is not an organization member\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "404": { "description": "Not Found.\na. Response if requester is an organization member and user is not a member\nb. Response if requester is not an organization member and is inquiring about themselves\n" } } } }, "/orgs/{org}/public_members": { "get": { "description": "Public members list.\nMembers of an organization can choose to have their membership publicized\nor not.\n", "parameters": [ { "description": "Name of organisation.", "in": "path", "name": "org", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/orgs/{org}/public_members/{username}": { "delete": { "description": "Conceal a user's membership.", "parameters": [ { "description": "Name of organisation.", "in": "path", "name": "org", "required": true, "type": "string" }, { "description": "Name of the user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Concealed." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Check public membership.", "parameters": [ { "description": "Name of organisation.", "in": "path", "name": "org", "required": true, "type": "string" }, { "description": "Name of the user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "User is a public member." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "404": { "description": "User is not a public member." } } }, "put": { "description": "Publicize a user's membership.", "parameters": [ { "description": "Name of organisation.", "in": "path", "name": "org", "required": true, "type": "string" }, { "description": "Name of the user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Publicized." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/orgs/{org}/repos": { "get": { "description": "List repositories for the specified org.", "parameters": [ { "description": "Name of organisation.", "in": "path", "name": "org", "required": true, "type": "string" }, { "default": "all", "enum": [ "all", "public", "private", "forks", "sources", "member" ], "in": "query", "name": "type", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/repos" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a new repository for the authenticated user. OAuth users must supply\nrepo scope.\n", "parameters": [ { "description": "Name of organisation.", "in": "path", "name": "org", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/postRepo" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/repos" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/orgs/{org}/teams": { "get": { "description": "List teams.", "parameters": [ { "description": "Name of organisation.", "in": "path", "name": "org", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/teams" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create team.\nIn order to create a team, the authenticated user must be an owner of organization.\n", "parameters": [ { "description": "Name of organisation.", "in": "path", "name": "org", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/orgTeamsPost" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/team" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/rate_limit": { "get": { "description": "Get your current rate limit status\nNote: Accessing this endpoint does not count against your rate limit.\n", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/rate_limit" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}": { "delete": { "description": "Delete a Repository.\nDeleting a repository requires admin access. If OAuth is used, the delete_repo\nscope is required.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Item removed." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get repository.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/repo" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Edit repository.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/repoEdit" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/repo" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/assignees": { "get": { "description": "List assignees.\nThis call lists all the available assignees (owner + collaborators) to which\nissues may be assigned.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/assignees" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/assignees/{assignee}": { "get": { "description": "Check assignee.\nYou may also check to see if a particular user is an assignee for a repository.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Login of the assignee.", "in": "path", "name": "assignee", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "User is an assignee." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "404": { "description": "User isn't an assignee." } } } }, "/repos/{owner}/{repo}/branches": { "get": { "description": "Get list of branches", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/branches" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/branches/{branch}": { "get": { "description": "Get Branch", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Name of the branch.", "in": "path", "name": "branch", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/branch" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/collaborators": { "get": { "description": "List.\nWhen authenticating as an organization owner of an organization-owned\nrepository, all organization owners are included in the list of\ncollaborators. Otherwise, only users with access to the repository are\nreturned in the collaborators list.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/collaborators/{user}": { "delete": { "description": "Remove collaborator.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Login of the user.", "in": "path", "name": "user", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Collaborator removed." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Check if user is a collaborator", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Login of the user.", "in": "path", "name": "user", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "User is a collaborator." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "404": { "description": "User is not a collaborator." } } }, "put": { "description": "Add collaborator.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Login of the user.", "in": "path", "name": "user", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Collaborator added." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/comments": { "get": { "description": "List commit comments for a repository.\nComments are ordered by ascending ID.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/repoComments" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/comments/{commentId}": { "delete": { "description": "Delete a commit comment", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of comment.", "in": "path", "name": "commentId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get a single commit comment.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of comment.", "in": "path", "name": "commentId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/commitComments" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Update a commit comment.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of comment.", "in": "path", "name": "commentId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/commentBody" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/commitComments" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/commits": { "get": { "description": "List commits on a repository.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "The time should be passed in as UTC in the ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.\nExample: \"2012-10-09T23:39:01Z\".\n", "in": "query", "name": "since", "type": "string" }, { "description": "Sha or branch to start listing commits from.", "in": "query", "name": "sha", "type": "string" }, { "description": "Only commits containing this file path will be returned.", "in": "query", "name": "path", "type": "string" }, { "description": "GitHub login, name, or email by which to filter by commit author.", "in": "query", "name": "author", "type": "string" }, { "description": "ISO 8601 Date - Only commits before this date will be returned.", "in": "query", "name": "until", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/commits" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/commits/{ref}/status": { "get": { "description": "Get the combined Status for a specific Ref\nThe Combined status endpoint is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the blog post for full details.\nTo access this endpoint during the preview period, you must provide a custom media type in the Accept header:\napplication/vnd.github.she-hulk-preview+json\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "ref", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/refStatus" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/commits/{shaCode}": { "get": { "description": "Get a single commit.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "SHA-1 code of the commit.", "in": "path", "name": "shaCode", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/commit" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/commits/{shaCode}/comments": { "get": { "description": "List comments for a single commitList comments for a single commit.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "SHA-1 code of the commit.", "in": "path", "name": "shaCode", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/repoComments" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a commit comment.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "SHA-1 code of the commit.", "in": "path", "name": "shaCode", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/commitBody" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/commitComments" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/compare/{baseId}...{headId}": { "get": { "description": "Compare two commits", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "baseId", "required": true, "type": "string" }, { "in": "path", "name": "headId", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/compare-commits" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/contents/{path}": { "delete": { "description": "Delete a file.\nThis method deletes a file in a repository.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "path", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/deleteFileBody" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/deleteFile" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get contents.\nThis method returns the contents of a file or directory in a repository.\nFiles and symlinks support a custom media type for getting the raw content.\nDirectories and submodules do not support custom media types.\nNote: This API supports files up to 1 megabyte in size.\nHere can be many outcomes. For details see \"http://developer.github.com/v3/repos/contents/\"\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "path", "required": true, "type": "string" }, { "description": "The content path.", "in": "query", "name": "path", "type": "string" }, { "description": "The String name of the Commit/Branch/Tag. Defaults to 'master'.", "in": "query", "name": "ref", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/contents-path" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "put": { "description": "Create a file.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "path", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/createFileBody" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/createFile" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/contributors": { "get": { "description": "Get list of contributors.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Set to 1 or true to include anonymous contributors in results.", "in": "query", "name": "anon", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/contributors" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/deployments": { "get": { "description": "Users with pull access can view deployments for a repository", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/repo-deployments" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Users with push access can create a deployment for a given ref", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/deployment" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/deployment-resp" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/deployments/{id}/statuses": { "get": { "description": "Users with pull access can view deployment statuses for a deployment", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "The Deployment ID to list the statuses from.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/deployment-statuses" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a Deployment Status\nUsers with push access can create deployment statuses for a given deployment:\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "The Deployment ID to list the statuses from.", "in": "path", "name": "id", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/deployment-statuses-create" } } ], "responses": { "201": { "description": "ok" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/downloads": { "get": { "description": "Deprecated. List downloads for a repository.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/downloads" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/downloads/{downloadId}": { "delete": { "description": "Deprecated. Delete a download.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of download.", "in": "path", "name": "downloadId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Deprecated. Get a single download.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of download.", "in": "path", "name": "downloadId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/downloads" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/events": { "get": { "description": "Get list of repository events.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/events" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/forks": { "get": { "description": "List forks.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "default": "newes", "enum": [ "newes", "oldes", "watchers" ], "in": "query", "name": "sort", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/forks" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a fork.\nForking a Repository happens asynchronously. Therefore, you may have to wai\na short period before accessing the git objects. If this takes longer than 5\nminutes, be sure to contact Support.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/forkBody" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/fork" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/git/blobs": { "post": { "description": "Create a Blob.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/blob" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/blobs" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/git/blobs/{shaCode}": { "get": { "description": "Get a Blob.\nSince blobs can be any arbitrary binary data, the input and responses for\nthe blob API takes an encoding parameter that can be either utf-8 or\nbase64. If your data cannot be losslessly sent as a UTF-8 string, you can\nbase64 encode it.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "SHA-1 code.", "in": "path", "name": "shaCode", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/blob" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/git/commits": { "post": { "description": "Create a Commit.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/repoCommitBody" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/gitCommit" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/git/commits/{shaCode}": { "get": { "description": "Get a Commit.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "SHA-1 code.", "in": "path", "name": "shaCode", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/repoCommit" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/git/refs": { "get": { "description": "Get all References", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/refs" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a Reference", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/refsBody" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/headBranch" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/git/refs/{ref}": { "delete": { "description": "Delete a Reference\nExample: Deleting a branch: DELETE /repos/octocat/Hello-World/git/refs/heads/feature-a \nExample: Deleting a tag: DELETE /repos/octocat/Hello-World/git/refs/tags/v1.0\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "ref", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No Content" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get a Reference", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "ref", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/headBranch" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Update a Reference", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "ref", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/gitRefPatch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/headBranch" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/git/tags": { "post": { "description": "Create a Tag Object.\nNote that creating a tag object does not create the reference that makes a\ntag in Git. If you want to create an annotated tag in Git, you have to do\nthis call to create the tag object, and then create the refs/tags/[tag]\nreference. If you want to create a lightweight tag, you only have to create\nthe tag reference - this call would be unnecessary.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/tag" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/tags" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/git/tags/{shaCode}": { "get": { "description": "Get a Tag.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "shaCode", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/tag" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/git/trees": { "post": { "description": "Create a Tree.\nThe tree creation API will take nested entries as well. If both a tree and\na nested path modifying that tree are specified, it will overwrite the\ncontents of that tree with the new path contents and write a new tree out.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/tree" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/trees" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/git/trees/{shaCode}": { "get": { "description": "Get a Tree.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Tree SHA.", "in": "path", "name": "shaCode", "required": true, "type": "string" }, { "description": "Get a Tree Recursively. (0 or 1)", "in": "query", "name": "recursive", "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/tree" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/hooks": { "get": { "description": "Get list of hooks.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/hook" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a hook.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/hookBody" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/hook" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/hooks/{hookId}": { "delete": { "description": "Delete a hook.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of hook.", "in": "path", "name": "hookId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get single hook.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of hook.", "in": "path", "name": "hookId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/hook" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Edit a hook.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of hook.", "in": "path", "name": "hookId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/hookBody" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/hook" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/hooks/{hookId}/tests": { "post": { "description": "Test a push hook.\nThis will trigger the hook with the latest push to the current repository\nif the hook is subscribed to push events. If the hook is not subscribed\nto push events, the server will respond with 204 but no test POST will\nbe generated.\nNote: Previously /repos/:owner/:repo/hooks/:id/tes\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of hook.", "in": "path", "name": "hookId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Hook is triggered." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/issues": { "get": { "description": "List issues for a repository.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "default": "all", "description": "Issues assigned to you / created by you / mentioning you / you're\nsubscribed to updates for / All issues the authenticated user can see\n", "enum": [ "assigned", "created", "mentioned", "subscribed", "all" ], "in": "query", "name": "filter", "required": true, "type": "string" }, { "default": "open", "enum": [ "open", "closed" ], "in": "query", "name": "state", "required": true, "type": "string" }, { "description": "String list of comma separated Label names. Example - bug,ui,@high.", "in": "query", "name": "labels", "required": true, "type": "string" }, { "default": "created", "enum": [ "created", "updated", "comments" ], "in": "query", "name": "sort", "required": true, "type": "string" }, { "default": "desc", "enum": [ "asc", "desc" ], "in": "query", "name": "direction", "required": true, "type": "string" }, { "description": "Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.\nOnly issues updated at or after this time are returned.\n", "in": "query", "name": "since", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/issues" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create an issue.\nAny user with pull access to a repository can create an issue.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/issue" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/issue" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/issues/comments": { "get": { "description": "List comments in a repository.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Ignored without 'sort' parameter.", "in": "query", "name": "direction", "type": "string" }, { "description": "", "enum": [ "created", "updated" ], "in": "query", "name": "sort", "type": "string" }, { "description": "The time should be passed in as UTC in the ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.\nExample: \"2012-10-09T23:39:01Z\".\n", "in": "query", "name": "since", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/issuesComments" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/issues/comments/{commentId}": { "delete": { "description": "Delete a comment.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "ID of comment.", "in": "path", "name": "commentId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get a single comment.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "ID of comment.", "in": "path", "name": "commentId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/issuesComment" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Edit a comment.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "ID of comment.", "in": "path", "name": "commentId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/commentBody" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/issuesComment" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/issues/events": { "get": { "description": "List issue events for a repository.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/events" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/issues/events/{eventId}": { "get": { "description": "Get a single event.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of the event.", "in": "path", "name": "eventId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/event" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/issues/{number}": { "get": { "description": "Get a single issue", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Number of issue.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/issue" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Edit an issue.\nIssue owners and users with push access can edit an issue.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Number of issue.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/issue" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/issue" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/issues/{number}/comments": { "get": { "description": "List comments on an issue.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Number of issue.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/issuesComments" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a comment.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Number of issue.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/commentBody" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/issuesComment" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/issues/{number}/events": { "get": { "description": "List events for an issue.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Number of issue.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/events" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/issues/{number}/labels": { "delete": { "description": "Remove all labels from an issue.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Number of issue.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "List labels on an issue.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Number of issue.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/labels" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Add labels to an issue.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Number of issue.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/emailsPost" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/label" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "put": { "description": "Replace all labels for an issue.\nSending an empty array ([]) will remove all Labels from the Issue.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Number of issue.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/emailsPost" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/label" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/issues/{number}/labels/{name}": { "delete": { "description": "Remove a label from an issue.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Number of issue.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "Name of the label.", "in": "path", "name": "name", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Item removed." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/keys": { "get": { "description": "Get list of keys.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/keys" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a key.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/user-keys-post" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/user-keys-keyId" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/keys/{keyId}": { "delete": { "description": "Delete a key.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of key.", "in": "path", "name": "keyId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get a key", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of key.", "in": "path", "name": "keyId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/user-keys-keyId" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/labels": { "get": { "description": "List all labels for this repository.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/labels" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a label.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/emailsPost" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/label" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/labels/{name}": { "delete": { "description": "Delete a label.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Name of the label.", "in": "path", "name": "name", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get a single label.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Name of the label.", "in": "path", "name": "name", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/label" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Update a label.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Name of the label.", "in": "path", "name": "name", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/emailsPost" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/label" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/languages": { "get": { "description": "List languages.\nList languages for the specified repository. The value on the right of a\nlanguage is the number of bytes of code written in that language.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/languages" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/merges": { "post": { "description": "Perform a merge.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/mergesBody" } } ], "responses": { "201": { "description": "Successful Response (The resulting merge commit)", "schema": { "$ref": "#/definitions/mergesSuccessful" } }, "204": { "description": "No-op response (base already contains the head, nothing to merge)" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "404": { "description": "Missing base response or missing head response", "schema": { "$ref": "#/definitions/mergesConflict" } }, "409": { "description": "Merge conflict response.", "schema": { "$ref": "#/definitions/mergesConflict" } } } } }, "/repos/{owner}/{repo}/milestones": { "get": { "description": "List milestones for a repository.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "default": "open", "description": "String to filter by state.", "enum": [ "open", "closed" ], "in": "query", "name": "state", "type": "string" }, { "description": "Ignored without 'sort' parameter.", "in": "query", "name": "direction", "type": "string" }, { "default": "due_date", "description": "", "enum": [ "due_date", "completeness" ], "in": "query", "name": "sort", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/milestone" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a milestone.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/milestoneUpdate" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/milestone" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/milestones/{number}": { "delete": { "description": "Delete a milestone.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Number of milestone.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get a single milestone.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Number of milestone.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/milestone" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Update a milestone.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Number of milestone.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/milestoneUpdate" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/milestone" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/milestones/{number}/labels": { "get": { "description": "Get labels for every issue in a milestone.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Number of milestone.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/labels" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/notifications": { "get": { "description": "List your notifications in a repository\nList all notifications for the current user.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "True to show notifications marked as read.", "in": "query", "name": "all", "type": "boolean" }, { "description": "True to show only notifications in which the user is directly participating\nor mentioned.\n", "in": "query", "name": "participating", "type": "boolean" }, { "description": "The time should be passed in as UTC in the ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.\nExample: \"2012-10-09T23:39:01Z\".\n", "in": "query", "name": "since", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/notifications" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "put": { "description": "Mark notifications as read in a repository.\nMarking all notifications in a repository as \"read\" removes them from the\ndefault view on GitHub.com.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/notificationMarkRead" } } ], "responses": { "205": { "description": "Marked as read." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/pulls": { "get": { "description": "List pull requests.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "default": "open", "description": "String to filter by state.", "enum": [ "open", "closed" ], "in": "query", "name": "state", "type": "string" }, { "description": "Filter pulls by head user and branch name in the format of 'user:ref-name'.\nExample: github:new-script-format.\n", "in": "query", "name": "head", "type": "string" }, { "description": "Filter pulls by base branch name. Example - gh-pages.", "in": "query", "name": "base", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/pulls" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a pull request.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/pullsPost" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/pulls" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/pulls/comments": { "get": { "description": "List comments in a repository.\nBy default, Review Comments are ordered by ascending ID.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Ignored without 'sort' parameter.", "in": "query", "name": "direction", "type": "string" }, { "description": "", "enum": [ "created", "updated" ], "in": "query", "name": "sort", "type": "string" }, { "description": "The time should be passed in as UTC in the ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.\nExample: \"2012-10-09T23:39:01Z\".\n", "in": "query", "name": "since", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/issuesComments" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/pulls/comments/{commentId}": { "delete": { "description": "Delete a comment.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of comment.", "in": "path", "name": "commentId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get a single comment.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of comment.", "in": "path", "name": "commentId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/pullsComment" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Edit a comment.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of comment.", "in": "path", "name": "commentId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/commentBody" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/pullsComment" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/pulls/{number}": { "get": { "description": "Get a single pull request.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of pull.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/pullRequest" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Update a pull request.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of pull.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/pullUpdate" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/repo" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/pulls/{number}/comments": { "get": { "description": "List comments on a pull request.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of pull.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/pullsComment" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a comment.\n #TODO Alternative input ( http://developer.github.com/v3/pulls/comments/ )\n description: |\n Alternative Input.\n Instead of passing commit_id, path, and position you can reply to an\n existing Pull Request Comment like this:\n\n body\n Required string\n in_reply_to\n Required number - Comment id to reply to.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of pull.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/pullsCommentPost" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/pullsComment" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/pulls/{number}/commits": { "get": { "description": "List commits on a pull request.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of pull.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/commits" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/pulls/{number}/files": { "get": { "description": "List pull requests files.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of pull.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/pulls" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/pulls/{number}/merge": { "get": { "description": "Get if a pull request has been merged.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of pull.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Pull request has been merged." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "404": { "description": "Pull request has not been merged." } } }, "put": { "description": "Merge a pull request (Merge Button's)", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Id of pull.", "in": "path", "name": "number", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/mergePullBody" } } ], "responses": { "200": { "description": "Response if merge was successful.", "schema": { "$ref": "#/definitions/merge" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "405": { "description": "Response if merge cannot be performed.", "schema": { "$ref": "#/definitions/merge" } } } } }, "/repos/{owner}/{repo}/readme": { "get": { "description": "Get the README.\nThis method returns the preferred README for a repository.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "The String name of the Commit/Branch/Tag. Defaults to master.", "in": "query", "name": "ref", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/contents-path" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/releases": { "get": { "description": "Users with push access to the repository will receive all releases (i.e., published releases and draft releases). Users with pull access will receive published releases only", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/releases" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a release\nUsers with push access to the repository can create a release.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/release-create" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/release" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/releases/assets/{id}": { "delete": { "description": "Delete a release asset", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "id", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No Content" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get a single release asset", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "id", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/asset" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Edit a release asset\nUsers with push access to the repository can edit a release asset.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "id", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/assetPatch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/asset" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/releases/{id}": { "delete": { "description": "Users with push access to the repository can delete a release.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "id", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No Content" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get a single release", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "id", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/release" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Users with push access to the repository can edit a release", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "id", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/release-create" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/release" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/releases/{id}/assets": { "get": { "description": "List assets for a release", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "in": "path", "name": "id", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/assets" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/stargazers": { "get": { "description": "List Stargazers.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/stats/code_frequency": { "get": { "description": "Get the number of additions and deletions per week.\nReturns a weekly aggregate of the number of additions and deletions pushed\nto a repository.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/codeFrequencyStats" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/stats/commit_activity": { "get": { "description": "Get the last year of commit activity data.\nReturns the last year of commit activity grouped by week. The days array\nis a group of commits per day, starting on Sunday.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/commitActivityStats" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/stats/contributors": { "get": { "description": "Get contributors list with additions, deletions, and commit counts.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/contributorsStats" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/stats/participation": { "get": { "description": "Get the weekly commit count for the repo owner and everyone else.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/participationStats" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/stats/punch_card": { "get": { "description": "Get the number of commits per hour in each day.\nEach array contains the day number, hour number, and number of commits\n0-6 Sunday - Saturday\n0-23 Hour of day\nNumber of commits\n\nFor example, [2, 14, 25] indicates that there were 25 total commits, during\nthe 2.00pm hour on Tuesdays. All times are based on the time zone of\nindividual commits.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/codeFrequencyStats" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/statuses/{ref}": { "get": { "description": "List Statuses for a specific Ref.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Ref to list the statuses from. It can be a SHA, a branch name, or a tag name.\n", "in": "path", "name": "ref", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ref" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a Status.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "Ref to list the statuses from. It can be a SHA, a branch name, or a tag name.\n", "in": "path", "name": "ref", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/headBranch" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/ref" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/subscribers": { "get": { "description": "List watchers.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/subscription": { "delete": { "description": "Delete a Repository Subscription.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get a Repository Subscription.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/subscribition" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "put": { "description": "Set a Repository Subscription", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/subscribitionBody" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/subscribition" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/tags": { "get": { "description": "Get list of tags.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/tags" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/teams": { "get": { "description": "Get list of teams", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/teams" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/watchers": { "get": { "description": "List Stargazers. New implementation.", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repos/{owner}/{repo}/{archive_format}/{path}": { "get": { "description": "Get archive link.\nThis method will return a 302 to a URL to download a tarball or zipball\narchive for a repository. Please make sure your HTTP framework is\nconfigured to follow redirects or you will need to use the Location header\nto make a second GET request.\nNote: For private repositories, these links are temporary and expire quickly.\n", "parameters": [ { "description": "Name of repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "enum": [ "tarball", "zipball" ], "in": "path", "name": "archive_format", "required": true, "type": "string" }, { "description": "Valid Git reference, defaults to 'master'.", "in": "path", "name": "path", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "302": { "description": "Found." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/repositories": { "get": { "description": "List all public repositories.\nThis provides a dump of every public repository, in the order that they\nwere created.\nNote: Pagination is powered exclusively by the since parameter. is the\nLink header to get the URL for the next page of repositories.\n", "parameters": [ { "description": "The time should be passed in as UTC in the ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.\nExample: \"2012-10-09T23:39:01Z\".\n", "in": "query", "name": "since", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/repositories" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/search/code": { "get": { "description": "Search code.", "parameters": [ { "default": "desc", "description": "The sort field. if sort param is provided. Can be either asc or desc.", "enum": [ "desc", "asc" ], "in": "query", "name": "order", "type": "string" }, { "description": "The search terms. This can be any combination of the supported code\nsearch parameters:\n'Search In' Qualifies which fields are searched. With this qualifier\nyou can restrict the search to just the file contents, the file path,\nor both.\n'Languages' Searches code based on the language it's written in.\n'Forks' Filters repositories based on the number of forks, and/or\nwhether code from forked repositories should be included in the results\nat all.\n'Size' Finds files that match a certain size (in bytes).\n'Path' Specifies the path that the resulting file must be at.\n'Extension' Matches files with a certain extension.\n'Users' or 'Repositories' Limits searches to a specific user or repository.\n", "in": "query", "name": "q", "required": true, "type": "string" }, { "description": "Can only be 'indexed', which indicates how recently a file has been indexed\nby the GitHub search infrastructure. If not provided, results are sorted\nby best match.\n", "enum": [ "indexed" ], "in": "query", "name": "sort", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/search-code" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/search/issues": { "get": { "description": "Find issues by state and keyword. (This method returns up to 100 results per page.)", "parameters": [ { "default": "desc", "description": "The sort field. if sort param is provided. Can be either asc or desc.", "enum": [ "desc", "asc" ], "in": "query", "name": "order", "type": "string" }, { "description": "The q search term can also contain any combination of the supported issue search qualifiers:", "in": "query", "name": "q", "required": true, "type": "string" }, { "description": "The sort field. Can be comments, created, or updated. Default: results are sorted by best match.", "enum": [ "updated", "created", "comments" ], "in": "query", "name": "sort", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/search-issues" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/search/repositories": { "get": { "description": "Search repositories.", "parameters": [ { "default": "desc", "description": "The sort field. if sort param is provided. Can be either asc or desc.", "enum": [ "desc", "asc" ], "in": "query", "name": "order", "type": "string" }, { "description": "The search terms. This can be any combination of the supported repository\nsearch parameters:\n'Search In' Qualifies which fields are searched. With this qualifier you\ncan restrict the search to just the repository name, description, readme,\nor any combination of these.\n'Size' Finds repositories that match a certain size (in kilobytes).\n'Forks' Filters repositories based on the number of forks, and/or whether\nforked repositories should be included in the results at all.\n'Created' and 'Last Updated' Filters repositories based on times of\ncreation, or when they were last updated.\n'Users or Repositories' Limits searches to a specific user or repository.\n'Languages' Searches repositories based on the language they are written in.\n'Stars' Searches repositories based on the number of stars.\n", "in": "query", "name": "q", "required": true, "type": "string" }, { "description": "If not provided, results are sorted by best match.", "enum": [ "stars", "forks", "updated" ], "in": "query", "name": "sort", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/search-repositories" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/search/users": { "get": { "description": "Search users.", "parameters": [ { "default": "desc", "description": "The sort field. if sort param is provided. Can be either asc or desc.", "enum": [ "desc", "asc" ], "in": "query", "name": "order", "type": "string" }, { "description": "The search terms. This can be any combination of the supported user\nsearch parameters:\n'Search In' Qualifies which fields are searched. With this qualifier you\ncan restrict the search to just the username, public email, full name,\nlocation, or any combination of these.\n'Repository count' Filters users based on the number of repositories they\nhave.\n'Location' Filter users by the location indicated in their profile.\n'Language' Search for users that have repositories that match a certain\nlanguage.\n'Created' Filter users based on when they joined.\n'Followers' Filter users based on the number of followers they have.\n", "in": "query", "name": "q", "required": true, "type": "string" }, { "description": "If not provided, results are sorted by best match.", "enum": [ "followers", "repositories", "joined" ], "in": "query", "name": "sort", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/search-users" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/teams/{teamId}": { "delete": { "description": "Delete team.\nIn order to delete a team, the authenticated user must be an owner of the\norg that the team is associated with.\n", "parameters": [ { "description": "Id of team.", "in": "path", "name": "teamId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get team.", "parameters": [ { "description": "Id of team.", "in": "path", "name": "teamId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/team" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Edit team.\nIn order to edit a team, the authenticated user must be an owner of the org\nthat the team is associated with.\n", "parameters": [ { "description": "Id of team.", "in": "path", "name": "teamId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/editTeam" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/team" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/teams/{teamId}/members": { "get": { "description": "List team members.\nIn order to list members in a team, the authenticated user must be a member\nof the team.\n", "parameters": [ { "description": "Id of team.", "in": "path", "name": "teamId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/teams/{teamId}/members/{username}": { "delete": { "description": "The \"Remove team member\" API is deprecated and is scheduled for removal in the next major version of the API. We recommend using the Remove team membership API instead. It allows you to remove both active and pending memberships.\n\nRemove team member.\nIn order to remove a user from a team, the authenticated user must have 'admin'\npermissions to the team or be an owner of the org that the team is associated\nwith.\nNOTE This does not delete the user, it just remove them from the team.\n", "parameters": [ { "description": "Id of team.", "in": "path", "name": "teamId", "required": true, "type": "integer" }, { "description": "Name of a member.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Team member removed." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "The \"Get team member\" API is deprecated and is scheduled for removal in the next major version of the API. We recommend using the Get team membership API instead. It allows you to get both active and pending memberships.\n\nGet team member.\nIn order to get if a user is a member of a team, the authenticated user mus\nbe a member of the team.\n", "parameters": [ { "description": "Id of team.", "in": "path", "name": "teamId", "required": true, "type": "integer" }, { "description": "Name of a member.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "User is a member." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "404": { "description": "User is not a member." } } }, "put": { "description": "The API (described below) is deprecated and is scheduled for removal in the next major version of the API. We recommend using the Add team membership API instead. It allows you to invite new organization members to your teams.\n\nAdd team member.\nIn order to add a user to a team, the authenticated user must have 'admin'\npermissions to the team or be an owner of the org that the team is associated\nwith.\n", "parameters": [ { "description": "Id of team.", "in": "path", "name": "teamId", "required": true, "type": "integer" }, { "description": "Name of a member.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Team member added." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "422": { "description": "If you attempt to add an organization to a team, you will get this.", "schema": { "$ref": "#/definitions/organizationAsTeamMember" } } } } }, "/teams/{teamId}/memberships/{username}": { "delete": { "description": "Remove team membership.\nIn order to remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. NOTE: This does not delete the user, it just removes their membership from the team.\n", "parameters": [ { "description": "Id of team.", "in": "path", "name": "teamId", "required": true, "type": "integer" }, { "description": "Name of a member.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Team member removed." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get team membership.\nIn order to get a user's membership with a team, the authenticated user must be a member of the team or an owner of the team's organization.\n", "parameters": [ { "description": "Id of team.", "in": "path", "name": "teamId", "required": true, "type": "integer" }, { "description": "Name of a member.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "User is a member.", "schema": { "$ref": "#/definitions/teamMembership" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "404": { "description": "User has no membership with team" } } }, "put": { "description": "Add team membership.\nIn order to add a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with.\n\nIf the user is already a part of the team's organization (meaning they're on at least one other team in the organization), this endpoint will add the user to the team.\n\nIf the user is completely unaffiliated with the team's organization (meaning they're on none of the organization's teams), this endpoint will send an invitation to the user via email. This newly-created membership will be in the 'pending' state until the user accepts the invitation, at which point the membership will transition to the 'active' state and the user will be added as a member of the team.\n", "parameters": [ { "description": "Id of team.", "in": "path", "name": "teamId", "required": true, "type": "integer" }, { "description": "Name of a member.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "Team member added.", "schema": { "$ref": "#/definitions/teamMembership" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "422": { "description": "If you attempt to add an organization to a team, you will get this.", "schema": { "$ref": "#/definitions/organizationAsTeamMember" } } } } }, "/teams/{teamId}/repos": { "get": { "description": "List team repos", "parameters": [ { "description": "Id of team.", "in": "path", "name": "teamId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/teamRepos" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/teams/{teamId}/repos/{org}/{repo}": { "put": { "description": "In order to add a repository to a team, the authenticated user must be an owner of the org that the team is associated with. Also, the repository must be owned by the organization, or a direct fork of a repository owned by the organization.", "parameters": [ { "description": "Id of team.", "in": "path", "name": "teamId", "required": true, "type": "integer" }, { "description": "Name of a organization.", "in": "path", "name": "org", "required": true, "type": "string" }, { "description": "Name of a repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/teams/{teamId}/repos/{owner}/{repo}": { "delete": { "description": "In order to remove a repository from a team, the authenticated user must be an owner of the org that the team is associated with. NOTE: This does not delete the repository, it just removes it from the team.", "parameters": [ { "description": "Id of team.", "in": "path", "name": "teamId", "required": true, "type": "integer" }, { "description": "Name of a repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of a repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Check if a team manages a repository", "parameters": [ { "description": "Id of team.", "in": "path", "name": "teamId", "required": true, "type": "integer" }, { "description": "Name of a repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of a repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/user": { "get": { "description": "Get the authenticated user.", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/user" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "patch": { "description": "Update the authenticated user.", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/user-update" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/user" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/user/emails": { "delete": { "description": "Delete email address(es).\nYou can include a single email address or an array of addresses.\n", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/user-emails" } } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "List email addresses for a user.\nIn the final version of the API, this method will return an array of hashes\nwith extended information for each email address indicating if the address\nhas been verified and if it's primary email address for GitHub.\nUntil API v3 is finalized, use the application/vnd.github.v3 media type to\nget other response format.\n", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "produces": [ "application/vnd.github.v3" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/user-emails" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Add email address(es).\nYou can post a single email address or an array of addresses.\n", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/emailsPost" } } ], "responses": { "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/user/followers": { "get": { "description": "List the authenticated user's followers", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/user/following": { "get": { "description": "List who the authenticated user is following.", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/user/following/{username}": { "delete": { "description": "Unfollow a user.\nUnfollowing a user requires the user to be logged in and authenticated with\nbasic auth or OAuth with the user:follow scope.\n", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "User unfollowed." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Check if you are following a user.", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Response if you are following this user." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "404": { "description": "Response if you are not following this user." } } }, "put": { "description": "Follow a user.\nFollowing a user requires the user to be logged in and authenticated with\nbasic auth or OAuth with the user:follow scope.\n", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "You are now following the user." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/user/issues": { "get": { "description": "List issues.\nList all issues across owned and member repositories for the authenticated\nuser.\n", "parameters": [ { "default": "all", "description": "Issues assigned to you / created by you / mentioning you / you're\nsubscribed to updates for / All issues the authenticated user can see\n", "enum": [ "assigned", "created", "mentioned", "subscribed", "all" ], "in": "query", "name": "filter", "required": true, "type": "string" }, { "default": "open", "enum": [ "open", "closed" ], "in": "query", "name": "state", "required": true, "type": "string" }, { "description": "String list of comma separated Label names. Example - bug,ui,@high.", "in": "query", "name": "labels", "required": true, "type": "string" }, { "default": "created", "enum": [ "created", "updated", "comments" ], "in": "query", "name": "sort", "required": true, "type": "string" }, { "default": "desc", "enum": [ "asc", "desc" ], "in": "query", "name": "direction", "required": true, "type": "string" }, { "description": "Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.\nOnly issues updated at or after this time are returned.\n", "in": "query", "name": "since", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/issues" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/user/keys": { "get": { "description": "List your public keys.\nLists the current user's keys. Management of public keys via the API requires\nthat you are authenticated through basic auth, or OAuth with the 'user', 'write:public_key' scopes.\n", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/gitignore" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a public key.", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/user-keys-post" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/user-keys-keyId" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/user/keys/{keyId}": { "delete": { "description": "Delete a public key. Removes a public key. Requires that you are authenticated via Basic Auth or via OAuth with at least admin:public_key scope.", "parameters": [ { "description": "ID of key.", "in": "path", "name": "keyId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "No content.\n" }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Get a single public key.", "parameters": [ { "description": "ID of key.", "in": "path", "name": "keyId", "required": true, "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/user-keys-keyId" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/user/orgs": { "get": { "description": "List public and private organizations for the authenticated user.", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/gitignore" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/user/repos": { "get": { "description": "List repositories for the authenticated user. Note that this does not include\nrepositories owned by organizations which the user can access. You can lis\nuser organizations and list organization repositories separately.\n", "parameters": [ { "default": "all", "enum": [ "all", "public", "private", "forks", "sources", "member" ], "in": "query", "name": "type", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/repos" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "post": { "description": "Create a new repository for the authenticated user. OAuth users must supply\nrepo scope.\n", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" }, { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/postRepo" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/repos" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/user/starred": { "get": { "description": "List repositories being starred by the authenticated user.", "parameters": [ { "description": "Ignored without 'sort' parameter.", "in": "query", "name": "direction", "type": "string" }, { "default": "created", "description": "", "enum": [ "created", "updated" ], "in": "query", "name": "sort", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/gitignore" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/user/starred/{owner}/{repo}": { "delete": { "description": "Unstar a repository", "parameters": [ { "description": "Name of a repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of a repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Unstarred." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Check if you are starring a repository.", "parameters": [ { "description": "Name of a repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of a repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "This repository is starred by you." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "404": { "description": "This repository is not starred by you." } } }, "put": { "description": "Star a repository.", "parameters": [ { "description": "Name of a repository owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of a repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Repository starred." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/user/subscriptions": { "get": { "description": "List repositories being watched by the authenticated user.", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/user-userId-subscribitions" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/user/subscriptions/{owner}/{repo}": { "delete": { "description": "Stop watching a repository", "parameters": [ { "description": "Name of the owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Unwatched." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } }, "get": { "description": "Check if you are watching a repository.", "parameters": [ { "description": "Name of the owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Repository is watched by you." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "404": { "description": "Repository is not watched by you." } } }, "put": { "description": "Watch a repository.", "parameters": [ { "description": "Name of the owner.", "in": "path", "name": "owner", "required": true, "type": "string" }, { "description": "Name of repository.", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Repository is watched." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/user/teams": { "get": { "description": "List all of the teams across all of the organizations to which the authenticated user belongs. This method requires user or repo scope when authenticating via OAuth.", "parameters": [ { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/teams-list" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/users": { "get": { "description": "Get all users.\nThis provides a dump of every user, in the order that they signed up for GitHub.\nNote: Pagination is powered exclusively by the since parameter. Use the Link\nheader to get the URL for the next page of users.\n", "parameters": [ { "description": "The integer ID of the last User that you've seen.", "in": "query", "name": "since", "type": "integer" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/users/{username}": { "get": { "description": "Get a single user.", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/users/{username}/events": { "get": { "description": "If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/users/{username}/events/orgs/{org}": { "get": { "description": "This is the user's organization dashboard. You must be authenticated as the user to view this.", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "in": "path", "name": "org", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/users/{username}/followers": { "get": { "description": "List a user's followers", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/users/{username}/following/{targetUser}": { "get": { "description": "Check if one user follows another.", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "Name of user.", "in": "path", "name": "targetUser", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "204": { "description": "Response if user follows target user." }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" }, "404": { "description": "Response if user does not follow target user." } } } }, "/users/{username}/gists": { "get": { "description": "List a users gists.", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "The time should be passed in as UTC in the ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.\nExample: \"2012-10-09T23:39:01Z\".\n", "in": "query", "name": "since", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/gists" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/users/{username}/keys": { "get": { "description": "List public keys for a user.\nLists the verified public keys for a user. This is accessible by anyone.\n", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/gitignore" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/users/{username}/orgs": { "get": { "description": "List all public organizations for a user.", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/gitignore" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/users/{username}/received_events": { "get": { "description": "These are events that you'll only see public events.", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/users/{username}/received_events/public": { "get": { "description": "List public events that a user has received", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/users/{username}/repos": { "get": { "description": "List public repositories for the specified user.", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "default": "all", "enum": [ "all", "public", "private", "forks", "sources", "member" ], "in": "query", "name": "type", "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/repos" } }, "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/users/{username}/starred": { "get": { "description": "List repositories being starred by a user.", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } }, "/users/{username}/subscriptions": { "get": { "description": "List repositories being watched by a user.", "parameters": [ { "description": "Name of user.", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "You can check the current version of media type in responses.\n", "in": "header", "name": "X-GitHub-Media-Type", "type": "string" }, { "description": "Is used to set specified media type.", "in": "header", "name": "Accept", "type": "string" }, { "in": "header", "name": "X-RateLimit-Limit", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Remaining", "type": "integer" }, { "in": "header", "name": "X-RateLimit-Reset", "type": "integer" }, { "in": "header", "name": "X-GitHub-Request-Id", "type": "integer" } ], "responses": { "403": { "description": "API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting\nfor details.\n" } } } } }, "definitions": { "asset": { "properties": { "content_type": { "type": "string" }, "created_at": { "type": "string" }, "download_count": { "type": "number" }, "id": { "type": "number" }, "label": { "type": "string" }, "name": { "type": "string" }, "size": { "type": "number" }, "state": { "type": "string" }, "updated_at": { "type": "string" }, "uploader": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "number" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "site_admin": { "type": "boolean" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "assetPatch": { "properties": { "label": { "type": "string" }, "name": { "type": "string" } }, "required": [ "name" ], "type": "object" }, "assets": { "items": { "properties": { "content_type": { "type": "string" }, "created_at": { "type": "string" }, "download_count": { "type": "number" }, "id": { "type": "number" }, "label": { "type": "string" }, "name": { "type": "string" }, "size": { "type": "number" }, "state": { "type": "string" }, "updated_at": { "type": "string" }, "uploader": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "number" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "site_admin": { "type": "boolean" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "assignees": { "items": { "properties": { "avatar_url": { "type": "integer" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "blob": { "properties": { "content": { "type": "string" }, "encoding": { "enum": [ "utf-8", "base64" ] }, "sha": { "type": "string" }, "size": { "type": "integer" } }, "type": "object" }, "blobs": { "properties": { "sha": { "type": "string" } }, "type": "object" }, "branch": { "properties": { "_links": { "properties": { "html": { "type": "string" }, "self": { "type": "string" } }, "type": "object" }, "commit": { "properties": { "author": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "commit": { "properties": { "author": { "properties": { "date": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } } }, "committer": { "properties": { "date": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "message": { "type": "string" }, "tree": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "committer": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "parents": { "items": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "name": { "type": "string" } }, "type": "object" }, "branches": { "items": { "properties": { "commit": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "name": { "type": "string" } }, "type": "object" }, "type": "array" }, "codeFrequencyStats": { "items": { "type": "integer" }, "type": "array" }, "collaborators": { "items": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "comment": { "properties": { "body": { "type": "string" } }, "type": "object" }, "commentBody": { "properties": { "body": { "type": "string" } }, "required": [ "body" ], "type": "object" }, "comments": { "items": { "properties": { "body": { "type": "string" }, "created_at": { "description": "ISO 8601.", "type": "string" }, "id": { "type": "integer" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "type": "array" }, "commit": { "properties": { "author": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "commit": { "properties": { "author": { "properties": { "date": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "committer": { "properties": { "date": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "message": { "type": "string" }, "tree": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "committer": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "files": { "items": { "properties": { "additions": { "type": "integer" }, "blob_url": { "type": "string" }, "changes": { "type": "integer" }, "deletions": { "type": "integer" }, "filename": { "type": "string" }, "patch": { "type": "string" }, "raw_url": { "type": "string" }, "status": { "type": "string" } }, "type": "object" }, "type": "array" }, "parents": { "items": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "sha": { "type": "string" }, "stats": { "properties": { "additions": { "type": "integer" }, "deletions": { "type": "integer" }, "total": { "type": "integer" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "commitActivityStats": { "items": { "properties": { "days": { "items": { "type": "integer" }, "type": "array" }, "total": { "type": "integer" }, "week": { "type": "integer" } }, "type": "object" }, "type": "array" }, "commitBody": { "properties": { "body": { "type": "string" }, "line": { "description": "Deprecated - Use position parameter instead.", "type": "string" }, "number": { "description": "Line number in the file to comment on. Defaults to null.", "type": "string" }, "path": { "description": "Relative path of the file to comment on.", "type": "string" }, "position": { "description": "Line index in the diff to comment on.", "type": "integer" }, "sha": { "description": "SHA of the commit to comment on.", "type": "string" } }, "required": [ "sha", "body" ], "type": "object" }, "commitComments": { "properties": { "body": { "type": "string" }, "commit_id": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "line": { "type": "integer" }, "path": { "type": "string" }, "position": { "type": "integer" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "commits": { "items": { "properties": { "author": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "commit": { "properties": { "author": { "properties": { "date": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "committer": { "properties": { "date": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "message": { "type": "string" }, "tree": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "committer": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "parents": { "items": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "compare-commits": { "properties": { "ahead_by": { "type": "integer" }, "base_commit": { "properties": { "author": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "site_admin": { "type": "boolean" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "commit": { "properties": { "author": { "properties": { "date": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "committer": { "properties": { "date": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "message": { "type": "string" }, "tree": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "committer": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "site_admin": { "type": "boolean" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "parents": { "items": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "behind_by": { "type": "integer" }, "commits": { "items": { "properties": { "author": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "site_admin": { "type": "boolean" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "commit": { "properties": { "author": { "properties": { "date": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "committer": { "properties": { "date": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "message": { "type": "string" }, "tree": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "committer": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "site_admin": { "type": "boolean" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "parents": { "items": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "diff_url": { "type": "string" }, "files": { "items": { "properties": { "additions": { "type": "integer" }, "blob_url": { "type": "string" }, "changes": { "type": "integer" }, "contents_url": { "type": "string" }, "deletions": { "type": "integer" }, "filename": { "type": "string" }, "patch": { "type": "string" }, "raw_url": { "type": "string" }, "sha": { "type": "string" }, "status": { "type": "string" } }, "type": "object" }, "type": "array" }, "html_url": { "type": "string" }, "patch_url": { "type": "string" }, "permalink_url": { "type": "string" }, "status": { "type": "string" }, "total_commits": { "type": "integer" }, "url": { "type": "string" } }, "type": "object" }, "contents-path": { "properties": { "_links": { "properties": { "git": { "type": "string" }, "html": { "type": "string" }, "self": { "type": "string" } }, "type": "object" }, "content": { "type": "string" }, "encoding": { "type": "string" }, "git_url": { "type": "string" }, "html_url": { "type": "string" }, "name": { "type": "string" }, "path": { "type": "string" }, "sha": { "type": "string" }, "size": { "type": "integer" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "contributors": { "items": { "properties": { "avatar_url": { "type": "string" }, "contributions": { "type": "integer" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "contributorsStats": { "items": { "properties": { "author": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "total": { "description": "The Total number of commits authored by the contributor.", "type": "integer" }, "weeks": { "items": { "properties": { "a": { "description": "Number of additions.", "type": "integer" }, "c": { "description": "Number of commits.", "type": "integer" }, "d": { "description": "Number of deletions.", "type": "integer" }, "w": { "description": "Start of the week.", "type": "string" } }, "type": "object" }, "type": "array" } }, "type": "object" }, "type": "array" }, "createDownload": { "properties": { "accesskeyid": { "type": "string" }, "acl": { "type": "string" }, "bucket": { "type": "string" }, "content_type": { "type": "string" }, "description": { "type": "string" }, "download_count": { "type": "integer" }, "expirationdate": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "mime_type": { "type": "string" }, "name": { "type": "string" }, "path": { "type": "string" }, "policy": { "type": "string" }, "prefix": { "type": "string" }, "redirect": { "type": "boolean" }, "s3_url": { "type": "string" }, "signature": { "type": "string" }, "size": { "type": "integer" }, "url": { "type": "string" } }, "type": "object" }, "createFile": { "properties": { "commit": { "properties": { "author": { "properties": { "date": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "committer": { "properties": { "date": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "html_url": { "type": "string" }, "message": { "type": "string" }, "parents": { "items": { "properties": { "html_url": { "type": "string" }, "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "sha": { "type": "string" }, "tree": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "content": { "properties": { "_links": { "properties": { "git": { "type": "string" }, "html": { "type": "string" }, "self": { "type": "string" } }, "type": "object" }, "git_url": { "type": "string" }, "html_url": { "type": "string" }, "name": { "type": "string" }, "path": { "type": "string" }, "sha": { "type": "string" }, "size": { "type": "integer" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "createFileBody": { "properties": { "committer": { "properties": { "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "content": { "type": "string" }, "message": { "type": "string" } }, "type": "object" }, "deleteFile": { "properties": { "commit": { "properties": { "author": { "properties": { "date": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "committer": { "properties": { "date": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } } }, "html_url": { "type": "string" }, "message": { "type": "string" }, "parents": { "properties": { "html_url": { "type": "string" }, "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "sha": { "type": "string" }, "tree": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "content": { "type": "string" } }, "type": "object" }, "deleteFileBody": { "properties": { "committer": { "properties": { "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "message": { "type": "string" }, "sha": { "type": "string" } }, "type": "object" }, "deployment": { "properties": { "description": { "type": "string" }, "payload": { "properties": { "deploy_user": { "type": "string" }, "environment": { "type": "string" }, "room_id": { "type": "number" } }, "type": "object" }, "ref": { "type": "string" } }, "type": "object" }, "deployment-resp": { "properties": { "created_at": { "type": "string" }, "creator": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "site_admin": { "type": "boolean" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "description": { "type": "string" }, "id": { "type": "integer" }, "payload": { "type": "string" }, "sha": { "type": "string" }, "statuses_url": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "deployment-statuses": { "items": { "properties": { "created_at": { "type": "string" }, "creator": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "site_admin": { "type": "boolean" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "description": { "type": "string" }, "id": { "type": "integer" }, "payload": { "type": "string" }, "state": { "type": "string" }, "target_url": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "deployment-statuses-create": { "properties": { "description": { "type": "string" }, "state": { "type": "string" }, "target_url": { "type": "string" } }, "type": "object" }, "downloadBody": { "properties": { "content_type": { "type": "string" }, "description": { "type": "string" }, "name": { "type": "string" }, "size": { "description": "Size of file in bytes.", "type": "integer" } }, "required": [ "name", "size" ], "type": "object" }, "downloads": { "properties": { "content_type": { "type": "string" }, "description": { "type": "string" }, "download_count": { "type": "integer" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "size": { "type": "integer" }, "url": { "type": "string" } }, "type": "object" }, "editTeam": { "properties": { "name": { "type": "string" }, "permission": { "enum": [ "pull", "push", "admin" ] } }, "required": [ "name" ], "type": "object" }, "emailsPost": { "items": { "type": "string" }, "type": "array" }, "emojis": { "properties": { "100": { "type": "string" }, "1234": { "type": "string" }, "+1": { "type": "string" }, "-1": { "type": "string" }, "8ball": { "type": "string" }, "a": { "type": "string" }, "ab": { "type": "string" } }, "type": "object" }, "event": { "properties": { "actor": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "commit_id": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "event": { "type": "string" }, "issue": { "properties": { "assignee": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } } }, "body": { "type": "string" }, "closed_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "comments": { "type": "integer" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "html_url": { "type": "string" }, "labels": { "items": { "properties": { "color": { "type": "string" }, "name": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "milestone": { "properties": { "closed_issues": { "type": "integer" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "creator": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "description": { "type": "string" }, "due_on": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "number": { "type": "integer" }, "open_issues": { "type": "integer" }, "state": { "enum": [ "open", "closed" ] }, "title": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "number": { "type": "integer" }, "pull_request": { "properties": { "diff_url": { "type": "string" }, "html_url": { "type": "string" }, "patch_url": { "type": "string" } }, "type": "object" }, "state": { "enum": [ "open", "closed" ] }, "title": { "type": "string" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "events": { "properties": { "actor": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "created_at": { "type": "object" }, "id": { "type": "integer" }, "org": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "payload": { "properties": {}, "type": "object" }, "public": { "type": "boolean" }, "repo": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": { "type": "string" } }, "type": "object" }, "feeds": { "properties": { "_links": { "properties": { "current_user": { "properties": { "href": { "type": "string" }, "type": { "type": "string" } }, "type": "object" }, "current_user_actor": { "properties": { "href": { "type": "string" }, "type": { "type": "string" } }, "type": "object" }, "current_user_organization": { "properties": { "href": { "type": "string" }, "type": { "type": "string" } }, "type": "object" }, "current_user_public": { "properties": { "href": { "type": "string" }, "type": { "type": "string" } }, "type": "object" }, "timeline": { "properties": { "href": { "type": "string" }, "type": { "type": "string" } }, "type": "object" }, "user": { "properties": { "href": { "type": "string" }, "type": { "type": "string" } }, "type": "object" } } }, "current_user_actor_url": { "type": "string" }, "current_user_organization_url": { "type": "string" }, "current_user_public": { "type": "string" }, "current_user_url": { "type": "string" }, "timeline_url": { "type": "string" }, "user_url": { "type": "string" } }, "type": "object" }, "fork": { "properties": { "clone_url": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "description": { "type": "string" }, "fork": { "type": "boolean" }, "forks": { "type": "integer" }, "forks_count": { "type": "integer" }, "full_name": { "type": "string" }, "git_url": { "type": "string" }, "homepage": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "language": { "type": "string" }, "master_branch": { "type": "string" }, "mirror_url": { "type": "string" }, "name": { "type": "string" }, "open_issues": { "type": "integer" }, "open_issues_count": { "type": "integer" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "private": { "type": "boolean" }, "pushed_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "size": { "type": "integer" }, "ssh_url": { "type": "string" }, "svn_url": { "type": "string" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "watchers": { "type": "integer" }, "watchers_count": { "type": "integer" } }, "type": "object" }, "forkBody": { "properties": { "organization": { "type": "string" } }, "type": "object" }, "forks": { "items": { "properties": { "clone_url": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "description": { "type": "string" }, "fork": { "type": "boolean" }, "forks": { "type": "integer" }, "forks_count": { "type": "integer" }, "full_name": { "type": "string" }, "git_url": { "type": "string" }, "homepage": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "language": { "type": "string" }, "master_branch": { "type": "string" }, "mirror_url": { "type": "string" }, "name": { "type": "string" }, "open_issues": { "type": "integer" }, "open_issues_count": { "type": "integer" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "private": { "type": "boolean" }, "pushed_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "size": { "type": "integer" }, "ssh_url": { "type": "string" }, "svn_url": { "type": "string" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "watchers": { "type": "integer" }, "watchers_count": { "type": "integer" } }, "type": "object" }, "type": "array" }, "gist": { "properties": { "comments": { "type": "integer" }, "comments_url": { "type": "string" }, "created_at": { "description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.", "type": "string" }, "description": { "type": "string" }, "files": { "properties": { "ring.erl": { "properties": { "filename": { "type": "string" }, "raw_url": { "type": "string" }, "size": { "type": "integer" } }, "type": "object" } }, "type": "object" }, "forks": { "items": { "properties": { "created_at": { "description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.", "type": "string" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "type": "array" }, "git_pull_url": { "type": "string" }, "git_push_url": { "type": "string" }, "history": { "items": { "properties": { "change_status": { "properties": { "additions": { "type": "integer" }, "deletions": { "type": "integer" }, "total": { "type": "integer" } }, "type": "object" }, "committed_at": { "description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.", "type": "string" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "version": { "type": "string" } }, "type": "object" }, "type": "array" }, "html_url": { "type": "string" }, "id": { "type": "string" }, "public": { "type": "boolean" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "gists": { "items": { "properties": { "comments": { "type": "integer" }, "comments_url": { "type": "string" }, "created_at": { "type": "string" }, "description": { "type": "string" }, "files": { "properties": { "ring.erl": { "properties": { "filename": { "type": "string" }, "raw_url": { "type": "string" }, "size": { "type": "integer" } }, "type": "object" } }, "type": "object" }, "git_pull_url": { "type": "string" }, "git_push_url": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "string" }, "public": { "type": "boolean" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "type": "array" }, "gitCommit": { "properties": { "author": { "properties": { "date": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "message": { "type": "string" }, "parents": { "type": "string" }, "tree": { "type": "string" } }, "type": "object" }, "gitRefPatch": { "properties": { "force": { "type": "boolean" }, "sha": { "type": "string" } }, "type": "object" }, "gitignore": { "items": {}, "type": "array" }, "gitignore-lang": { "properties": { "name": { "type": "string" }, "source": { "type": "string" } }, "type": "object" }, "headBranch": { "properties": { "object": { "properties": { "sha": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "ref": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "headBranchBody": { "properties": { "force": { "description": "Boolean indicating whether to force the update or to make sure the update is a fast-forward update. The default is false, so leaving this out or setting it to false will make sure you’re not overwriting work.", "type": "boolean" }, "sha": { "description": "String of the SHA1 value to set this reference to.", "type": "string" } }, "required": [ "sha", "force" ], "type": "object" }, "heads": { "items": { "properties": { "commit": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "name": { "type": "string" }, "tarball_url": { "type": "string" }, "zipball_url": { "type": "string" } }, "type": "object" }, "type": "array" }, "hook": { "items": { "properties": { "active": { "type": "boolean" }, "config": { "properties": { "content_type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "events": { "items": { "enum": [ "push", "issues", "issue_comment", "commit_comment", "pull_request", "pull_request_review_comment", "gollum", "watch", "download", "fork", "fork_apply", "member", "public", "team_add", "status" ] }, "type": "array" }, "id": { "type": "integer" }, "name": { "type": "string" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "hookBody": { "properties": { "active": { "type": "boolean" }, "add_events": { "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "issue": { "properties": { "assignee": { "type": "string" }, "body": { "type": "string" }, "labels": { "items": { "type": "string" }, "type": "array" }, "milestone": { "type": "number" }, "title": { "type": "string" } }, "type": "object" }, "issueBody": { "properties": { "assignee": { "type": "string" }, "body": { "type": "string" }, "labels": { "items": { "type": "string" }, "type": "array" }, "milestone": { "type": "number" }, "title": { "type": "string" } }, "type": "object" }, "issues": { "items": { "properties": { "assignee": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "body": { "type": "string" }, "closed_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "comments": { "type": "integer" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "html_url": { "type": "string" }, "labels": { "items": { "properties": { "color": { "type": "string" }, "name": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "milestone": { "properties": { "closed_issues": { "type": "integer" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "creator": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "description": { "type": "string" }, "due_on": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "number": { "type": "integer" }, "open_issues": { "type": "integer" }, "state": { "enum": [ "open", "closed" ] }, "title": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "number": { "type": "integer" }, "pull_request": { "properties": { "diff_url": { "type": "string" }, "html_url": { "type": "string" }, "patch_url": { "type": "string" } }, "type": "object" }, "state": { "enum": [ "open", "closed" ] }, "title": { "type": "string" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "type": "array" }, "issuesComment": { "properties": { "body": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "issuesComments": { "items": { "properties": { "_links": { "properties": { "html": { "properties": { "href": { "type": "string" } }, "type": "object" }, "pull_request": { "properties": { "href": { "type": "string" } }, "type": "object" }, "self": { "properties": { "href": { "type": "string" } }, "type": "object" } }, "type": "object" }, "body": { "type": "string" }, "commit_id": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "id": { "type": "integer" }, "path": { "type": "string" }, "position": { "type": "integer" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "type": "array" }, "key": { "properties": { "id": { "type": "integer" }, "key": { "type": "string" }, "title": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "keyBody": { "properties": { "key": { "type": "string" }, "title": { "type": "string" } }, "type": "object" }, "keys": { "items": { "properties": { "id": { "type": "integer" }, "key": { "type": "string" }, "title": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "label": { "properties": { "color": { "maxLength": 6, "minLength": 6, "type": "string" }, "name": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "labels": { "items": { "properties": { "color": { "maxLength": 6, "minLength": 6, "type": "string" }, "name": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "labelsBody": { "items": { "type": "string" }, "type": "array" }, "languages": { "additionalProperties": { "type": "integer" }, "type": "object" }, "markdown": { "properties": { "context": { "type": "string" }, "mode": { "type": "string" }, "text": { "type": "string" } }, "type": "object" }, "members": { "items": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "merge": { "properties": { "merged": { "type": "boolean" }, "message": { "type": "string" }, "sha": { "type": "string" } }, "type": "object" }, "mergePullBody": { "properties": { "commit_message": { "type": "string" } }, "type": "object" }, "mergesBody": { "properties": { "base": { "type": "string" }, "commit_message": { "type": "string" }, "head": { "type": "string" } }, "type": "object" }, "mergesConflict": { "properties": { "message": { "description": "Error message", "type": "string" } }, "type": "object" }, "mergesSuccessful": { "properties": { "author": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "comments_url": { "type": "string" }, "commit": { "properties": { "author": { "properties": { "date": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "comment_count": { "type": "integer" }, "committer": { "properties": { "date": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "message": { "type": "string" }, "tree": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "committer": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "merged": { "type": "boolean" }, "message": { "type": "string" }, "parents": { "items": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "meta": { "properties": { "git": { "items": { "description": "An Array of IP addresses in CIDR format specifying the Git servers at GitHub.", "type": "string" }, "type": "array" }, "hooks": { "items": { "description": "An Array of IP addresses in CIDR format specifying the addresses that incoming service hooks will originate from.", "type": "string" }, "type": "array" } }, "type": "object" }, "milestone": { "properties": { "closed_issues": { "type": "integer" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "creator": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "description": { "type": "string" }, "due_on": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "number": { "type": "integer" }, "open_issues": { "type": "integer" }, "state": { "enum": [ "open", "closed" ] }, "title": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "milestoneBody": { "properties": { "description": { "type": "string" }, "due_on": { "type": "string" }, "state": { "type": "string" }, "title": { "type": "string" } }, "type": "object" }, "milestoneUpdate": { "properties": { "description": { "type": "string" }, "due_on": { "type": "string" }, "state": { "type": "string" }, "title": { "type": "string" } }, "type": "object" }, "notificationMarkRead": { "properties": { "last_read_at": { "type": "string" } }, "type": "object" }, "notifications": { "properties": { "id": { "type": "integer" }, "last_read_at": { "type": "string" }, "reason": { "type": "string" }, "repository": { "properties": { "description": { "type": "string" }, "fork": { "type": "boolean" }, "full_name": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "private": { "type": "boolean" }, "url": { "type": "string" } }, "type": "object" }, "subject": { "properties": { "latest_comment_url": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "unread": { "type": "boolean" }, "updated_at": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "orgMembers": { "items": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "orgPublicMembers": { "items": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "orgTeams": { "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "orgTeamsPost": { "properties": { "name": { "type": "string" }, "permission": { "enum": [ "pull", "push", "admin" ] }, "repo_names": { "items": { "type": "string" }, "type": "array" } }, "required": [ "name" ], "type": "object" }, "organization": { "properties": { "avatar_url": { "type": "string" }, "blog": { "type": "string" }, "company": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "email": { "type": "string" }, "followers": { "type": "integer" }, "following": { "type": "integer" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "location": { "type": "string" }, "login": { "type": "string" }, "name": { "type": "string" }, "public_gists": { "type": "integer" }, "public_repos": { "type": "integer" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "organizationAsTeamMember": { "properties": { "errors": { "items": { "properties": { "code": { "type": "string" }, "field": { "type": "string" }, "resource": { "type": "string" } }, "type": "object" }, "type": "array" }, "message": { "type": "string" } }, "type": "object" }, "participationStats": { "properties": { "all": { "items": { "type": "integer" }, "type": "array" }, "owner": { "items": { "type": "integer" }, "type": "array" } }, "type": "object" }, "patchGist": { "properties": { "description": { "type": "string" }, "files": { "properties": { "delete_this_file.txt": { "type": "string" }, "file1.txt": { "properties": { "content": { "type": "string" } }, "type": "object" }, "new_file.txt": { "properties": { "content": { "type": "string" } }, "type": "object" }, "old_name.txt": { "properties": { "content": { "type": "string" }, "filename": { "type": "string" } }, "type": "object" } } } }, "type": "object" }, "patchOrg": { "properties": { "billing_email": { "description": "Billing email address. This address is not publicized.", "type": "string" }, "company": { "type": "string" }, "email": { "description": "Publicly visible email address.", "type": "string" }, "location": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "postComment": { "properties": { "body": { "type": "string" } }, "required": [ "body" ], "type": "object" }, "postGist": { "properties": { "description": { "type": "string" }, "files": { "properties": { "file1.txt": { "properties": { "content": { "type": "string" } }, "type": "object" } }, "type": "object" }, "public": { "type": "boolean" } }, "type": "object" }, "postRepo": { "properties": { "auto_init": { "description": "True to create an initial commit with empty README. Default is false.", "type": "boolean" }, "description": { "type": "string" }, "gitignore_template": { "description": "Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, \"Haskell\" Ignored if auto_init parameter is not provided. ", "type": "string" }, "has_downloads": { "description": "True to enable downloads for this repository, false to disable them. Default is true.", "type": "boolean" }, "has_issues": { "description": "True to enable issues for this repository, false to disable them. Default is true.", "type": "boolean" }, "has_wiki": { "description": "True to enable the wiki for this repository, false to disable it. Default is true.", "type": "boolean" }, "homepage": { "type": "string" }, "name": { "type": "string" }, "private": { "description": "True to create a private repository, false to create a public one. Creating private repositories requires a paid GitHub account.", "type": "boolean" }, "team_id": { "description": "The id of the team that will be granted access to this repository. This is only valid when creating a repo in an organization.", "type": "integer" } }, "required": [ "name" ], "type": "object" }, "pullRequest": { "properties": { "_links": { "properties": { "comments": { "properties": { "href": { "type": "string" } }, "type": "object" }, "html": { "properties": { "href": { "type": "string" } }, "type": "object" }, "review_comments": { "properties": { "href": { "type": "string" } }, "type": "object" }, "self": { "properties": { "href": { "type": "string" } }, "type": "object" } }, "type": "object" }, "additions": { "type": "integer" }, "base": { "properties": { "label": { "type": "string" }, "ref": { "type": "string" }, "repo": { "properties": { "clone_url": { "type": "string" }, "created_at": { "type": "string" }, "description": { "type": "string" }, "fork": { "type": "boolean" }, "forks": { "type": "integer" }, "forks_count": { "type": "integer" }, "full_name": { "type": "string" }, "git_url": { "type": "string" }, "homepage": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "language": { "type": "null" }, "master_branch": { "type": "string" }, "mirror_url": { "type": "string" }, "name": { "type": "string" }, "open_issues": { "type": "integer" }, "open_issues_count": { "type": "integer" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "private": { "type": "boolean" }, "pushed_at": { "type": "string" }, "size": { "type": "integer" }, "ssh_url": { "type": "string" }, "svn_url": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" }, "watchers": { "type": "integer" }, "watchers_count": { "type": "integer" } }, "type": "object" }, "sha": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "body": { "type": "string" }, "changed_files": { "type": "integer" }, "closed_at": { "type": "string" }, "comments": { "type": "integer" }, "commits": { "type": "integer" }, "created_at": { "type": "string" }, "deletions": { "type": "integer" }, "diff_url": { "type": "string" }, "head": { "properties": { "label": { "type": "string" }, "ref": { "type": "string" }, "repo": { "properties": { "clone_url": { "type": "string" }, "created_at": { "type": "string" }, "description": { "type": "string" }, "fork": { "type": "boolean" }, "forks": { "type": "integer" }, "forks_count": { "type": "integer" }, "full_name": { "type": "string" }, "git_url": { "type": "string" }, "homepage": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "language": { "type": "null" }, "master_branch": { "type": "string" }, "mirror_url": { "type": "string" }, "name": { "type": "string" }, "open_issues": { "type": "integer" }, "open_issues_count": { "type": "integer" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "private": { "type": "boolean" }, "pushed_at": { "type": "string" }, "size": { "type": "integer" }, "ssh_url": { "type": "string" }, "svn_url": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" }, "watchers": { "type": "integer" }, "watchers_count": { "type": "integer" } }, "type": "object" }, "sha": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "html_url": { "type": "string" }, "issue_url": { "type": "string" }, "merge_commit_sha": { "type": "string" }, "mergeable": { "type": "boolean" }, "merged": { "type": "boolean" }, "merged_at": { "type": "string" }, "merged_by": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "number": { "type": "integer" }, "patch_url": { "type": "string" }, "state": { "type": "string" }, "title": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "pullUpdate": { "properties": { "body": { "type": "string" }, "state": { "type": "string" }, "title": { "type": "string" } }, "type": "object" }, "pulls": { "items": { "properties": { "_links": { "properties": { "comments": { "properties": { "href": { "type": "string" } }, "type": "object" }, "html": { "properties": { "href": { "type": "string" } }, "type": "object" }, "review_comments": { "properties": { "href": { "type": "string" } }, "type": "object" }, "self": { "properties": { "href": { "type": "string" } }, "type": "object" } }, "type": "object" }, "base": { "properties": { "label": { "type": "string" }, "ref": { "type": "string" }, "repo": { "properties": { "clone_url": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "description": { "type": "string" }, "fork": { "type": "boolean" }, "forks": { "type": "integer" }, "forks_count": { "type": "integer" }, "full_name": { "type": "string" }, "git_url": { "type": "string" }, "homepage": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "language": { "type": "string" }, "master_branch": { "type": "string" }, "mirror_url": { "type": "string" }, "name": { "type": "string" }, "open_issues": { "type": "integer" }, "open_issues_count": { "type": "integer" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "private": { "type": "boolean" }, "pushed_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "size": { "type": "integer" }, "ssh_url": { "type": "string" }, "svn_url": { "type": "string" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "watchers": { "type": "integer" }, "watchers_count": { "type": "integer" } }, "type": "object" }, "sha": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "body": { "type": "string" }, "closed_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "diff_url": { "type": "string" }, "head": { "properties": { "label": { "type": "string" }, "ref": { "type": "string" }, "repo": { "properties": { "clone_url": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "description": { "type": "string" }, "fork": { "type": "boolean" }, "forks": { "type": "integer" }, "forks_count": { "type": "integer" }, "full_name": { "type": "string" }, "git_url": { "type": "string" }, "homepage": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "language": { "type": "string" }, "master_branch": { "type": "string" }, "mirror_url": { "type": "string" }, "name": { "type": "string" }, "open_issues": { "type": "integer" }, "open_issues_count": { "type": "integer" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "private": { "type": "boolean" }, "pushed_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "size": { "type": "integer" }, "ssh_url": { "type": "string" }, "svn_url": { "type": "string" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "watchers": { "type": "integer" }, "watchers_count": { "type": "integer" } }, "type": "object" }, "sha": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "html_url": { "type": "string" }, "issue_url": { "type": "string" }, "merged_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "number": { "type": "integer" }, "patch_url": { "type": "string" }, "state": { "enum": [ "open", "closed" ] }, "title": { "type": "string" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "type": "array" }, "pullsComment": { "properties": { "_links": { "properties": { "html": { "properties": { "href": { "type": "string" } }, "type": "object" }, "pull_request": { "properties": { "href": { "type": "string" } }, "type": "object" }, "self": { "properties": { "href": { "type": "string" } }, "type": "object" } }, "type": "object" }, "body": { "type": "string" }, "commit_id": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "id": { "type": "integer" }, "path": { "type": "string" }, "position": { "type": "integer" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "pullsCommentPost": { "properties": { "body": { "type": "string" }, "commit_id": { "type": "string" }, "path": { "type": "string" }, "position": { "type": "number" } }, "type": "object" }, "pullsComments": { "items": { "properties": { "_links": { "properties": { "html": { "properties": { "href": { "type": "string" } }, "type": "object" }, "pull_request": { "properties": { "href": { "type": "string" } }, "type": "object" }, "self": { "properties": { "href": { "type": "string" } }, "type": "object" } }, "type": "object" }, "body": { "type": "string" }, "commit_id": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "id": { "type": "integer" }, "path": { "type": "string" }, "position": { "type": "integer" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "type": "array" }, "pullsPost": { "properties": { "base": { "type": "string" }, "body": { "type": "string" }, "head": { "type": "string" }, "title": { "type": "string" } }, "type": "object" }, "punchCardStats": { "items": { "type": "integer" }, "type": "array" }, "putSubscription": { "properties": { "created_at": { "type": "string" }, "ignored": { "type": "boolean" }, "reason": { "type": "object" }, "subscribed": { "type": "boolean" }, "thread_url": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "rate_limit": { "properties": { "rate": { "properties": { "limit": { "type": "integer" }, "remaining": { "type": "integer" }, "reset": { "type": "integer" } } } }, "type": "object" }, "readme": { "properties": { "_links": { "properties": { "git": { "type": "string" }, "html": { "type": "string" }, "self": { "type": "string" } }, "type": "object" }, "content": { "type": "string" }, "encoding": { "type": "string" }, "git_url": { "type": "string" }, "html_url": { "type": "string" }, "name": { "type": "string" }, "path": { "type": "string" }, "sha": { "type": "string" }, "size": { "type": "integer" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "ref": { "items": { "properties": { "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "creator": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "description": { "type": "string" }, "id": { "type": "integer" }, "state": { "type": "string" }, "target_url": { "type": "string" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "refBody": { "properties": { "object": { "properties": { "sha": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "ref": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "refStatus": { "items": { "properties": { "commit_url": { "type": "string" }, "name": { "type": "string" }, "repository_url": { "type": "string" }, "sha": { "type": "string" }, "state": { "type": "string" }, "statuses": { "items": { "properties": { "context": { "type": "string" }, "created_at": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "number" }, "state": { "type": "string" }, "target_url": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" } }, "type": "object" }, "type": "array" }, "refs": { "items": { "properties": { "object": { "properties": { "sha": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "ref": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "refsBody": { "properties": { "ref": { "type": "string" }, "sha": { "type": "string" } }, "type": "object" }, "release": { "properties": { "assets": { "items": { "properties": { "content_type": { "type": "string" }, "created_at": { "type": "string" }, "download_count": { "type": "integer" }, "id": { "type": "integer" }, "label": { "type": "string" }, "name": { "type": "string" }, "size": { "type": "integer" }, "state": { "type": "string" }, "updated_at": { "type": "string" }, "uploader": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "site_admin": { "type": "boolean" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "assets_url": { "type": "string" }, "author": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "site_admin": { "type": "boolean" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "body": { "type": "string" }, "created_at": { "type": "string" }, "draft": { "type": "boolean" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "prerelease": { "type": "boolean" }, "published_at": { "type": "string" }, "tag_name": { "type": "string" }, "tarball_url": { "type": "string" }, "target_commitish": { "type": "string" }, "upload_url": { "type": "string" }, "url": { "type": "string" }, "zipball_url": { "type": "string" } }, "type": "object" }, "release-create": { "properties": { "body": { "type": "string" }, "draft": { "type": "boolean" }, "name": { "type": "string" }, "prerelease": { "type": "boolean" }, "tag_name": { "type": "string" }, "target_commitish": { "type": "string" } }, "type": "object" }, "releases": { "items": { "properties": { "assets": { "items": { "properties": { "content_type": { "type": "string" }, "created_at": { "type": "string" }, "download_count": { "type": "integer" }, "id": { "type": "integer" }, "label": { "type": "string" }, "name": { "type": "string" }, "size": { "type": "integer" }, "state": { "type": "string" }, "updated_at": { "type": "string" }, "uploader": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "site_admin": { "type": "boolean" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "assets_url": { "type": "string" }, "author": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "site_admin": { "type": "boolean" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "body": { "type": "string" }, "created_at": { "type": "string" }, "draft": { "type": "boolean" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "prerelease": { "type": "boolean" }, "published_at": { "type": "string" }, "tag_name": { "type": "string" }, "tarball_url": { "type": "string" }, "target_commitish": { "type": "string" }, "upload_url": { "type": "string" }, "url": { "type": "string" }, "zipball_url": { "type": "string" } }, "type": "object" }, "type": "array" }, "repo": { "properties": { "clone_url": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "description": { "type": "string" }, "fork": { "type": "boolean" }, "forks": { "type": "integer" }, "forks_count": { "type": "integer" }, "full_name": { "type": "string" }, "git_url": { "type": "string" }, "has_downloads": { "type": "boolean" }, "has_issues": { "type": "boolean" }, "has_wiki": { "type": "boolean" }, "homepage": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "language": { "type": "string" }, "master_branch": { "type": "string" }, "mirror_url": { "type": "string" }, "name": { "type": "string" }, "open_issues": { "type": "integer" }, "open_issues_count": { "type": "integer" }, "organization": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "parent": { "description": "Is present when the repo is a fork. Parent is the repo this repo was forked from.", "properties": { "clone_url": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "description": { "type": "string" }, "fork": { "type": "boolean" }, "forks": { "type": "integer" }, "forks_count": { "type": "integer" }, "full_name": { "type": "string" }, "git_url": { "type": "string" }, "homepage": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "language": { "type": "string" }, "master_branch": { "type": "string" }, "mirror_url": { "type": "string" }, "name": { "type": "string" }, "open_issues": { "type": "integer" }, "open_issues_count": { "type": "integer" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "private": { "type": "boolean" }, "pushed_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "size": { "type": "integer" }, "ssh_url": { "type": "string" }, "svn_url": { "type": "string" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "watchers": { "type": "integer" }, "watchers_count": { "type": "integer" } }, "type": "object" }, "private": { "type": "boolean" }, "pushed_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "size": { "type": "integer" }, "source": { "description": "Is present when the repo is a fork. Source is the ultimate source for the network.", "properties": { "clone_url": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "description": { "type": "string" }, "fork": { "type": "boolean" }, "forks": { "type": "integer" }, "forks_count": { "type": "integer" }, "full_name": { "type": "string" }, "git_url": { "type": "string" }, "homepage": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "language": { "type": "string" }, "master_branch": { "type": "string" }, "mirror_url": { "type": "string" }, "name": { "type": "string" }, "open_issues": { "type": "integer" }, "open_issues_count": { "type": "integer" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "private": { "type": "boolean" }, "pushed_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "size": { "type": "integer" }, "ssh_url": { "type": "string" }, "svn_url": { "type": "string" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "watchers": { "type": "integer" }, "watchers_count": { "type": "integer" } }, "type": "object" }, "ssh_url": { "type": "string" }, "svn_url": { "type": "string" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "watchers": { "type": "integer" }, "watchers_count": { "type": "integer" } }, "type": "object" }, "repo-deployments": { "items": { "properties": { "created_at": { "type": "string" }, "creator": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "site_admin": { "type": "boolean" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "description": { "type": "string" }, "id": { "type": "integer" }, "payload": { "type": "string" }, "sha": { "type": "string" }, "statuses_url": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "repoComments": { "items": { "properties": { "body": { "type": "string" }, "commit_id": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "line": { "type": "integer" }, "path": { "type": "string" }, "position": { "type": "integer" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "type": "array" }, "repoCommit": { "properties": { "author": { "properties": { "date": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "committer": { "properties": { "date": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "message": { "type": "string" }, "parents": { "items": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "sha": { "type": "string" }, "tree": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "repoCommitBody": { "properties": { "author": { "properties": { "date": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "message": { "type": "string" }, "parents": { "items": { "type": "string" }, "type": "array" }, "tree": { "type": "string" } }, "required": [ "message", "parents", "tree" ], "type": "object" }, "repoEdit": { "properties": { "description": { "type": "string" }, "has_downloads": { "type": "boolean" }, "has_issues": { "type": "boolean" }, "has_wiki": { "type": "boolean" }, "homepage": { "type": "string" }, "name": { "type": "string" }, "private": { "type": "boolean" } }, "type": "object" }, "repos": { "items": { "properties": { "clone_url": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "description": { "type": "string" }, "fork": { "type": "boolean" }, "forks": { "type": "integer" }, "forks_count": { "type": "integer" }, "full_name": { "type": "string" }, "git_url": { "type": "string" }, "homepage": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "language": { "type": "string" }, "master_branch": { "type": "string" }, "mirror_url": { "type": "string" }, "name": { "type": "string" }, "open_issues": { "type": "integer" }, "open_issues_count": { "type": "integer" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "private": { "type": "boolean" }, "pushed_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "size": { "type": "integer" }, "ssh_url": { "type": "string" }, "svn_url": { "type": "string" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "watchers": { "type": "integer" }, "watchers_count": { "type": "integer" } } }, "type": "array" }, "repositories": { "items": { "properties": { "description": { "type": "string" }, "fork": { "type": "boolean" }, "full_name": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "private": { "type": "boolean" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "search-code": { "properties": { "items": { "items": { "properties": { "git_url": { "type": "string" }, "html_url": { "type": "string" }, "name": { "type": "string" }, "path": { "type": "string" }, "repository": { "properties": { "archive_url": { "type": "string" }, "assignees_url": { "type": "string" }, "blobs_url": { "type": "string" }, "branches_url": { "type": "string" }, "collaborators_url": { "type": "string" }, "comments_url": { "type": "string" }, "commits_url": { "type": "string" }, "compare_url": { "type": "string" }, "contents_url": { "type": "string" }, "contributors_url": { "type": "string" }, "description": { "type": "string" }, "downloads_url": { "type": "string" }, "events_url": { "type": "string" }, "fork": { "type": "boolean" }, "forks_url": { "type": "string" }, "full_name": { "type": "string" }, "git_commits_url": { "type": "string" }, "git_refs_url": { "type": "string" }, "git_tags_url": { "type": "string" }, "hooks_url": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "issue_comment_url": { "type": "string" }, "issue_events_url": { "type": "string" }, "issues_url": { "type": "string" }, "keys_url": { "type": "string" }, "labels_url": { "type": "string" }, "languages_url": { "type": "string" }, "merges_url": { "type": "string" }, "milestones_url": { "type": "string" }, "name": { "type": "string" }, "notifications_url": { "type": "string" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "private": { "type": "boolean" }, "pulls_url": { "type": "string" }, "stargazers_url": { "type": "string" }, "statuses_url": { "type": "string" }, "subscribers_url": { "type": "string" }, "subscription_url": { "type": "string" }, "tags_url": { "type": "string" }, "teams_url": { "type": "string" }, "trees_url": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "score": { "type": "number" }, "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "total_count": { "type": "integer" } }, "type": "object" }, "search-issues": { "properties": { "items": { "items": { "properties": { "assignee": { "type": "null" }, "body": { "type": "string" }, "closed_at": { "type": "null" }, "comments": { "type": "integer" }, "comments_url": { "type": "string" }, "created_at": { "type": "string" }, "events_url": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "labels": { "items": { "properties": { "color": { "type": "string" }, "name": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "labels_url": { "type": "string" }, "milestone": { "type": "null" }, "number": { "type": "integer" }, "pull_request": { "properties": { "diff_url": { "type": "null" }, "html_url": { "type": "null" }, "patch_url": { "type": "null" } }, "type": "object" }, "score": { "type": "number" }, "state": { "type": "string" }, "title": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" }, "user": { "properties": { "avatar_url": { "type": "string" }, "events_url": { "type": "string" }, "followers_url": { "type": "string" }, "following_url": { "type": "string" }, "gists_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "starred_url": { "type": "string" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" }, "type": "array" }, "total_count": { "type": "integer" } }, "type": "object" }, "search-issues-by-keyword": { "properties": { "issues": { "items": { "properties": { "body": { "type": "string" }, "comments": { "type": "integer" }, "created_at": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "labels": { "items": { "type": "string" }, "type": "array" }, "number": { "type": "integer" }, "position": { "type": "integer" }, "state": { "type": "string" }, "title": { "type": "string" }, "updated_at": { "type": "string" }, "user": { "type": "string" }, "votes": { "type": "integer" } }, "type": "object" }, "type": "array" } }, "type": "object" }, "search-repositories": { "properties": { "items": { "items": { "properties": { "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "default_branch": { "type": "string" }, "description": { "type": "string" }, "fork": { "type": "boolean" }, "forks": { "type": "integer" }, "forks_count": { "type": "integer" }, "full_name": { "type": "string" }, "homepage": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "language": { "type": "string" }, "master_branch": { "type": "string" }, "name": { "type": "string" }, "open_issues": { "type": "integer" }, "open_issues_count": { "type": "integer" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "received_events_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "private": { "type": "boolean" }, "pushed_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "score": { "type": "number" }, "size": { "type": "integer" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "watchers": { "type": "integer" }, "watchers_count": { "type": "integer" } }, "type": "object" }, "type": "array" }, "total_count": { "type": "integer" } }, "type": "object" }, "search-repositories-by-keyword": { "properties": { "repositories": { "items": { "properties": { "created": { "type": "string" }, "created_at": { "type": "string" }, "description": { "type": "string" }, "followers": { "type": "integer" }, "fork": { "type": "boolean" }, "forks": { "type": "integer" }, "has_downloads": { "type": "boolean" }, "has_issues": { "type": "boolean" }, "has_wiki": { "type": "boolean" }, "homepage": { "type": "string" }, "language": { "type": "string" }, "name": { "type": "string" }, "open_issues": { "type": "integer" }, "owner": { "type": "string" }, "private": { "type": "boolean" }, "pushed": { "type": "string" }, "pushed_at": { "type": "string" }, "score": { "type": "number" }, "size": { "type": "integer" }, "type": { "type": "string" }, "url": { "type": "string" }, "username": { "type": "string" }, "watchers": { "type": "integer" } }, "type": "object" }, "type": "array" } }, "type": "object" }, "search-user-by-email": { "properties": { "user": { "properties": { "blog": { "type": "string" }, "company": { "type": "string" }, "created": { "type": "string" }, "created_at": { "type": "string" }, "email": { "type": "string" }, "followers_count": { "type": "integer" }, "following_count": { "type": "integer" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "location": { "type": "string" }, "login": { "type": "string" }, "name": { "type": "string" }, "public_gist_count": { "type": "integer" }, "public_repo_count": { "type": "integer" }, "type": { "type": "string" } }, "type": "object" } }, "type": "object" }, "search-users": { "properties": { "items": { "items": { "properties": { "avatar_url": { "type": "string" }, "followers_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "organizations_url": { "type": "string" }, "received_events_url": { "type": "string" }, "repos_url": { "type": "string" }, "score": { "type": "number" }, "subscriptions_url": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "total_count": { "type": "integer" } }, "type": "object" }, "search-users-by-keyword": { "properties": { "users": { "items": { "properties": { "created": { "type": "string" }, "created_at": { "type": "string" }, "followers": { "type": "integer" }, "followers_count": { "type": "integer" }, "fullname": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "string" }, "language": { "type": "string" }, "location": { "type": "string" }, "login": { "type": "string" }, "name": { "type": "string" }, "public_repo_count": { "type": "integer" }, "repos": { "type": "integer" }, "score": { "type": "number" }, "type": { "type": "string" }, "username": { "type": "string" } }, "type": "object" }, "type": "array" } }, "type": "object" }, "stargazers": { "items": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "subscribition": { "properties": { "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "ignored": { "type": "boolean" }, "reason": { "type": "string" }, "repository_url": { "type": "string" }, "subscribed": { "type": "boolean" }, "url": { "type": "string" } }, "type": "object" }, "subscribitionBody": { "properties": { "ignored": { "type": "boolean" }, "subscribed": { "type": "boolean" } }, "type": "object" }, "subscription": { "properties": { "created_at": { "type": "string" }, "ignored": { "type": "boolean" }, "reason": { "type": "boolean" }, "subscribed": { "type": "boolean" }, "thread_url": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "tag": { "properties": { "message": { "type": "string" }, "object": { "properties": { "sha": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "sha": { "type": "string" }, "tag": { "type": "string" }, "tagger": { "properties": { "date": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "url": { "type": "string" } }, "type": "object" }, "tags": { "properties": { "message": { "description": "String of the tag message.", "type": "string" }, "object": { "description": "String of the SHA of the git object this is tagging.", "type": "string" }, "tag": { "type": "string" }, "tagger": { "properties": { "date": { "description": "Timestamp of when this object was tagged.", "type": "string" }, "email": { "description": "String of the email of the author of the tag.", "type": "string" }, "name": { "description": "String of the name of the author of the tag.", "type": "string" } }, "type": "object" }, "type": { "description": "String of the type of the object we’re tagging. Normally this is a commit but it can also be a tree or a blob.", "type": "string" } }, "required": [ "tag", "message", "object", "type", "tagger" ], "type": "object" }, "team": { "properties": { "id": { "type": "integer" }, "members_count": { "type": "integer" }, "name": { "type": "string" }, "permission": { "type": "string" }, "repos_count": { "type": "integer" }, "url": { "type": "string" } }, "type": "object" }, "teamMembership": { "properties": { "state": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "teamRepos": { "items": { "properties": { "clone_url": { "type": "string" }, "created_at": { "type": "string" }, "description": { "type": "string" }, "fork": { "type": "boolean" }, "forks": { "type": "integer" }, "forks_count": { "type": "integer" }, "full_name": { "type": "string" }, "git_url": { "type": "string" }, "homepage": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "language": { "type": "null" }, "master_branch": { "type": "string" }, "mirror_url": { "type": "string" }, "name": { "type": "string" }, "open_issues": { "type": "integer" }, "open_issues_count": { "type": "integer" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "private": { "type": "boolean" }, "pushed_at": { "type": "string" }, "size": { "type": "integer" }, "ssh_url": { "type": "string" }, "svn_url": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" }, "watchers": { "type": "integer" }, "watchers_count": { "type": "integer" } }, "type": "object" }, "type": "array" }, "teams": { "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "teams-list": { "items": { "properties": { "id": { "type": "integer" }, "members_count": { "type": "integer" }, "name": { "type": "string" }, "organization": { "properties": { "avatar_url": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "permission": { "type": "string" }, "repos_count": { "type": "integer" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "tree": { "properties": { "sha": { "type": "string" }, "tree": { "items": { "properties": { "mode": { "type": "string" }, "path": { "type": "string" }, "sha": { "type": "string" }, "size": { "type": "integer" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "url": { "type": "string" } }, "type": "object" }, "trees": { "properties": { "base_tree": { "type": "string" }, "sha": { "description": "SHA1 checksum ID of the object in the tree.", "type": "string" }, "tree": { "items": { "properties": { "mode": { "description": "One of 100644 for file (blob), 100755 for executable (blob), 040000 for subdirectory (tree), 160000 for submodule (commit) or 120000 for a blob that specifies the path of a symlink.", "enum": [ "100644", "100755", "040000", "160000", "120000" ], "type": "string" }, "path": { "type": "string" }, "sha": { "description": "SHA1 checksum ID of the object in the tree.", "type": "string" }, "type": { "enum": [ "blob", "tree", "commit" ], "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "url": { "type": "string" } }, "type": "object" }, "user": { "properties": { "avatar_url": { "type": "string" }, "bio": { "type": "string" }, "blog": { "type": "string" }, "collaborators": { "type": "integer" }, "company": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "disk_usage": { "type": "integer" }, "email": { "type": "string" }, "followers": { "type": "integer" }, "following": { "type": "integer" }, "gravatar_id": { "type": "string" }, "hireable": { "type": "boolean" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "location": { "type": "string" }, "login": { "type": "string" }, "name": { "type": "string" }, "owned_private_repos": { "type": "integer" }, "plan": { "properties": { "collaborators": { "type": "integer" }, "name": { "type": "string" }, "private_repos": { "type": "integer" }, "space": { "type": "integer" } }, "type": "object" }, "private_gists": { "type": "integer" }, "public_gists": { "type": "integer" }, "public_repos": { "type": "integer" }, "total_private_repos": { "type": "integer" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "user-emails": { "items": { "type": "string" }, "type": "array" }, "user-emails_final": { "items": {}, "type": "array" }, "user-keys": { "items": {}, "type": "array" }, "user-keys-keyId": { "properties": { "id": { "type": "integer" }, "key": { "type": "string" }, "title": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "user-keys-post": { "properties": { "key": { "type": "string" }, "title": { "type": "string" } }, "type": "object" }, "user-update": { "properties": { "bio": { "type": "string" }, "blog": { "type": "string" }, "company": { "type": "string" }, "email": { "type": "string" }, "hireable": { "type": "boolean" }, "location": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "user-userId": { "properties": { "avatar_url": { "type": "string" }, "bio": { "type": "string" }, "blog": { "type": "string" }, "company": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "email": { "description": "Note: The returned email is the user’s publicly visible email address (or null if the user has not specified a public email address in their profile).", "type": "string" }, "followers": { "type": "integer" }, "following": { "type": "integer" }, "gravatar_id": { "type": "string" }, "hireable": { "type": "boolean" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "location": { "type": "string" }, "login": { "type": "string" }, "name": { "type": "string" }, "public_gists": { "type": "integer" }, "public_repos": { "type": "integer" }, "type": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "user-userId-starred": { "items": {}, "type": "array" }, "user-userId-subscribitions": { "items": { "properties": { "clone_url": { "type": "string" }, "created_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "description": { "type": "string" }, "fork": { "type": "boolean" }, "forks": { "type": "integer" }, "forks_count": { "type": "integer" }, "full_name": { "type": "string" }, "git_url": { "type": "string" }, "homepage": { "type": "string" }, "html_url": { "type": "string" }, "id": { "type": "integer" }, "language": { "type": "string" }, "master_branch": { "type": "integer" }, "mirror_url": { "type": "string" }, "name": { "type": "string" }, "open_issues": { "type": "integer" }, "open_issues_count": { "type": "integer" }, "owner": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "private": { "type": "boolean" }, "pushed_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "size": { "type": "integer" }, "ssh_url": { "type": "string" }, "svn_url": { "type": "string" }, "updated_at": { "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", "type": "string" }, "url": { "type": "string" }, "watchers": { "type": "integer" }, "watchers_count": { "type": "integer" } } }, "type": "array" }, "users": { "items": { "properties": { "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "id": { "type": "integer" }, "login": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" }, "users-userId-keys": { "items": {}, "type": "array" }, "users-userId-orgs": { "items": {}, "type": "array" } } } validate-0.24.0/fixtures/go-swagger/bugs/822/000077500000000000000000000000001457312750000205605ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/822/swagger.yml000066400000000000000000000051221457312750000227420ustar00rootroot00000000000000--- swagger: "2.0" info: description: "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters." version: "1.0.0" title: "Swagger Petstore" termsOfService: "http://swagger.io/terms/" contact: email: "apiteam@swagger.io" license: name: "Apache 2.0" url: "http://www.apache.org/licenses/LICENSE-2.0.html" host: "petstore.swagger.io" basePath: "/v2" tags: - name: "pet" description: "Everything about your Pets" externalDocs: description: "Find out more" url: "http://swagger.io" schemes: - "http" paths: /pet: post: tags: - "pet" summary: "Add a new pet to the store" description: "" operationId: "addPet" consumes: - "application/json" - "application/xml" produces: - "application/xml" - "application/json" parameters: - in: "body" name: "body" description: "Pet object that needs to be added to the store" required: true schema: $ref: "#/definitions/Pet" responses: 405: description: "Invalid input" securityDefinitions: api_key: type: "apiKey" name: "api_key" in: "header" definitions: Category: type: "object" properties: id: type: "integer" format: "int64" name: type: "string" xml: name: "Category" Tag: type: "object" properties: id: type: "integer" format: "int64" name: type: "string" xml: name: "Tag" Pet: additionalProperties: true type: "object" required: - "name" - "photoUrls" properties: id: type: "integer" format: "int64" category: $ref: "#/definitions/Category" name: type: "string" example: "doggie" photoUrls: type: "array" xml: name: "photoUrl" wrapped: true items: type: "string" tags: type: "array" xml: name: "tag" wrapped: true items: $ref: "#/definitions/Tag" status: type: "string" description: "pet status in the store" enum: - "available" - "pending" - "sold" xml: name: "Pet" externalDocs: description: "Find out more about Swagger" url: "http://swagger.io" validate-0.24.0/fixtures/go-swagger/bugs/825/000077500000000000000000000000001457312750000205635ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/825/swagger.yml000066400000000000000000000001741457312750000227470ustar00rootroot00000000000000--- swagger: '2.0' info: version: 0.0.0 title: Simple API paths: /: responses: 200: description: OK validate-0.24.0/fixtures/go-swagger/bugs/84/000077500000000000000000000000001457312750000205005ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/84/swagger.yml000066400000000000000000000065301457312750000226660ustar00rootroot00000000000000swagger: '2.0' info: version: 0.0.0 title: 'AttendList' description: | AttendList service. contact: name: API Support url: http://attendlist.co/support email: contact@evecon.co consumes: - application/json produces: - application/json definitions: Event: title: Event type: object properties: Id: type: integer format: int64 readOnly: true Version: type: integer format: int64 readOnly: true Created: type: integer format: int64 readOnly: true Updated: type: integer format: int64 readOnly: true Deleted: type: boolean readOnly: true StartDate: type: string format: date-time EndDate: type: string format: date-time Latitude: type: number format: float Longitude: type: number format: float Name: type: string URL: type: string Notes: type: string Autosearch: type: boolean example: StartDate: "2015-11-01T12:00:00Z" EndDate: "2015-11-05T12:00:00Z" Latitude: 59.842609 Longitude: 30.319087 Name: "Bikers meeting" URL: "http://attendlist.co" Notes: "Yet another bikers meeting" Autosearch: false paths: /events: get: description: Get events. tags: - events operationId: getEvents responses: default: description: Generic Error '200': description: Successful response schema: title: ArrayOfEvents type: array items: $ref: '#/definitions/Event' post: description: Create new event. tags: - events operationId: postEvent parameters: - name: Event in: body description: New events required: true schema: $ref: '#/definitions/Event' responses: default: description: Generic Error '201': description: | Successful response. 'Location' header with link to /events/{id} containing new ID. /events/{id}: parameters: - name: id in: path description: Existing event id. required: true type: integer format: int64 get: description: Get event by id. tags: - events operationId: getEventById responses: default: description: Generic Error '200': description: Successful response schema: title: Newly created event $ref: '#/definitions/Event' put: description: Update existing event. tags: - events operationId: putEventById parameters: - name: Event in: body description: Existing event required: true schema: $ref: '#/definitions/Event' responses: default: description: Generic Error '204': description: Successful response delete: description: Delete event by id. tags: - events operationId: deleteEventById responses: default: description: Generic Error '204': description: Successful response validate-0.24.0/fixtures/go-swagger/bugs/844/000077500000000000000000000000001457312750000205645ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/844/swagger.json000066400000000000000000000014041457312750000231150ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "title": "anyOf bug", "version": "0.0.1", "description": "repro", "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "definitions": { "foo": { "type": "object" }, "bar": { "type": "object" } }, "paths": { "/": { "get": { "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/foo" }, { "$ref": "#/definitions/bar" } ] } } } } } } } validate-0.24.0/fixtures/go-swagger/bugs/846/000077500000000000000000000000001457312750000205665ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/846/swagger.yml000066400000000000000000000012531457312750000227510ustar00rootroot00000000000000--- swagger: '2.0' info: version: 0.0.0 title: Test846 API description: a simple API to test issue 846 paths: /: get: operationId: getFoo responses: 200: description: OK schema: type: object properties: Foo: type: integer format: int64 404: description: NotFound schema: type: object properties: Message: type: string 500: description: Error schema: type: object properties: Message: type: string validate-0.24.0/fixtures/go-swagger/bugs/881/000077500000000000000000000000001457312750000205655ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/881/deep.yml000066400000000000000000000010111457312750000222160ustar00rootroot00000000000000--- swagger: '2.0' info: version: 0.0.0 title: Breaking API as described by emsa23 paths: /: get: operationId: getFoo responses: 200: $ref: '#/responses/200' responses: '200': description: ok headers: status: type: array items: type: array items: type: array items: type: string enum: - NEW - PUBLISHED - OPEN - FINISHED validate-0.24.0/fixtures/go-swagger/bugs/881/swagger.yml000066400000000000000000000006371457312750000227550ustar00rootroot00000000000000--- swagger: '2.0' info: version: 0.0.0 title: Breaking API as described by emsa23 paths: /: get: operationId: getFoo responses: 200: $ref: '#/responses/200' responses: '200': description: ok headers: status: type: array items: type: string enum: - NEW - PUBLISHED - OPEN - FINISHED validate-0.24.0/fixtures/go-swagger/bugs/890/000077500000000000000000000000001457312750000205655ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/890/path/000077500000000000000000000000001457312750000215215ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/890/path/health_check.yaml000066400000000000000000000001171457312750000250060ustar00rootroot00000000000000get: summary: Health Check responses: 200: description: Server OKvalidate-0.24.0/fixtures/go-swagger/bugs/890/swagger.yaml000066400000000000000000000003441457312750000231110ustar00rootroot00000000000000swagger: '2.0' info: title: Some API description: Some API version: "1.0.0" host: someapi.com schemes: - https basePath: /v1/ produces: - application/json paths: /health_check: $ref: ./path/health_check.yaml validate-0.24.0/fixtures/go-swagger/bugs/899/000077500000000000000000000000001457312750000205765ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/899/swagger.yml000066400000000000000000000003631457312750000227620ustar00rootroot00000000000000swagger: '2.0' info: title: api version: 1.0.0 consumes: - application/json produces: - application/json schemes: - http basePath: / paths: /trailingslashpath/: get: responses: 204: description: OK no content validate-0.24.0/fixtures/go-swagger/bugs/981/000077500000000000000000000000001457312750000205665ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/981/swagger.json000066400000000000000000000013421457312750000231200ustar00rootroot00000000000000{ "swagger": "2.0", "paths": {}, "definitions": { "User": { "description": "User - user model", "type": "object", "properties": { "first_name": { "type": "string", "x-go-name": "FirstName" }, "id": { "type": "string", "x-go-name": "ID" }, "last_name": { "type": "string", "x-go-name": "LastName" }, "user_type": { "description": "User type", "type": "integer", "format": "int64", "maximum": 5, "minimum": 1, "x-go-name": "Type" } }, "x-go-package": "github.com/go-swagger/go-swagger/fixtures/bugs/981" } } } validate-0.24.0/fixtures/go-swagger/bugs/982/000077500000000000000000000000001457312750000205675ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/982/swagger.yaml000066400000000000000000000725561457312750000231310ustar00rootroot00000000000000--- swagger: '2.0' ################################################################################ # API Information # ################################################################################ info: version: v1 title: Instagram API description: | The first version of the Instagram API is an exciting step forward towards making it easier for users to have open access to their data. We created it so that you can surface the amazing content Instagram users share every second, in fun and innovative ways. Build something great! Once you've [registered your client](http://instagram.com/developer/register/) it's easy to start requesting data from Instagram. All endpoints are only accessible via https and are located at `api.instagram.com`. For instance: you can grab the most popular photos at the moment by accessing the following URL with your client ID (replace CLIENT-ID with your own): ``` https://api.instagram.com/v1/media/popular?client_id=CLIENT-ID ``` You're best off using an access_token for the authenticated user for each endpoint, though many endpoints don't require it. In some cases an access_token will give you more access to information, and in all cases, it means that you are operating under a per-access_token limit vs. the same limit for your single client_id. ## Limits Be nice. If you're sending too many requests too quickly, we'll send back a `503` error code (server unavailable). You are limited to 5000 requests per hour per `access_token` or `client_id` overall. Practically, this means you should (when possible) authenticate users so that limits are well outside the reach of a given user. ## Deleting Objects We do our best to have all our URLs be [RESTful](http://en.wikipedia.org/wiki/Representational_state_transfer). Every endpoint (URL) may support one of four different http verbs. GET requests fetch information about an object, POST requests create objects, PUT requests update objects, and finally DELETE requests will delete objects. Since many old browsers don't support PUT or DELETE, we've made it easy to fake PUTs and DELETEs. All you have to do is do a POST with _method=PUT or _method=DELETE as a parameter and we will treat it as if you used PUT or DELETE respectively. ## Structure ### The Envelope Every response is contained by an envelope. That is, each response has a predictable set of keys with which you can expect to interact: ```json { "meta": { "code": 200 }, "data": { ... }, "pagination": { "next_url": "...", "next_max_id": "13872296" } } ``` #### META The meta key is used to communicate extra information about the response to the developer. If all goes well, you'll only ever see a code key with value 200. However, sometimes things go wrong, and in that case you might see a response like: ```json { "meta": { "error_type": "OAuthException", "code": 400, "error_message": "..." } } ``` #### DATA The data key is the meat of the response. It may be a list or dictionary, but either way this is where you'll find the data you requested. #### PAGINATION Sometimes you just can't get enough. For this reason, we've provided a convenient way to access more data in any request for sequential data. Simply call the url in the next_url parameter and we'll respond with the next set of data. ```json { ... "pagination": { "next_url": "https://api.instagram.com/v1/tags/puppy/media/recent?access_token=fb2e77d.47a0479900504cb3ab4a1f626d174d2d&max_id=13872296", "next_max_id": "13872296" } } ``` On views where pagination is present, we also support the "count" parameter. Simply set this to the number of items you'd like to receive. Note that the default values should be fine for most applications - but if you decide to increase this number there is a maximum value defined on each endpoint. ### JSONP If you're writing an AJAX application, and you'd like to wrap our response with a callback, all you have to do is specify a callback parameter with any API call: ``` https://api.instagram.com/v1/tags/coffee/media/recent?access_token=fb2e77d.47a0479900504cb3ab4a1f626d174d2d&callback=callbackFunction ``` Would respond with: ```js callbackFunction({ ... }); ``` termsOfService: http://instagram.com/about/legal/terms/api ################################################################################ # Host, Base Path, Schemes and Content Types # ################################################################################ host: api.instagram.com basePath: /v1 schemes: - https produces: - application/json consumes: - application/json ################################################################################ # Tags # ################################################################################ tags: - name: Users - name: Relationships description: | Relationships are expressed using the following terms: **outgoing_status**: Your relationship to the user. Can be "follows", "requested", "none". **incoming_status**: A user's relationship to you. Can be "followed_by", "requested_by", "blocked_by_you", "none". - name: Media description: | At this time, uploading via the API is not possible. We made a conscious choice not to add this for the following reasons: * Instagram is about your life on the go – we hope to encourage photos from within the app. * We want to fight spam & low quality photos. Once we allow uploading from other sources, it's harder to control what comes into the Instagram ecosystem. All this being said, we're working on ways to ensure users have a consistent and high-quality experience on our platform. - name: Commnts - name: Likes - name: Tags - name: Location - name: Subscribtions ################################################################################ # Security # ################################################################################ securityDefinitions: oauth: type: oauth2 flow: implicit authorizationUrl: https://instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=token scopes: basic: | to read any and all data related to a user (e.g. following/followed-by lists, photos, etc.) (granted by default) comments: to create or delete comments on a user’s behalf relationships: to follow and unfollow users on a user’s behalf likes: to like and unlike items on a user’s behalf key: type: apiKey in: query name: access_token security: - oauth: - basic - comments - relationships - likes - key: [] ################################################################################ # Parameters # ################################################################################ parameters: user-id: name: user-id in: path description: The user identifier number type: number required: true tag-name: name: tag-name in: path description: Tag name type: string required: true ################################################################################ # Paths # ################################################################################ paths: /users/{user-id}: parameters: - $ref: '#/parameters/user-id' get: security: - key: [] - oauth: - basic tags: - Users description: Get basic information about a user. responses: 200: description: The user object schema: type: object properties: data: $ref: '#/definitions/User' /users/self/feed: get: tags: - Users description: See the authenticated user's feed. parameters: - name: count in: query description: Count of media to return. type: integer - name: max_id in: query description: Return media earlier than this max_id.s type: integer - name: min_id in: query description: Return media later than this min_id. type: integer responses: 200: description: OK schema: type: object properties: data: type: array items: $ref: '#/definitions/Media' /users/{user-id}/media/recent: parameters: - $ref: '#/parameters/user-id' get: tags: - Users responses: 200: description: | Get the most recent media published by a user. To get the most recent media published by the owner of the access token, you can use `self` instead of the `user-id`. schema: type: object properties: data: type: array items: $ref: '#/definitions/Media' parameters: - name: count in: query description: Count of media to return. type: integer - name: max_timestamp in: query description: Return media before this UNIX timestamp. type: integer - name: min_timestamp in: query description: Return media after this UNIX timestamp. type: integer - name: min_id in: query description: Return media later than this min_id. type: string - name: max_id in: query description: Return media earlier than this max_id. type: string /users/self/media/liked: get: tags: - Users description: | See the list of media liked by the authenticated user. Private media is returned as long as the authenticated user has permissionto view that media. Liked media lists are only available for the currently authenticated user. responses: 200: description: OK schema: type: object properties: data: type: array items: $ref: '#/definitions/Media' parameters: - name: count in: query description: Count of media to return. type: integer - name: max_like_id in: query description: Return media liked before this id. type: integer /users/search: get: tags: - Users description: Search for a user by name. parameters: - name: q in: query description: A query string type: string required: true - name: count in: query description: Number of users to return. type: string responses: 200: description: OK schema: type: object properties: data: type: array items: $ref: '#/definitions/MiniProfile' /users/{user-id}/follows: parameters: - $ref: '#/parameters/user-id' get: tags: - Relationships description: Get the list of users this user follows. responses: 200: description: OK schema: properties: data: type: array items: $ref: '#/definitions/MiniProfile' /users/{user-id}/followed-by: parameters: - $ref: '#/parameters/user-id' get: tags: - Relationships description: Get the list of users this user is followed by. responses: 200: description: OK schema: properties: data: type: array items: $ref: '#/definitions/MiniProfile' /users/self/requested-by: get: tags: - Relationships description: | List the users who have requested this user's permission to follow. responses: 200: description: OK schema: properties: meta: properties: code: type: integer data: type: array items: $ref: '#/definitions/MiniProfile' /users/{user-id}/relationship: parameters: - $ref: '#/parameters/user-id' post: tags: - Relationships description: | Modify the relationship between the current user and thetarget user. security: - oauth: - relationships parameters: - name: action in: body description: One of follow/unfollow/block/unblock/approve/ignore. schema: type: string enum: - follow - unfollow - block - unblock - approve responses: 200: description: OK schema: properties: data: type: array items: $ref: '#/definitions/MiniProfile' /media/{media-id}: parameters: - name: media-id in: path description: The media ID type: integer required: true get: tags: - Media description: | Get information about a media object. The returned type key will allow you to differentiate between `image` and `video` media. Note: if you authenticate with an OAuth Token, you will receive the `user_has_liked` key which quickly tells you whether the current user has liked this media item. responses: 200: description: OK schema: $ref: '#/definitions/Media' /media1/{shortcode}: #FIXME: correct path is /media/{shortcode} parameters: - name: shortcode in: path description: The media shortcode type: string required: true get: tags: - Media description: | This endpoint returns the same response as **GET** `/media/media-id`. A media object's shortcode can be found in its shortlink URL. An example shortlink is `http://instagram.com/p/D/` Its corresponding shortcode is D. responses: 200: description: OK schema: $ref: '#/definitions/Media' /media/search: get: tags: - Media description: | Search for media in a given area. The default time span is set to 5 days. The time span must not exceed 7 days. Defaults time stamps cover the last 5 days. Can return mix of image and video types. parameters: - name: LAT description: | Latitude of the center search coordinate. If used, lng is required. type: number in: query - name: MIN_TIMESTAMP description: | A unix timestamp. All media returned will be taken later than this timestamp. type: integer in: query - name: LNG description: | Longitude of the center search coordinate. If used, lat is required. type: number in: query - name: MAX_TIMESTAMP description: | A unix timestamp. All media returned will be taken earlier than this timestamp. type: integer in: query - name: DISTANCE description: Default is 1km (distance=1000), max distance is 5km. type: integer maximum: 5000 default: 1000 in: query responses: 200: description: OK schema: type: object description: List of all media with added `distance` property properties: data: type: array items: allOf: - $ref: '#/definitions/Media' - properties: distance: type: number /media/popular: get: tags: - Media description: | Get a list of what media is most popular at the moment. Can return mix of image and video types. responses: 200: description: OK schema: type: object properties: data: type: array items: $ref: '#/definitions/Media' /media/{media-id}/comments: parameters: - name: media-id in: path description: Media ID type: integer required: true get: tags: - Comments description: | Get a list of recent comments on a media object. responses: 200: description: OK schema: properties: meta: properties: code: type: number data: type: array items: $ref: '#/definitions/Comment' post: tags: - Comments - Media description: | Create a comment on a media object with the following rules: * The total length of the comment cannot exceed 300 characters. * The comment cannot contain more than 4 hashtags. * The comment cannot contain more than 1 URL. * The comment cannot consist of all capital letters. security: - oauth: - comments parameters: - name: TEXT description: | Text to post as a comment on the media object as specified in media-id. in: body schema: type: number responses: 200: description: OK schema: type: object properties: meta: properties: code: type: number data: type: object delete: tags: - Comments description: | Remove a comment either on the authenticated user's media object or authored by the authenticated user. responses: 200: description: OK schema: type: object properties: meta: properties: code: type: number data: type: object /media/{media-id}/likes: parameters: - name: media-id in: path description: Media ID type: integer required: true get: tags: - Likes - Media description: | Get a list of users who have liked this media. responses: 200: description: OK schema: properties: meta: properties: code: type: number data: type: array items: $ref: '#/definitions/Like' post: tags: - Likes description: Set a like on this media by the currently authenticated user. security: - oauth: - comments responses: 200: description: OK schema: type: object properties: meta: properties: code: type: number data: type: object delete: tags: - Likes description: | Remove a like on this media by the currently authenticated user. responses: 200: description: OK schema: type: object properties: meta: properties: code: type: number data: type: object /tags/{tag-name}: parameters: - $ref: '#/parameters/tag-name' get: tags: - Tags description: Get information about a tag object. responses: 200: description: OK schema: $ref: '#/definitions/Tag' /tags/{tag-name}/media/recent: parameters: - $ref: '#/parameters/tag-name' get: tags: - Tags description: | Get a list of recently tagged media. Use the `max_tag_id` and `min_tag_id` parameters in the pagination response to paginate through these objects. responses: 200: description: OK schema: properties: data: type: array items: $ref: '#/definitions/Tag' /tags/search: get: tags: - Tags parameters: - name: q description: | A valid tag name without a leading #. (eg. snowy, nofilter) in: query type: string responses: 200: description: OK schema: type: object properties: meta: properties: code: type: integer data: type: array items: $ref: '#/definitions/Tag' /locations/{location-id}: parameters: - name: location-id description: Location ID in: path type: integer required: true get: tags: - Location description: Get information about a location. responses: 200: description: OK schema: type: object properties: data: $ref: '#/definitions/Location' /locations/{location-id}/media/recent: parameters: - name: location-id description: Location ID in: path type: integer required: true get: tags: - Location - Media description: Get a list of recent media objects from a given location. parameters: - name: max_timestamp in: query description: Return media before this UNIX timestamp. type: integer - name: min_timestamp in: query description: Return media after this UNIX timestamp. type: integer - name: min_id in: query description: Return media later than this min_id. type: string - name: max_id in: query description: Return media earlier than this max_id. type: string responses: 200: description: OK schema: type: object properties: data: type: array items: $ref: '#/definitions/Media' /locations/search: get: tags: - Location description: Search for a location by geographic coordinate. parameters: - name: distance in: query description: Default is 1000m (distance=1000), max distance is 5000. type: integer - name: facebook_places_id in: query description: | Returns a location mapped off of a Facebook places id. If used, a Foursquare id and lat, lng are not required. type: integer - name: foursquare_id in: query description: | returns a location mapped off of a foursquare v1 api location id. If used, you are not required to use lat and lng. Note that this method is deprecated; you should use the new foursquare IDs with V2 of their API. type: integer - name: lat in: query description: | atitude of the center search coordinate. If used, lng is required. type: number - name: lng in: query description: | ongitude of the center search coordinate. If used, lat is required. type: number - name: foursquare_v2_id in: query description: | Returns a location mapped off of a foursquare v2 api location id. If used, you are not required to use lat and lng. type: integer responses: 200: description: OK schema: type: object properties: data: type: array items: $ref: '#/definitions/Location' /geographies/{geo-id}/media/recent: parameters: - name: geo-id in: path description: Geolocation ID type: integer required: true get: description: | Get recent media from a geography subscription that you created. **Note**: You can only access Geographies that were explicitly created by your OAuth client. Check the Geography Subscriptions section of the [real-time updates page](https://instagram.com/developer/realtime/). When you create a subscription to some geography that you define, you will be returned a unique geo-id that can be used in this query. To backfill photos from the location covered by this geography, use the [media search endpoint ](https://instagram.com/developer/endpoints/media/). parameters: - name: count in: query description: Max number of media to return. type: integer - name: min_id in: query description: Return media before this `min_id`. type: integer responses: 200: description: OK ################################################################################ # Definitions # ################################################################################ definitions: User: type: object properties: id: type: integer username: type: string full_name: type: string profile_picture: type: string bio: type: string website: type: string counts: type: object properties: media: type: integer follows: type: integer follwed_by: type: integer Media: type: object properties: created_time: description: Epoc time (ms) type: integer type: type: string filter: type: string tags: type: array items: $ref: '#/definitions/Tag' id: type: integer user: $ref: '#/definitions/MiniProfile' users_in_photo: type: array items: $ref: '#/definitions/MiniProfile' location: $ref: '#/definitions/Location' comments:: type: object properties: count: type: integer data: type: array items: $ref: '#/definitions/Comment' likes: type: object properties: count: type: integer data: type: array items: $ref: '#/definitions/MiniProfile' images: properties: low_resolution: $ref: '#/definitions/Image' thumbnail: $ref: '#/definitions/Image' standard_resolution: $ref: '#/definitions/Image' videos: properties: low_resolution: $ref: '#/definitions/Image' standard_resolution: $ref: '#/definitions/Image' Location: type: object properties: id: type: string name: type: string latitude: type: number longitude: type: number Comment: type: object properties: id: type: string created_time: type: string text: type: string from: $ref: '#/definitions/MiniProfile' Like: type: object properties: user_name: type: string first_name: type: string # x-go-name: NoName last_name: type: string type: type: string id: type: string Tag: type: object properties: media_count: type: integer name: type: string Image: type: object properties: width: type: integer height: type: integer url: type: string MiniProfile: type: object description: A shorter version of User for likes array properties: user_name: type: string full_name: type: string id: type: integer profile_picture: type: string validate-0.24.0/fixtures/go-swagger/bugs/987/000077500000000000000000000000001457312750000205745ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/bugs/987/swagger.yml000066400000000000000000000013771457312750000227660ustar00rootroot00000000000000--- swagger: '2.0' info: version: 1.0.0 title: Greeting Server basePath: "/api/greeting/2.0" paths: /revisit: post: produces: - application/json consumes: - application/json parameters: - name: site required: true type: string in: query description: site name - name: userlist in: body description: list of users required: true schema: "$ref": "#/definitions/Userlist" operationId: trackingRevisit responses: 200: description: return list of users which need revisit schema: type: string definitions: Userlist: type: array items: type: object validate-0.24.0/fixtures/go-swagger/canary/000077500000000000000000000000001457312750000205625ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/canary/bitbucket.org/000077500000000000000000000000001457312750000233245ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/canary/bitbucket.org/swagger.json000066400000000000000000007422251457312750000256720ustar00rootroot00000000000000{ "info": { "termsOfService": "https://www.atlassian.com/end-user-agreement", "version": "2.0", "contact": { "url": "https://bitbucket.org/support", "name": "Bitbucket Support", "email": "support@bitbucket.org" }, "description": "Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework.", "title": "Bitbucket API" }, "paths": { "/repositories/{username}/{repo_slug}/refs/branches/{name}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "name", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "refs" ] } }, "/teams/{username}/following": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "account" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the list of accounts this team is following.", "responses": { "200": { "description": "A paginated list of user objects.", "schema": { "$ref": "#/definitions/paginated_users" } }, "404": { "description": "If no team exists for the specified name, or if the specified account is a personal account, not a team account.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The team's username", "name": "username", "in": "path" } ], "tags": [ "teams" ] } }, "/repositories/{username}/{repo_slug}/commit/{sha}/comments/{comment_id}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "sha", "in": "path" }, { "required": true, "type": "string", "name": "comment_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified commit comment.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] } }, "/repositories/{username}/{repo_slug}/hooks": { "post": { "security": [ { "oauth2": [ "webhook" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Creates a new webhook on the specified repository.", "responses": { "201": { "description": "If the webhook was registered successfully.", "schema": { "$ref": "#/definitions/webhook_subscription" } }, "403": { "description": "If the authenticated user does not have permission to install webhooks on the specified repository.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "webhooks" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "webhook" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a paginated list of webhooks installed on this repository.", "responses": { "200": { "description": "The paginated list of installed webhooks.", "schema": { "$ref": "#/definitions/paginated_webhook_subscriptions" } }, "403": { "description": "If the authenticated user does not have permission to access the webhooks.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "webhooks" ] } }, "/repositories/{username}/{repo_slug}/issues/{issue_id}/attachments/{path}": { "delete": { "security": [ { "oauth2": [ "issue:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes an attachment.", "responses": { "401": { "description": "If the issue tracker is private and the request was not authenticated." }, "404": { "description": "If the specified repository, issue, or attachment does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "Indicates that the deletion was successful" } }, "parameters": [], "tags": [ "issue_tracker" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "issue_id", "in": "path" }, { "required": true, "type": "string", "name": "path", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the contents of the specified file attachment.\n\nNote that this endpoint does not return a JSON response, but instead\nreturns a redirect pointing to the actual file that in turn will return\nthe raw contents.\n\nThe redirect URL contains a one-time token that has a limited lifetime.\nAs a result, the link should not be persisted, stored, or shared.", "responses": { "401": { "description": "If the issue tracker is private and the request was not authenticated." }, "404": { "description": "If the specified repository or issue does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } }, "302": { "headers": { "Location": { "type": "string" } }, "description": "A redirect to the file's contents" } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/versions/{version_id}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "version_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified issue tracker version object.", "responses": { "200": { "description": "The specified version object.", "schema": { "$ref": "#/definitions/version" } }, "404": { "description": "If the specified repository or version does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The version's id", "name": "version_id", "in": "path" } ], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/issues/{issue_id}/vote": { "put": { "security": [ { "oauth2": [ "issue", "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Vote for this issue.\n\nTo cast your vote, do an empty PUT. The 204 status code indicates that\nthe operation was successful.", "responses": { "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "When the issue does not exist, the repo does not exist, or when the repos does not have an issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "Indicating the authenticated user has cast their vote successfully.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] }, "delete": { "security": [ { "oauth2": [ "issue:write", "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Retract your vote.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "issue_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue", "account" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Check whether the authenticated user has voted for this issue.\nA 204 status code indicates that the user has voted, while a 404\nimplies they haven't.", "responses": { "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the authenticated user has not voted for this issue, or when the repo does not exist, or does not have an issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "If the authenticated user has not voted for this issue.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/milestones": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the milestones that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", "responses": { "200": { "description": "The milestones that have been defined in the issue tracker.", "schema": { "$ref": "#/definitions/paginated_milestones" } }, "404": { "description": "If the specified repository does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/components": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the components that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", "responses": { "200": { "description": "The components that have been defined in the issue tracker.", "schema": { "$ref": "#/definitions/paginated_components" } }, "404": { "description": "If the specified repository does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/account/{username}/addons/{encoded_context_id}/refresh": { "put": { "security": [ { "oauth2": [ "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_context_id", "in": "path" } ] }, "/addon/linkers/{linker_key}/values": { "put": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "post": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "delete": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "parameters": [ { "required": true, "type": "string", "name": "linker_key", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] } }, "/repositories/{username}/{repo_slug}/refs/branches": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "refs" ] } }, "/hook_events/{subject_type}": { "parameters": [ { "required": true, "type": "string", "name": "subject_type", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a paginated list of all valid webhook events for the\nspecified entity.\n\nThis is public data that does not require any scopes or authentication.", "responses": { "200": { "description": "A paginated list of webhook types available to subscribe on.", "schema": { "$ref": "#/definitions/paginated_hook_events" } }, "404": { "description": "If an invalid `{subject_type}` value was specified.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "enum": [ "user", "repository", "team" ], "name": "subject_type", "required": true, "in": "path", "type": "string", "description": "A resource or subject type." } ], "tags": [ "webhooks" ] } }, "/users/{username}/followers": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the list of accounts that are following this team.", "responses": { "200": { "description": "A paginated list of user objects.", "schema": { "$ref": "#/definitions/paginated_users" } }, "404": { "description": "If no account exists for the specified name, or if the specified account is a team account, not a personal account.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The account's username", "name": "username", "in": "path" } ], "tags": [ "users" ] } }, "/repositories/{username}/{repo_slug}/default-reviewers": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the repository's default reviewers.\n\nThese are the users that are automatically added as reviewers on every\nnew pull request that is created.", "responses": { "200": { "description": "The paginated list of default reviewers" } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/repositories/{username}/{repo_slug}/downloads/{filename}": { "delete": { "security": [ { "oauth2": [ "repository:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes the specified download artifact from the repository.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "downloads" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "filename", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Return a redirect to the contents of a download artifact.\n\nThis endpoint returns the actual file contents and not the artifact's\nmetadata.\n\n $ curl -s -L https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads/hello.txt\n Hello World", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "downloads" ] } }, "/repositories/{username}/{repo_slug}/commit/{node}/statuses/build/{key}": { "put": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "node", "in": "path" }, { "required": true, "type": "string", "name": "key", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [] } }, "/repositories/{username}/{repo_slug}/watchers": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a paginated list of all the watchers on the specified\nrepository.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "repositories" ] } }, "/snippets/{username}/{encoded_id}/commits": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the changes (commits) made on this snippet.", "responses": { "200": { "description": "The paginated list of snippet commits.", "schema": { "$ref": "#/definitions/paginated_snippet_commit" } }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "snippets" ] } }, "/users/{username}/repositories": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "All repositories owned by a user/team. This includes private\nrepositories, but filtered down to the ones that the calling user has\naccess to.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "users", "teams" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/activity": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the pull request's activity log. This includes comments that\nwere made by the reviewers, updates and approvals.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/snippets/{username}/{encoded_id}/comments/{comment_id}": { "put": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Updates a comment.\n\nComments can only be updated by their author.", "responses": { "200": { "description": "The updated comment object." }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the comment or snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "snippets" ] }, "delete": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes a snippet comment.\n\nComments can only be removed by their author.", "responses": { "204": { "description": "Indicates the comment was deleted successfully." }, "403": { "description": "If the authenticated user is not the author of the comment.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the comment or the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "snippets" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" }, { "required": true, "type": "string", "name": "comment_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specific snippet comment.", "responses": { "200": { "description": "The specified comment.", "schema": { "$ref": "#/definitions/snippet_comment" } }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the comment or snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "snippets" ] } }, "/repositories/{username}/{repo_slug}/diff/{spec}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "spec", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] } }, "/repositories/{username}/{repo_slug}/branch-restrictions": { "post": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "branch_restrictions" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "branch_restrictions" ] } }, "/repositories/{username}/{repo_slug}/issues/{issue_id}/comments/{comment_id}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "issue_id", "in": "path" }, { "required": true, "type": "string", "name": "comment_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified issue comment object.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/hooks/{uid}": { "put": { "security": [ { "oauth2": [ "webhook" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Updates the specified webhook subscription.\n\nThe following properties can be mutated:\n\n* `description`\n* `url`\n* `active`\n* `events`", "responses": { "200": { "description": "The webhook subscription object.", "schema": { "$ref": "#/definitions/webhook_subscription" } }, "403": { "description": "If the authenticated user does not have permission to update the webhook.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the webhook or repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The installed webhook's id", "name": "uid", "in": "path" } ], "tags": [ "webhooks" ] }, "delete": { "security": [ { "oauth2": [ "webhook" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes the specified webhook subscription.", "responses": { "204": { "description": "When the webhook was deleted successfully", "schema": { "$ref": "#/definitions/webhook_subscription" } }, "403": { "description": "If the authenticated user does not have permission to delete the webhook.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the webhook or repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The installed webhook's id", "name": "uid", "in": "path" } ], "tags": [ "webhooks" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "uid", "in": "path" } ], "get": { "security": [ { "oauth2": [ "webhook" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the webhook installed on the specified repository.", "responses": { "200": { "description": "The webhook subscription object.", "schema": { "$ref": "#/definitions/webhook_subscription" } }, "404": { "description": "If the webhook or repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The installed webhook's id.", "name": "uid", "in": "path" } ], "tags": [ "webhooks" ] } }, "/users/{username}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "Gets the public information associated with a user account.\n\nIf the user's profile is private, `location`, `website` and\n`created_on` elements are omitted.", "responses": { "200": { "description": "The user object", "schema": { "$ref": "#/definitions/team" } }, "404": { "description": "If no user exists for the specified name or UUID, or if the specified account is a team account, not a personal account.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The account's username or UUID.", "name": "username", "in": "path" } ], "tags": [ "users" ] } }, "/snippets/{username}/{encoded_id}": { "put": { "responses": { "200": { "description": "The updated snippet object.", "schema": { "$ref": "#/definitions/snippet" } }, "401": { "description": "If the snippet is private and the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "403": { "description": "If authenticated user does not have permission to update the private snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet's id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ], "produces": [ "application/json", "multipart/related", "multipart/form-data" ], "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "consumes": [ "application/json", "multipart/related", "multipart/form-data" ], "description": "Used to update a snippet. Use this to add and delete files and to\nchange a snippet's title.\n\nTo update a snippet, one can either PUT a full snapshot, or only the\nparts that need to be changed.\n\nThe contract for PUT on this API is that properties missing from the\nrequest remain untouched so that snippets can be efficiently\nmanipulated with differential payloads.\n\nTo delete a property (e.g. the title, or a file), include its name in\nthe request, but omit its value (use `null`).\n\nAs in Git, explicit renaming of files is not supported. Instead, to\nrename a file, delete it and add it again under another name. This can\nbe done atomically in a single request. Rename detection is left to\nthe SCM.\n\nPUT supports three different content types for both request and\nresponse bodies:\n\n* `application/json`\n* `multipart/related`\n* `multipart/form-data`\n\nThe content type used for the request body can be different than that\nused for the response. Content types are specified using standard HTTP\nheaders.\n\nUse the `Content-Type` and `Accept` headers to select the desired\nrequest and response format.\n\n\napplication/json\n----------------\n\nAs with creation and retrieval, the content type determines what\nproperties can be manipulated. `application/json` does not support\nfile contents and is therefore limited to a snippet's meta data.\n\nTo update the title, without changing any of its files:\n\n $ curl -X POST -H \"Content-Type: application/json\" https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d '{\"title\": \"Updated title\"}'\n\n\nTo delete the title:\n\n $ curl -X POST -H \"Content-Type: application/json\" https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d '{\"title\": null}'\n\nNot all parts of a snippet can be manipulated. The owner and creator\nfor instance are immutable.\n\n\nmultipart/related\n-----------------\n\n`multipart/related` can be used to manipulate all of a snippet's\nproperties. The body is identical to a POST. properties omitted from\nthe request are left unchanged. Since the `start` part contains JSON,\nthe mechanism for manipulating the snippet's meta data is identical\nto `application/json` requests.\n\nTo update one of a snippet's file contents, while also changing its\ntitle:\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 288\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"title\": \"My updated snippet\",\n \"files\": {\n \"foo.txt\": {}\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"foo.txt\"\n Content-Disposition: attachment; filename=\"foo.txt\"\n\n Updated file contents.\n\n --===============1438169132528273974==--\n\nHere only the parts that are changed are included in the body. The\nother files remain untouched.\n\nNote the use of the `files` list in the JSON part. This list contains\nthe files that are being manipulated. This list should have\ncorresponding multiparts in the request that contain the new contents\nof these files.\n\nIf a filename in the `files` list does not have a corresponding part,\nit will be deleted from the snippet, as shown below:\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 188\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"files\": {\n \"image.png\": {}\n }\n }\n\n --===============1438169132528273974==--\n\nTo simulate a rename, delete a file and add the same file under\nanother name:\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 212\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"files\": {\n \"foo.txt\": {},\n \"bar.txt\": {}\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"bar.txt\"\n Content-Disposition: attachment; filename=\"bar.txt\"\n\n foo\n\n --===============1438169132528273974==--\n\n\nmultipart/form-data\n-----------------\n\nAgain, one can also use `multipart/form-data` to manipulate file\ncontents and meta data atomically.\n\n $ curl -X PUT http://localhost:12345/2.0/snippets/evzijst/kypj -F title=\"My updated snippet\" -F file=@foo.txt\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 351\n Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"file\"; filename=\"foo.txt\"\n Content-Type: text/plain\n\n foo\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"title\"\n\n My updated snippet\n ------------------------------63a4b224c59f\n\nTo delete a file, omit its contents while including its name in the\n`files` field:\n\n $ curl -X PUT https://api.bitbucket.org/2.0/snippets/evzijst/kypj -F files=image.png\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 149\n Content-Type: multipart/form-data; boundary=----------------------------ef8871065a86\n\n ------------------------------ef8871065a86\n Content-Disposition: form-data; name=\"files\"\n\n image.png\n ------------------------------ef8871065a86--\n\nThe explicit use of the `files` element in `multipart/related` and\n`multipart/form-data` is only required when deleting files.\nThe default mode of operation is for file parts to be processed,\nregardless of whether or not they are listed in `files`, as a\nconvenience to the client." }, "delete": { "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes a snippet and returns an empty response.", "responses": { "401": { "description": "If the snippet is private and the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "403": { "description": "If authenticated user does not have permission to delete the private snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "If the snippet was deleted successfully." } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet's id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" } ], "get": { "responses": { "200": { "description": "The snippet object.", "schema": { "$ref": "#/definitions/snippet" } }, "401": { "description": "If the snippet is private and the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "403": { "description": "If authenticated user does not have access to the private snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet's id.", "name": "encoded_id", "in": "path" } ], "produces": [ "application/json", "multipart/related", "multipart/form-data" ], "tags": [ "snippets" ], "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Retrieves a single snippet.\n\nSnippets support multiple content types:\n\n* application/json\n* multipart/related\n* multipart/form-data\n\n\napplication/json\n----------------\n\nThe default content type of the response is `application/json`.\nSince JSON is always `utf-8`, it cannot reliably contain file contents\nfor files that are not text. Therefore, JSON snippet documents only\ncontain the filename and links to the file contents.\n\nThis means that in order to retrieve all parts of a snippet, N+1\nrequests need to be made (where N is the number of files in the\nsnippet).\n\n\nmultipart/related\n-----------------\n\nTo retrieve an entire snippet in a single response, use the\n`Accept: multipart/related` HTTP request header.\n\n $ curl -H \"Accept: multipart/related\" https://api.bitbucket.org/2.0/snippets/evzijst/1\n\nResponse:\n\n HTTP/1.1 200 OK\n Content-Length: 2214\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/snippets/evzijst/kypj\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/comments\"\n },\n \"watchers\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/watchers\"\n },\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/commits\"\n }\n },\n \"id\": kypj,\n \"title\": \"My snippet\",\n \"created_on\": \"2014-12-29T22:22:04.790331+00:00\",\n \"updated_on\": \"2014-12-29T22:22:04.790331+00:00\",\n \"is_private\": false,\n \"files\": {\n \"foo.txt\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/foo.txt\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/snippets/evzijst/kypj#foo.txt\"\n }\n }\n },\n \"image.png\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/image.png\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/snippets/evzijst/kypj#image.png\"\n }\n }\n }\n ],\n \"owner\": {\n \"username\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/evzijst\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png\"\n }\n }\n },\n \"creator\": {\n \"username\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/evzijst\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png\"\n }\n }\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"foo.txt\"\n Content-Disposition: attachment; filename=\"foo.txt\"\n\n foo\n\n --===============1438169132528273974==\n Content-Type: image/png\n MIME-Version: 1.0\n Content-Transfer-Encoding: base64\n Content-ID: \"image.png\"\n Content-Disposition: attachment; filename=\"image.png\"\n\n iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m\n TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB\n cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5\n EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ\n 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN\n AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==\n --===============1438169132528273974==--\n\nmultipart/form-data\n-------------------\n\nAs with creating new snippets, `multipart/form-data` can be used as an\nalternative to `multipart/related`. However, the inherently flat\nstructure of form-data means that only basic, root-level properties\ncan be returned, while nested elements like `links` are omitted:\n\n $ curl -H \"Accept: multipart/form-data\" https://api.bitbucket.org/2.0/snippets/evzijst/kypj\n\nResponse:\n\n HTTP/1.1 200 OK\n Content-Length: 951\n Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"title\"\n Content-Type: text/plain; charset=\"utf-8\"\n\n My snippet\n ------------------------------63a4b224c59f--\n Content-Disposition: attachment; name=\"file\"; filename=\"foo.txt\"\n Content-Type: text/plain\n\n foo\n\n ------------------------------63a4b224c59f\n Content-Disposition: attachment; name=\"file\"; filename=\"image.png\"\n Content-Transfer-Encoding: base64\n Content-Type: application/octet-stream\n\n iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m\n TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB\n cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5\n EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ\n 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN\n AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==\n ------------------------------5957323a6b76--" } }, "/addon/linkers": { "parameters": [], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" }, { "required": true, "type": "string", "name": "comment_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a specific pull request comment.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/repositories/{username}/{repo_slug}/components/{component_id}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "component_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified issue tracker component object.", "responses": { "200": { "description": "The specified component object.", "schema": { "$ref": "#/definitions/component" } }, "404": { "description": "If the specified repository or component does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The component's id", "name": "component_id", "in": "path" } ], "tags": [ "issue_tracker" ] } }, "/addon": { "put": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "parameters": [], "delete": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] } }, "/users/{username}/following": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "account" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the list of accounts this user is following.", "responses": { "200": { "description": "A paginated list of user objects.", "schema": { "$ref": "#/definitions/paginated_users" } }, "404": { "description": "If no user exists for the specified name, or if the specified account is a team account, not a personal account.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The user's username", "name": "username", "in": "path" } ], "tags": [ "users" ] } }, "/repositories/{username}/{repo_slug}/issues/{issue_id}": { "delete": { "security": [ { "oauth2": [ "issue:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes the specified issue. This requires write access to the\nrepository.", "responses": { "200": { "description": "The issue object.", "schema": { "$ref": "#/definitions/issue" } }, "403": { "description": "When the authenticated user lacks isn't authorized to delete the issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the specified repository or issue does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "issue_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified issue.", "responses": { "200": { "description": "The issue object.", "schema": { "$ref": "#/definitions/issue" } }, "403": { "description": "When the authenticated user lacks isn't authorized to access the issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the specified repository or issue does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/teams/{username}/repositories": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "All repositories owned by a user/team. This includes private\nrepositories, but filtered down to the ones that the calling user has\naccess to.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "users", "teams" ] } }, "/repositories/{username}/{repo_slug}/downloads": { "post": { "security": [ { "oauth2": [ "repository:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Upload new download artifacts.\n\nTo upload files, perform a `multipart/form-data` POST containing one\nor more `files` fields:\n\n $ echo Hello World > hello.txt\n $ curl -s -u evzijst -X POST https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads -F files=@hello.txt\n\nWhen a file is uploaded with the same name as an existing artifact,\nthen the existing file will be replaced.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "downloads" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a list of download links associated with the repository.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "downloads" ] } }, "/repositories/{username}/{repo_slug}/refs": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "refs" ] } }, "/hook_events": { "parameters": [], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the webhook resource or subject types on which webhooks can\nbe registered.\n\nEach resource/subject type contains an `event` link that returns the\npaginated list of specific events each individual subject type can\nemit.\n\nThis endpoint is publicly accessible and does not require\nauthentication or scopes.", "responses": { "200": { "description": "A mapping of resource/subject types pointing to their individual event types.", "schema": { "$ref": "#/definitions/subject_types" } } }, "parameters": [], "tags": [ "webhooks" ] } }, "/teams/{username}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "Gets the public information associated with a team.\n\nIf the team's profile is private, `location`, `website` and\n`created_on` elements are omitted.", "responses": { "200": { "description": "The team object", "schema": { "$ref": "#/definitions/team" } }, "404": { "description": "If no team exists for the specified name or UUID, or if the specified account is a personal account, not a team account.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The team's username or UUID.", "name": "username", "in": "path" } ], "tags": [ "teams" ] } }, "/user/emails/{email}": { "parameters": [ { "required": true, "type": "string", "name": "email", "in": "path" } ], "get": { "security": [ { "oauth2": [ "email" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns details about a specific one of the authenticated user's\nemail addresses.\n\nDetails describe whether the address has been confirmed by the user and\nwhether it is the user's primary address or not.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "users" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/approve": { "post": { "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Approve the specified pull request as the authenticated user.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ], "delete": { "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Redact the authenticated user's approval of the specified pull\nrequest.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/repositories/{username}/{repo_slug}/patch/{spec}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "spec", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] } }, "/snippets/{username}/{encoded_id}/{node_id}/diff": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" }, { "required": true, "type": "string", "name": "node_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the diff of the specified commit against its first parent.\n\nNote that this resource is different in functionality from the `patch`\nresource.\n\nThe differences between a diff and a patch are:\n\n* patches have a commit header with the username, message, etc\n* diffs support the optional `path=foo/bar.py` query param to filter the\n diff to just that one file diff (not supported for patches)\n* for a merge, the diff will show the diff between the merge commit and\n its first parent (identical to how PRs work), while patch returns a\n response containing separate patches for each commit on the second\n parent's ancestry, up to the oldest common ancestor (identical to\n its reachability).\n\nNote that the character encoding of the contents of the diff is\nunspecified as Git and Mercurial do not track this, making it hard for\nBitbucket to reliably determine this.", "responses": { "200": { "description": "The raw diff contents." }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "type": "string", "description": "When used, only one the diff of the specified file will be returned.", "name": "path", "in": "query" }, { "required": true, "type": "string", "description": "The snippet id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ] } }, "/repositories/{username}/{repo_slug}/forks": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a paginated list of all the forks of the specified\nrepository.", "responses": { "200": { "description": "All forks.", "schema": { "$ref": "#/definitions/paginated_repositories" } } }, "parameters": [], "tags": [ "repositories" ] } }, "/repositories/{username}/{repo_slug}/issues": { "post": { "security": [ { "oauth2": [ "issue:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Creates a new issue.\n\nThis call requires authentication. Private repositories or private\nissue trackers require the caller to authenticate with an account that\nhas appropriate authorisation.\n\nThe authenticated user is used for the issue's `reporter` field.", "responses": { "201": { "headers": { "Location": { "type": "string", "description": "The (absolute) URL of the newly created issue." } }, "description": "The newly created issue.", "schema": { "$ref": "#/definitions/issue" } }, "403": { "description": "When the authenticated user lacks the privilege to create issues in the issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the specified repository or version does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } }, "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "schema": { "$ref": "#/definitions/issue" }, "required": true, "description": "The new issue. Note that the only required element is `title`. All other elements can be omitted from the body.", "name": "_body", "in": "body" } ], "tags": [ "issue_tracker" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the issues in the issue tracker.", "responses": { "200": { "description": "A paginated list of the issues matching any filter criteria that were provided.", "schema": { "$ref": "#/definitions/paginated_issues" } }, "404": { "description": "If the specified repository or version does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/issues/{issue_id}/attachments": { "post": { "security": [ { "oauth2": [ "issue:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Upload new issue attachments.\n\nTo upload files, perform a `multipart/form-data` POST containing one\nor more file fields.\n\nWhen a file is uploaded with the same name as an existing attachment,\nthen the existing file will be replaced.", "responses": { "400": { "description": "If no files were uploaded, or if the wrong `Content-Type` was used." }, "201": { "headers": { "Location": { "type": "string", "description": "The URL to the issue's collection of attachments." } }, "description": "An empty response document." }, "404": { "description": "If the specified repository or issue does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } }, "401": { "description": "If the issue tracker is private and the request was not authenticated." } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "issue_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all attachments for this issue.\n\nThis returns the files' meta data. This does not return the files'\nactual contents.\n\nThe files are always ordered by their upload date.", "responses": { "200": { "description": "A paginated list of all attachments for this issue.", "schema": { "$ref": "#/definitions/paginated_issue_attachments" } }, "401": { "description": "If the issue tracker is private and the request was not authenticated." }, "404": { "description": "If the specified repository or version does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/versions": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the versions that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", "responses": { "200": { "description": "The versions that have been defined in the issue tracker.", "schema": { "$ref": "#/definitions/paginated_versions" } }, "404": { "description": "If the specified repository does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/refs/tags/{name}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "name", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "refs" ] } }, "/snippets/{username}/{encoded_id}/watch": { "put": { "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Used to start watching a specific snippet. Returns 204 (No Content).", "responses": { "401": { "description": "If the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "Indicates the authenticated user is now watching the snippet.", "schema": { "$ref": "#/definitions/paginated_users" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ] }, "delete": { "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Used to stop watching a specific snippet. Returns 204 (No Content)\nto indicate success.", "responses": { "401": { "description": "If the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "Indicates the user stopped watching the snippet successfully.", "schema": { "$ref": "#/definitions/paginated_users" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Used to check if the current user is watching a specific snippet.\n\nReturns 204 (No Content) if the user is watching the snippet and 404 if\nnot.\n\nHitting this endpoint anonymously always returns a 404.", "responses": { "204": { "description": "If the authenticated user is watching the snippet.", "schema": { "$ref": "#/definitions/paginated_users" } }, "404": { "description": "If the snippet does not exist, or if the authenticated user is not watching the snippet.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/diff": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/snippets": { "post": { "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Creates a new snippet under the authenticated user's account.\n\nSnippets can contain multiple files. Both text and binary files are\nsupported.\n\nThe simplest way to create a new snippet from a local file:\n\n $ curl -u username:password -X POST https://api.bitbucket.org/2.0/snippets -F file=@image.png\n\nCreating snippets through curl has a few limitations and so let's look\nat a more complicated scenario.\n\nSnippets are created with a multipart POST. Both `multipart/form-data`\nand `multipart/related` are supported. Both allow the creation of\nsnippets with both meta data (title, etc), as well as multiple text\nand binary files.\n\nThe main difference is that `multipart/related` can use rich encoding\nfor the meta data (currently JSON).\n\n\nmultipart/related (RFC-2387)\n----------------------------\n\nThis is the most advanced and efficient way to create a paste.\n\n POST /2.0/snippets/evzijst HTTP/1.1\n Content-Length: 1188\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"title\": \"My snippet\",\n \"is_private\": true,\n \"scm\": \"hg\",\n \"files\": {\n \"foo.txt\": {},\n \"image.png\": {}\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"foo.txt\"\n Content-Disposition: attachment; filename=\"foo.txt\"\n\n foo\n\n --===============1438169132528273974==\n Content-Type: image/png\n MIME-Version: 1.0\n Content-Transfer-Encoding: base64\n Content-ID: \"image.png\"\n Content-Disposition: attachment; filename=\"image.png\"\n\n iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m\n TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB\n cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5\n EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ\n 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN\n AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==\n --===============1438169132528273974==--\n\nThe request contains multiple parts and is structured as follows.\n\nThe first part is the JSON document that describes the snippet's\nproperties or meta data. It either has to be the first part, or the\nrequest's `Content-Type` header must contain the `start` parameter to\npoint to it.\n\nThe remaining parts are the files of which there can be zero or more.\nEach file part should contain the `Content-ID` MIME header through\nwhich the JSON meta data's `files` element addresses it. The value\nshould be the name of the file.\n\n`Content-Disposition` is an optional MIME header. The header's\noptional `filename` parameter can be used to specify the file name\nthat Bitbucket should use when writing the file to disk. When present,\n`filename` takes precedence over the value of `Content-ID`.\n\nWhen the JSON body omits the `files` element, the remaining parts are\nnot ignored. Instead, each file is added to the new snippet as if its\nname was explicitly linked (the use of the `files` elements is\nmandatory for some operations like deleting or renaming files).\n\n\nmultipart/form-data\n-------------------\n\nThe use of JSON for the snippet's meta data is optional. Meta data can\nalso be supplied as regular form fields in a more conventional\n`multipart/form-data` request:\n\n $ curl -X POST -u credentials https://api.bitbucket.org/2.0/snippets -F title=\"My snippet\" -F file=@foo.txt -F file=@image.png\n\n POST /2.0/snippets HTTP/1.1\n Content-Length: 951\n Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"file\"; filename=\"foo.txt\"\n Content-Type: text/plain\n\n foo\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"file\"; filename=\"image.png\"\n Content-Type: application/octet-stream\n\n ?PNG\n\n IHDR?1??I.....\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"title\"\n\n My snippet\n ------------------------------63a4b224c59f--\n\nHere the meta data properties are included as flat, top-level form\nfields. The file attachments use the `file` field name. To attach\nmultiple files, simply repeat the field.\n\nThe advantage of `multipart/form-data` over `multipart/related` is\nthat it can be easier to build clients.\n\nEssentially all properties are optional, `title` and `files` included.\n\n\nSharing and Visibility\n----------------------\n\nSnippets can be either public (visible to anyone on Bitbucket, as well\nas anonymous users), or private (visible only to the owner, creator\nand members of the team in case the snippet is owned by a team). This\nis controlled through the snippet's `is_private` element:\n\n* **is_private=false** -- everyone, including anonymous users can view\n the snippet\n* **is_private=true** -- only the owner and team members (for team\n snippets) can view it\n\nTo create the snippet under a team account, just append the team name\nto the URL (see `/2.0/snippets/{username}`).", "responses": { "201": { "headers": { "Location": { "type": "string", "description": "The URL of the newly created snippet." } }, "description": "The newly created snippet object.", "schema": { "$ref": "#/definitions/snippet" } }, "401": { "description": "If the request was not authenticated", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "schema": { "$ref": "#/definitions/snippet" }, "required": true, "description": "The new snippet object.", "name": "_body", "in": "body" } ], "tags": [ "snippets" ] }, "parameters": [], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all snippets. Like pull requests, repositories and teams, the\nfull set of snippets is defined by what the current user has access to.\n\nThis includes all snippets owned by the current user, but also all snippets\nowned by any of the teams the user is a member of, or snippets by other\nusers that the current user is either watching or has collaborated on (for\ninstance by commenting on it).\n\nTo limit the set of returned snippets, apply the\n`?role=[owner|contributor|member]` query parameter where the roles are\ndefined as follows:\n\n* `owner`: all snippets owned by the current user\n* `contributor`: all snippets owned by, or watched by the current user\n* `member`: owned by the user, their teams, or watched by the current user\n\nWhen no role is specified, all public snippets are returned, as well as all\nprivately owned snippets watched or commented on.\n\nThe returned response is a normal paginated JSON list. This endpoint\nonly supports `application/json` responses and no\n`multipart/form-data` or `multipart/related`. As a result, it is not\npossible to include the file contents.", "responses": { "200": { "description": "A paginated list of snippets.", "schema": { "$ref": "#/definitions/paginated_snippets" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "enum": [ "owner", "contributor", "member" ], "name": "role", "required": false, "in": "query", "type": "string", "description": "Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`)." } ], "tags": [ "snippets" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}": { "put": { "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Mutates the specified pull request.\n\nThis can be used to change the pull request's branches or description.\n\nOnly open pull requests can be mutated.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified pull request.", "responses": { "200": { "description": "The pull request object", "schema": { "$ref": "#/definitions/pullrequest" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all the pull request's comments.\n\nThis includes both global, inline comments and replies.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/account/{username}/addons/{encoded_context_id}": { "put": { "security": [ { "oauth2": [ "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "delete": { "security": [ { "oauth2": [ "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_context_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/decline": { "post": { "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ] }, "/user/emails": { "parameters": [], "get": { "security": [ { "oauth2": [ "email" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all the authenticated user's email addresses. Both\nconfirmed and unconfirmed.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "users" ] } }, "/repositories/{username}/{repo_slug}/pullrequests": { "post": { "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Creates a new pull request.", "responses": { "201": { "headers": { "Location": { "type": "string", "description": "The URL of new newly created pull request." } }, "description": "The newly created pull request.", "schema": { "$ref": "#/definitions/pullrequest" } } }, "parameters": [ { "schema": { "$ref": "#/definitions/pullrequest" }, "required": false, "description": "The new pull request.\n\nThe request URL you POST to becomes the destination repository URL. For this reason, you must specify an explicit source repository in the request object if you want to pull from a different repository (fork).\n\nSince not all elements are required or even mutable, you only need to include the elements you want to initialize, such as the source branch and the title.", "name": "_body", "in": "body" } ], "tags": [ "pullrequests" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all pull requests on the specified repository.\n\nBy default only open pull requests are returned. This can be controlled\nusing the `state` query parameter. To retrieve pull requests that are\nin one of multiple states, repeat the `state` parameter for each\nindividual state.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "enum": [ "MERGED", "SUPERSEDED", "OPEN", "DECLINED" ], "type": "string", "description": "Only return pull requests that in this state. This parameter can be repeated.", "name": "state", "in": "query" } ], "tags": [ "pullrequests" ] } }, "/repositories/{username}/{repo_slug}/commits": { "post": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Identical to `GET /repositories/{username}/{repo_slug}/commits`,\nexcept that POST allows clients to place the include and exclude\nparameters in the request body to avoid URL length issues.\n\n**Note that this resource does NOT support new commit creation.**", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "These are the repository's commits. They are paginated and returned\nin reverse chronological order, similar to the output of `git log` and\n`hg log`. Like these tools, the DAG can be filtered.\n\n## GET /repositories/{username}/{repo_slug}/commits/\n\nReturns all commits in the repo in topological order (newest commit\nfirst). All branches and tags are included (similar to\n`git log --all` and `hg log`).\n\n## GET /repositories/{username}/{repo_slug}/commits/master\n\nReturns all commits on rev `master` (similar to `git log master`,\n`hg log master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/dev?exclude=master\n\nReturns all commits on ref `dev`, except those that are reachable on\n`master` (similar to `git log dev ^master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/?exclude=master\n\nReturns all commits in the repo that are not on master\n(similar to `git log --all ^master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar\n\nReturns all commits that are on refs `foo` or `bar`, but not on `fu` or\n`fubar` (similar to `git log foo bar ^fu ^fubar`).\n\nBecause the response could include a very large number of commits, it\nis paginated. Follow the 'next' link in the response to navigate to the\nnext page of commits. As with other paginated resources, do not\nconstruct your own links.\n\nWhen the include and exclude parameters are more than ca fit in a\nquery string, clients can use a `x-www-form-urlencoded` POST instead.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] } }, "/repositories/{username}/{repo_slug}/commit/{sha}/comments": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "sha", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the commit's comments.\n\nThis includes both global and inline comments.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] } }, "/repositories/{username}/{repo_slug}/commit/{revision}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "revision", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified commit.", "responses": { "200": { "description": "The commit object", "schema": { "$ref": "#/definitions/commit" } }, "404": { "description": "If the specified commit or repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The commit's SHA1.", "name": "revision", "in": "path" } ], "tags": [ "commits" ] } }, "/snippets/{username}": { "post": { "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Identical to `/snippets`, except that the new snippet will be\ncreated under the account specified in the path parameter `{username}`.", "responses": { "201": { "headers": { "Location": { "type": "string", "description": "The URL of the newly created snippet." } }, "description": "The newly created snippet object.", "schema": { "$ref": "#/definitions/snippet" } }, "403": { "description": "If the authenticated user does not have permission to create snippets under the specified account.", "schema": { "$ref": "#/definitions/error" } }, "401": { "description": "If the request was not authenticated", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "schema": { "$ref": "#/definitions/snippet" }, "required": true, "description": "The new snippet object.", "name": "_body", "in": "body" } ], "tags": [ "snippets" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Identical to `/snippets`, except that the result is further filtered\nby the snippet owner and only those that are owned by `{username}` are\nreturned.", "responses": { "200": { "description": "A paginated list of snippets.", "schema": { "$ref": "#/definitions/paginated_snippets" } }, "404": { "description": "If the user does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "enum": [ "owner", "contributor", "member" ], "name": "role", "required": false, "in": "query", "type": "string", "description": "Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`)." }, { "required": true, "type": "string", "description": "Limits the result to snippets owned by this user.", "name": "username", "in": "path" } ], "tags": [ "snippets" ] } }, "/repositories/{username}/{repo_slug}/issues/{issue_id}/watch": { "put": { "security": [ { "oauth2": [ "issue", "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Start watching this issue.\n\nTo start watching this issue, do an empty PUT. The 204 status code\nindicates that the operation was successful.", "responses": { "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "Indicates that the authenticated user successfully started watching this issue.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] }, "delete": { "security": [ { "oauth2": [ "issue:write", "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Stop watching this issue.", "responses": { "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the issue or the repo does not exist, or the repository does not have an issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "Indicates that the authenticated user successfully stopped watching this issue.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "issue_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue", "account" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Indicated whether or not the authenticated user is watching this\nissue.", "responses": { "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "If the authenticated user is watching this issue.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/milestones/{milestone_id}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "milestone_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified issue tracker milestone object.", "responses": { "200": { "description": "The specified milestone object.", "schema": { "$ref": "#/definitions/milestone" } }, "404": { "description": "If the specified repository or milestone does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The milestone's id", "name": "milestone_id", "in": "path" } ], "tags": [ "issue_tracker" ] } }, "/teams": { "parameters": [], "get": { "security": [ { "oauth2": [ "team" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all the teams that the authenticated user is associated\nwith.", "responses": { "200": { "description": "A paginated list of teams.", "schema": { "$ref": "#/definitions/paginated_teams" } }, "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "enum": [ "admin", "contributor", "member" ], "name": "role", "required": false, "in": "query", "type": "string", "description": "\nFilters the teams based on the authenticated user's role on each team.\n\n* **member**: returns a list of all the teams which the caller is a member of\n at least one team group or repository owned by the team\n* **contributor**: returns a list of teams which the caller has write access\n to at least one repository owned by the team\n* **admin**: returns a list teams which the caller has team administrator access\n" } ], "tags": [ "teams" ] } }, "/user": { "parameters": [], "get": { "security": [ { "oauth2": [ "account" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the currently logged in user.", "responses": { "200": { "description": "The current user.", "schema": { "$ref": "#/definitions/user" } }, "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "users" ] } }, "/repositories/{username}/{repo_slug}/commits/{revision}": { "post": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Identical to `GET /repositories/{username}/{repo_slug}/commits`,\nexcept that POST allows clients to place the include and exclude\nparameters in the request body to avoid URL length issues.\n\n**Note that this resource does NOT support new commit creation.**", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "revision", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "These are the repository's commits. They are paginated and returned\nin reverse chronological order, similar to the output of `git log` and\n`hg log`. Like these tools, the DAG can be filtered.\n\n## GET /repositories/{username}/{repo_slug}/commits/\n\nReturns all commits in the repo in topological order (newest commit\nfirst). All branches and tags are included (similar to\n`git log --all` and `hg log`).\n\n## GET /repositories/{username}/{repo_slug}/commits/master\n\nReturns all commits on rev `master` (similar to `git log master`,\n`hg log master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/dev?exclude=master\n\nReturns all commits on ref `dev`, except those that are reachable on\n`master` (similar to `git log dev ^master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/?exclude=master\n\nReturns all commits in the repo that are not on master\n(similar to `git log --all ^master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar\n\nReturns all commits that are on refs `foo` or `bar`, but not on `fu` or\n`fubar` (similar to `git log foo bar ^fu ^fubar`).\n\nBecause the response could include a very large number of commits, it\nis paginated. Follow the 'next' link in the response to navigate to the\nnext page of commits. As with other paginated resources, do not\nconstruct your own links.\n\nWhen the include and exclude parameters are more than ca fit in a\nquery string, clients can use a `x-www-form-urlencoded` POST instead.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] } }, "/snippets/{username}/{encoded_id}/comments": { "post": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Creates a new comment.\n\nThe only required field in the body is `content.raw`.\n\nTo create a threaded reply to an existing comment, include `parent.id`.", "responses": { "201": { "headers": { "Location": { "type": "string", "description": "The URL of the new comment" } }, "description": "The newly created comment.", "schema": { "$ref": "#/definitions/snippet" } }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "schema": { "$ref": "#/definitions/snippet" }, "required": true, "description": "The contents of the new comment.", "name": "_body", "in": "body" } ], "tags": [ "snippets" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Used to retrieve a paginated list of all comments for a specific\nsnippet.\n\nThis resource works identical to commit and pull request comments.", "responses": { "200": { "description": "A paginated list of snippet comments, ordered by creation date.", "schema": { "$ref": "#/definitions/paginated_snippet_comments" } }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "snippets" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/activity": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the pull request's activity log. This includes comments that\nwere made by the reviewers, updates and approvals.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/repositories/{username}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all repositories owned by the specified account.\n\nThe result can be narrowed down based on the authenticated user's role.\n\nE.g. with `?role=contributor`, only those repositories that the\nauthenticated user has write access to are returned (this includes any\nrepo the user is an admin on, as that implies write access).", "responses": { "200": { "description": "The repositories owned by the specified account.", "schema": { "$ref": "#/definitions/paginated_repositories" } }, "404": { "description": "If the specified account does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "enum": [ "admin", "contributor", "member", "owner" ], "name": "role", "required": false, "in": "query", "type": "string", "description": "\nFilters the result based on the authenticated user's role on each repository.\n\n* **member**: returns repositories to which the user has explicit read access\n* **contributor**: returns repositories to which the user has explicit write access\n* **admin**: returns repositories to which the user has explicit administrator access\n* **owner**: returns all repositories owned by the current user\n" } ], "tags": [ "repositories" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/merge": { "post": { "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ] }, "/snippets/{username}/{encoded_id}/commits/": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "200": { "description": "The specified snippet commit.", "schema": { "$ref": "#/definitions/snippet_commit" } }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the commit or the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "snippets" ] } }, "/snippets/{username}/{encoded_id}/{node_id}/patch": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" }, { "required": true, "type": "string", "name": "node_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the patch of the specified commit against its first\nparent.\n\nNote that this resource is different in functionality from the `diff`\nresource.\n\nThe differences between a diff and a patch are:\n\n* patches have a commit header with the username, message, etc\n* diffs support the optional `path=foo/bar.py` query param to filter the\n diff to just that one file diff (not supported for patches)\n* for a merge, the diff will show the diff between the merge commit and\n its first parent (identical to how PRs work), while patch returns a\n response containing separate patches for each commit on the second\n parent's ancestry, up to the oldest common ancestor (identical to\n its reachability).\n\nNote that the character encoding of the contents of the patch is\nunspecified as Git and Mercurial do not track this, making it hard for\nBitbucket to reliably determine this.", "responses": { "200": { "description": "The raw patch contents." }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ] } }, "/teams/{username}/followers": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the list of accounts that are following this team.", "responses": { "200": { "description": "A paginated list of user objects.", "schema": { "$ref": "#/definitions/paginated_users" } }, "404": { "description": "If no team exists for the specified name, or if the specified account is a personal account, not a team account.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The team's username", "name": "username", "in": "path" } ], "tags": [ "teams" ] } }, "/snippets/{username}/{encoded_id}/{node_id}/files/{path}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" }, { "required": true, "type": "string", "name": "node_id", "in": "path" }, { "required": true, "type": "string", "name": "path", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Retrieves the raw contents of a specific file in the snippet. The\n`Content-Disposition` header will be \"attachment\" to avoid issues with\nmalevolent executable files.\n\nThe file's mime type is derived from its filename and returned in the\n`Content-Type` header.\n\nNote that for text files, no character encoding is included as part of\nthe content type.", "responses": { "200": { "headers": { "Content-Type": { "type": "string", "description": "The mime type as derived from the filename" }, "Content-Disposition": { "type": "string", "description": "attachment" } }, "description": "Returns the contents of the specified file." }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the file or snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "snippets" ] } }, "/addon/linkers/{linker_key}": { "parameters": [ { "required": true, "type": "string", "name": "linker_key", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] } }, "/repositories/{username}/{repo_slug}/refs/tags": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "refs" ] } }, "/repositories/{username}/{repo_slug}/commit/{node}/approve": { "post": { "security": [ { "oauth2": [ "repository:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Approve the specified commit as the authenticated user.\n\nThis operation is only available to users that have explicit access to\nthe repository. In contrast, just the fact that a repository is\npublicly accessible to users does not give them the ability to approve\ncommits.", "responses": { "200": { "description": "The `participant` object recording that the authenticated user approved the commit.", "schema": { "$ref": "#/definitions/participant" } }, "404": { "description": "If the specified commit, or the repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The commit's SHA1.", "name": "node", "in": "path" } ], "tags": [ "commits" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "node", "in": "path" } ], "delete": { "security": [ { "oauth2": [ "repository:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Redact the authenticated user's approval of the specified commit.\n\nThis operation is only available to users that have explicit access to\nthe repository. In contrast, just the fact that a repository is\npublicly accessible to users does not give them the ability to approve\ncommits.", "responses": { "204": { "description": "An empty response indicating the authenticated user's approval has been withdrawn." }, "404": { "description": "If the specified commit, or the repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The commit's SHA1.", "name": "node", "in": "path" } ], "tags": [ "commits" ] } }, "/account/{username}/addons": { "post": { "security": [ { "oauth2": [ "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/commits": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the pull request's commits.\n\nThese are the commits that are being merged into the destination\nbranch when the pull requests gets accepted.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/snippets/{username}/{encoded_id}/watchers": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" } ], "get": { "responses": { "200": { "description": "The paginated list of users watching this snippet", "schema": { "$ref": "#/definitions/paginated_users" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ], "deprecated": true, "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a paginated list of all users watching a specific snippet." } }, "/repositories/{username}/{repo_slug}/branch-restrictions/{id}": { "put": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "branch_restrictions" ] }, "delete": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "branch_restrictions" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "branch_restrictions" ] } }, "/repositories/{username}/{repo_slug}/commit/{node}/statuses/build": { "post": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "node", "in": "path" } ] }, "/repositories/{username}/{repo_slug}": { "post": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Creates a new repository.", "responses": { "200": { "description": "The newly created repository.", "schema": { "$ref": "#/definitions/repository" } }, "401": { "description": "If the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "400": { "description": "If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "schema": { "$ref": "#/definitions/repository" }, "required": false, "description": "The repository that is to be created. Note that most object elements are optional. Elements \"owner\" and \"full_name\" are ignored as the URL implies them.", "name": "_body", "in": "body" } ], "tags": [ "repositories" ] }, "delete": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes the repository. This is an irreversible operation.\n\nThis does not affect its forks.", "responses": { "204": { "description": "Indicates successful deletion." }, "403": { "description": "If the caller either does not have admin access to the repository, or the repository is set to read-only.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "repositories" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the object describing this repository.", "responses": { "200": { "description": "The repository object.", "schema": { "$ref": "#/definitions/repository" } }, "403": { "description": "If the repository is private and the authenticated user does not have access to it.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If no repository exists at this location.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "repositories" ] } }, "/repositories/{username}/{repo_slug}/default-reviewers/{target_username}": { "put": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Adds the specified user to the repository's list of default\nreviewers.\n\nThis method is idempotent. Adding a user a second time has no effect.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] }, "delete": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Removes a default reviewer from the repository.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "target_username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified reviewer.\n\nThis can be used to test whether a user is among the repository's\ndefault reviewers list. A 404 indicates that that specified user is not\na default reviewer.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/repositories/{username}/{repo_slug}/issues/{issue_id}/comments": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "issue_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all comments that were made on the specified issue.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/snippets/{username}/{encoded_id}/{node_id}": { "put": { "responses": { "200": { "description": "The updated snippet object.", "schema": { "$ref": "#/definitions/snippet" } }, "401": { "description": "If the snippet is private and the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "403": { "description": "If authenticated user does not have permission to update the private snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet or the revision does not exist.", "schema": { "$ref": "#/definitions/error" } }, "405": { "description": "If `{node_id}` is not the latest revision.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet's id.", "name": "encoded_id", "in": "path" }, { "required": true, "type": "string", "description": "A commit revision (SHA1).", "name": "node_id", "in": "path" } ], "tags": [ "snippets" ], "produces": [ "application/json", "multipart/related", "multipart/form-data" ], "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "consumes": [ "application/json", "multipart/related", "multipart/form-data" ], "description": "Identical to `UPDATE /snippets/encoded_id`, except that this endpoint\ntakes an explicit commit revision. Only the snippet's \"HEAD\"/\"tip\"\n(most recent) version can be updated and requests on all other,\nolder revisions fail by returning a 405 status.\n\nUsage of this endpoint over the unrestricted `/snippets/encoded_id`\ncould be desired if the caller wants to be sure no concurrent\nmodifications have taken place between the moment of the UPDATE\nrequest and the original GET.\n\nThis can be considered a so-called \"Compare And Swap\", or CAS\noperation.\n\nOther than that, the two endpoints are identical in behavior." }, "delete": { "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes the snippet.\n\nNote that this only works for versioned URLs that point to the latest\ncommit of the snippet. Pointing to an older commit results in a 405\nstatus code.\n\nTo delete a snippet, regardless of whether or not concurrent changes\nare being made to it, use `DELETE /snippets/{encoded_id}` instead.", "responses": { "401": { "description": "If the snippet is private and the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "403": { "description": "If authenticated user does not have permission to delete the private snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "If the snippet was deleted successfully." }, "405": { "description": "If `{node_id}` is not the latest revision.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet's id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" }, { "required": true, "type": "string", "name": "node_id", "in": "path" } ], "get": { "responses": { "200": { "description": "The snippet object.", "schema": { "$ref": "#/definitions/snippet" } }, "401": { "description": "If the snippet is private and the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "403": { "description": "If authenticated user does not have access to the private snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet, or the revision does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet's id.", "name": "encoded_id", "in": "path" }, { "required": true, "type": "string", "description": "A commit revision (SHA1).", "name": "node_id", "in": "path" } ], "produces": [ "application/json", "multipart/related", "multipart/form-data" ], "tags": [ "snippets" ], "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Identical to `GET /snippets/encoded_id`, except that this endpoint\ncan be used to retrieve the contents of the snippet as it was at an\nolder revision, while `/snippets/encoded_id` always returns the\nsnippet's current revision.\n\nNote that only the snippet's file contents are versioned, not its\nmeta data properties like the title.\n\nOther than that, the two endpoints are identical in behavior." } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/patch": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/addon/linkers/{linker_key}/values/": { "delete": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "parameters": [ { "required": true, "type": "string", "name": "linker_key", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] } }, "/repositories": { "parameters": [], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all public repositories.", "responses": { "200": { "description": "All public repositories.", "schema": { "$ref": "#/definitions/paginated_repositories" } } }, "parameters": [], "tags": [ "repositories" ] } }, "/teams/{username}/members": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "account" ] }, { "basic": [] }, { "api_key": [] } ], "description": "All members of a team.\n\nReturns all members of the specified team. Any member of any of the\nteam's groups is considered a member of the team. This includes users\nin groups that may not actually have access to any of the team's\nrepositories.\n\nNote that members using the \"private profile\" feature are not included.", "responses": { "200": { "description": "All members", "schema": { "$ref": "#/definitions/user" } }, "404": { "description": "When the team does not exist, or multiple teams with the same name exist that differ only in casing and the URL did not match the exact casing of a particular one.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "teams" ] } } }, "schemes": [ "https" ], "tags": [ { "name": "users", "description": "" }, { "name": "teams", "description": "" }, { "name": "repositories", "description": "" }, { "name": "refs", "description": "" }, { "name": "commits", "description": "" }, { "name": "pullrequests", "description": "" }, { "name": "issue_tracker", "description": "The issues resource provides functionality for getting information on\nissues in an issue tracker, creating new issues, updating them and deleting\nthem.\n\nYou can access public issues without authentication, but you can't gain access\nto private repositories' issues. By authenticating, you will get the ability\nto create issues, as well as access to updating data or deleting issues you\nhave access to." }, { "name": "wiki", "description": "" }, { "name": "downloads", "description": "" }, { "name": "snippets", "description": "" }, { "name": "webhooks", "description": "Webhooks provide a way to configure Bitbucket Cloud to make requests to\nyour server (or another external service) whenever certain events occur in\nBitbucket Cloud.\n\nA webhook consists of:\n\n* A subject -- The resource that generates the events. Currently, this resource\n is the repository, user account, or team where you create the webhook.\n* One or more event -- The default event is a repository push, but you can\n select multiple events that can trigger the webhook.\n* A URL -- The endpoint where you want Bitbucket to send the event payloads\n when a matching event happens.\n\nThere are two parts to getting a webhook to work: creating the webhook and\ntriggering the webhook. After you create a webhook for an event, every time\nthat event occurs, Bitbucket sends a payload request that describes the event\nto the specified URL. Thus, you can think of webhooks as a kind of\nnotification system.\n\nUse webhooks to integrate applications with Bitbucket Cloud. The following\nuse cases provides examples of when you would want to use webhooks:\n\n* Every time a user pushes commits in a repository, you may want to notify\n your CI server to start a build.\n* Every time a user pushes commits or creates a pull request, you may want to\n display a notification in your application.\n" } ], "basePath": "/2.0", "produces": [ "application/json" ], "securityDefinitions": { "oauth2": { "scopes": { "wiki": "Read and write to your repositories' wikis", "snippet": "Read your snippets", "account": "Read your account information", "repository:admin": "Administer your repositories", "repository": "Read your repositories", "snippet:write": "Read and write to your snippets", "issue:write": "Read and write to your repositories' issues", "pullrequest": "Read your repositories and their pull requests", "webhook": "Read and write to your repositories' webhooks", "pullrequest:write": "Read and write to your repositories and their pull requests", "project": "Read your team's projects", "project:write": "Read and write to your team's projects and move repositories between them", "team": "Read your team membership information", "repository:write": "Read and write to your repositories", "team:write": "Read and write to your team membership information", "account:write": "Read and write to your account information", "issue": "Read your repositories' issues", "email": "Read your account's primary email address" }, "tokenUrl": "http://dev.bitbucket.org:8000/site/oauth2/access_token", "description": "OAuth 2 as per [RFC-6749](https://tools.ietf.org/html/rfc6749).", "flow": "accessCode", "type": "oauth2", "authorizationUrl": "http://dev.bitbucket.org:8000/site/oauth2/authorize" }, "api_key": { "in": "header", "type": "apiKey", "description": "API Keys can be used as Basic HTTP Authentication credentials and provide a substitute for the account's actual username and password. API Keys are only available to team accounts and there is only 1 key per account. API Keys do not support scopes and have therefore access to all contents of the account.", "name": "Authorization" }, "basic": { "type": "basic", "description": "Basic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported). Note that Basic Auth with username and password as credentials is only available on accounts that have 2-factor-auth / 2-step-verification disabled. If you use 2fa, you should authenticate using OAuth2 instead." } }, "x-revision": "dev-1452122794", "host": "api.dev.bitbucket.org:8000", "definitions": { "paginated_repositories": { "allOf": [ { "$ref": "#/definitions/page" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of repositories.", "properties": { "values": { "minItems": 0, "items": { "$ref": "#/definitions/repository" }, "uniqueItems": true, "type": "array" } } } ] }, "subject_types": { "additionalProperties": false, "type": "object", "description": "The mapping of resource/subject types pointing to their individual event types.", "properties": { "user": { "additionalProperties": false, "type": "object", "properties": { "events": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "repository": { "additionalProperties": false, "type": "object", "properties": { "events": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "team": { "additionalProperties": false, "type": "object", "properties": { "events": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } } } }, "paginated_hook_events": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of webhook types available to subscribe on.", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/hook_event" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "base_commit": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "The common base type for both repository and snippet commits.", "properties": { "date": { "type": "string", "format": "date-time" }, "parents": { "minItems": 0, "items": { "$ref": "#/definitions/base_commit" }, "type": "array" }, "message": { "type": "string" }, "hash": { "pattern": "[0-9a-f]{7,}?", "type": "string" }, "author": { "$ref": "#/definitions/account" } } } ] }, "error": { "additionalProperties": false, "type": "object", "properties": { "error": { "additionalProperties": false, "required": [ "message" ], "type": "object", "properties": { "message": { "type": "string" }, "detail": { "type": "string" } } } } }, "participant": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "Object describing a user's role on resources like commits or pull requests.", "properties": { "role": { "enum": [ "PARTICIPANT", "REVIEWER" ], "type": "string" }, "user": { "$ref": "#/definitions/user" }, "approved": { "type": "boolean" } } } ] }, "paginated_versions": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of issue tracker versions.", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/version" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "paginated_users": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of users.", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/user" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "snippet": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A snippet object.", "properties": { "scm": { "enum": [ "hg", "git" ], "type": "string", "description": "The DVCS used to store the snippet." }, "title": { "type": "string" }, "creator": { "$ref": "#/definitions/account" }, "created_on": { "type": "string", "format": "date-time" }, "owner": { "$ref": "#/definitions/account" }, "updated_on": { "type": "string", "format": "date-time" }, "id": { "minimum": 0, "type": "integer" }, "is_private": { "type": "boolean" } } } ] }, "hook_event": { "additionalProperties": false, "type": "object", "description": "An event, associated with a resource or subject type.", "properties": { "category": { "type": "string", "description": "The category this event belongs to." }, "event": { "enum": [ "pullrequest:updated", "repo:commit_status_created", "repo:fork", "issue:comment_created", "pullrequest:rejected", "pullrequest:fulfilled", "pullrequest:comment_created", "pullrequest:comment_deleted", "issue:created", "repo:commit_comment_created", "pullrequest:approved", "repo:commit_status_updated", "pullrequest:comment_updated", "issue:updated", "pullrequest:unapproved", "pullrequest:created", "repo:push" ], "type": "string", "description": "The event identifier." }, "description": { "type": "string", "description": "More detailed description of the webhook event type." }, "label": { "type": "string", "description": "Summary of the webhook event type." } } }, "version": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A version as defined in a repository's issue tracker.", "properties": { "name": { "type": "string" }, "links": { "additionalProperties": false, "type": "object", "properties": { "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "id": { "type": "integer" } } } ] }, "issue": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "An issue.", "properties": { "content": { "additionalProperties": false, "type": "object", "properties": { "raw": { "type": "string", "description": "The text as it was typed by a user." }, "markup": { "enum": [ "markdown", "creole" ], "type": "string", "description": "The type of markup language the content is to be interpreted in." }, "html": { "type": "string", "description": "The user's markup rendered as HTML." } } }, "kind": { "enum": [ "bug", "enhancement", "proposal", "task" ], "type": "string" }, "repository": { "$ref": "#/definitions/repository" }, "links": { "additionalProperties": false, "type": "object", "properties": { "attachments": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "watch": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "comments": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "html": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "vote": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "title": { "type": "string" }, "reporter": { "$ref": "#/definitions/user" }, "component": { "$ref": "#/definitions/component" }, "votes": { "type": "integer" }, "priority": { "enum": [ "trivial", "minor", "major", "critical", "blocker" ], "type": "string" }, "assignee": { "$ref": "#/definitions/user" }, "state": { "enum": [ "new", "open", "resolved", "on hold", "invalid", "duplicate", "wontfix", "closed" ], "type": "string" }, "version": { "$ref": "#/definitions/version" }, "edited_on": { "type": "string", "format": "date-time" }, "created_on": { "type": "string", "format": "date-time" }, "milestone": { "$ref": "#/definitions/milestone" }, "updated_on": { "type": "string", "format": "date-time" }, "id": { "type": "integer" } } } ] }, "webhook_subscription": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A Webhook subscription.", "properties": { "subject_type": { "enum": [ "user", "repository", "team" ], "type": "string", "description": "The type of entity, which is `repository` in the case of webhook subscriptions on repositories." }, "uuid": { "type": "string", "description": "The webhook's id" }, "url": { "type": "string", "description": "The URL events get delivered to.", "format": "uri" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": "string", "description": "A user-defined description of the webhook." }, "active": { "type": "boolean" }, "events": { "minItems": 1, "items": { "enum": [ "pullrequest:updated", "repo:commit_status_created", "repo:fork", "issue:comment_created", "pullrequest:rejected", "pullrequest:fulfilled", "pullrequest:comment_created", "pullrequest:comment_deleted", "issue:created", "repo:commit_comment_created", "pullrequest:approved", "repo:commit_status_updated", "pullrequest:comment_updated", "issue:updated", "pullrequest:unapproved", "pullrequest:created", "repo:push" ], "type": "string" }, "uniqueItems": true, "description": "The events this webhook is subscribed to.", "type": "array" }, "subject": { "$ref": "#/definitions/object" } } } ] }, "repository": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A Bitbucket repository.", "properties": { "scm": { "enum": [ "hg", "git" ], "type": "string" }, "has_wiki": { "type": "boolean" }, "uuid": { "type": "string", "description": "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user." }, "links": { "additionalProperties": false, "type": "object", "properties": { "watchers": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "commits": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "downloads": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "html": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "avatar": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "hooks": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "forks": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "clone": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "pullrequests": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "fork_policy": { "enum": [ "allow_forks", "no_public_forks", "no_forks" ], "type": "string", "description": "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n be made public later)\n* **no_forks**: deny all forking\n" }, "description": { "type": "string" }, "language": { "type": "string" }, "created_on": { "type": "string", "format": "date-time" }, "parent": { "$ref": "#/definitions/repository" }, "full_name": { "type": "string", "description": "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs." }, "has_issues": { "type": "boolean" }, "owner": { "$ref": "#/definitions/account" }, "updated_on": { "type": "string", "format": "date-time" }, "size": { "type": "integer" }, "is_private": { "type": "boolean" }, "name": { "type": "string" } } } ] }, "snippet_commit": { "allOf": [ { "$ref": "#/definitions/base_commit" }, { "additionalProperties": true, "type": "object", "description": "", "properties": { "snippet": { "$ref": "#/definitions/snippet" }, "links": { "additionalProperties": false, "type": "object", "properties": { "diff": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "html": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } } } } ] }, "object": { "description": "Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.", "required": [ "type" ], "additionalProperties": true, "discriminator": "type", "type": "object", "properties": { "type": { "type": "string" } } }, "component": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A component as defined in a repository's issue tracker.", "properties": { "name": { "type": "string" }, "links": { "additionalProperties": false, "type": "object", "properties": { "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "id": { "type": "integer" } } } ] }, "paginated_issues": { "allOf": [ { "$ref": "#/definitions/page" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of issues.", "properties": { "values": { "minItems": 0, "items": { "$ref": "#/definitions/issue" }, "uniqueItems": true, "type": "array" } } } ] }, "user": { "allOf": [ { "$ref": "#/definitions/account" }, { "additionalProperties": true, "type": "object", "description": "A user object.", "properties": {} } ] }, "milestone": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A milestone as defined in a repository's issue tracker.", "properties": { "name": { "type": "string" }, "links": { "additionalProperties": false, "type": "object", "properties": { "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "id": { "type": "integer" } } } ] }, "paginated_issue_attachments": { "allOf": [ { "$ref": "#/definitions/page" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of issue attachments.", "properties": { "values": { "minItems": 0, "items": { "$ref": "#/definitions/issue_attachment" }, "type": "array" } } } ] }, "paginated_webhook_subscriptions": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of webhook subscriptions", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/webhook_subscription" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "snippet_comment": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A comment on a snippet.", "properties": { "snippet": { "$ref": "#/definitions/snippet" }, "links": { "additionalProperties": false, "type": "object", "properties": { "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "html": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } } } } ] }, "paginated_milestones": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of issue tracker milestones.", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/milestone" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "paginated_components": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of issue tracker components.", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/component" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "account": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "An account object.", "properties": { "username": { "pattern": "^[a-zA-Z0-9_\\-]+$", "type": "string" }, "website": { "type": "string" }, "display_name": { "type": "string" }, "uuid": { "type": "string" }, "links": { "additionalProperties": false, "type": "object", "properties": { "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "repositories": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "html": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "followers": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "avatar": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "following": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "created_on": { "type": "string", "format": "date-time" } } } ] }, "issue_attachment": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "An issue file attachment's meta data. Note this does not contain the file's actual contents.", "properties": { "name": { "type": "string" }, "links": { "additionalProperties": false, "type": "object", "properties": { "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } } } } ] }, "paginated_snippet_commit": { "allOf": [ { "$ref": "#/definitions/page" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of snippet commits.", "properties": { "values": { "minItems": 0, "items": { "$ref": "#/definitions/snippet_commit" }, "type": "array" } } } ] }, "pullrequest": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A pull request object.", "properties": { "state": { "enum": [ "MERGED", "SUPERSEDED", "OPEN", "DECLINED" ], "type": "string" }, "author": { "$ref": "#/definitions/account" }, "id": { "type": "integer" }, "links": { "additionalProperties": false, "type": "object", "properties": { "decline": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "commits": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "comments": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "merge": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "html": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "activity": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "diff": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "approve": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "title": { "type": "string" } } } ] }, "paginated_teams": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of teams.", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/team" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "paginated_snippet_comments": { "allOf": [ { "$ref": "#/definitions/page" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of snippet comments.", "properties": { "values": { "minItems": 0, "items": { "$ref": "#/definitions/snippet_comment" }, "uniqueItems": true, "type": "array" } } } ] }, "team": { "allOf": [ { "$ref": "#/definitions/account" }, { "additionalProperties": true, "type": "object", "description": "A team object.", "properties": {} } ] }, "commit": { "allOf": [ { "$ref": "#/definitions/base_commit" }, { "additionalProperties": true, "type": "object", "description": "A repository commit object.", "properties": { "participants": { "minItems": 0, "items": { "$ref": "#/definitions/participant" }, "type": "array" }, "repository": { "$ref": "#/definitions/repository" }, "links": { "additionalProperties": false, "type": "object", "properties": { "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "comments": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "patch": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "html": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "diff": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "approve": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } } } } ] }, "paginated_snippets": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of snippets.", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/snippet" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "page": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.", "properties": { "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." } } } ] } }, "swagger": "2.0", "consumes": [ "application/json" ] } validate-0.24.0/fixtures/go-swagger/canary/docker/000077500000000000000000000000001457312750000220315ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/canary/docker/swagger.json000066400000000000000000002442501457312750000243720ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "title": "Docker Remote API", "description": "The API for each docker installation.", "termsOfService": "http://example.com/tos/", "version": "v1.21" }, "host": "localhost", "basePath": "/v1.21", "schemes": ["http", "https"], "produces": ["application/json", "text/plain"], "consumes": ["application/json", "text/plain"], "definitions": { "Version": { "type": "object", "properties": { "Version": { "type": "string" }, "Os": { "type": "string" }, "KernelVersion": { "type": "string" }, "GoVersion": { "type": "string" }, "GitCommit": { "type": "string" }, "Arch": { "type": "string" }, "ApiVersion": { "type": "string" }, "Experimental": { "type": "boolean" } } }, "port": { "type": "object", "properties": { "PrivatePort": { "type": "integer" }, "PublicPort": { "type": "integer" }, "Type": { "type": "string" } } }, "mount": { "type": "object", "properties": { "Source": { "type": "string" }, "Destination": { "type": "string" }, "Mode": { "type": "string" }, "RW": { "type": "boolean" } } }, "LogConfig": { "type": "object", "properties": { "Type": { "type": "string" }, "Config": { "type": "object", "additionalProperties": { "type": "string" } } } }, "Ulimit": { "type": "object", "properties": { "Name": { "type": "string" }, "Soft": { "type": "integer" }, "Hard": { "type": "integer" } } }, "Device": { "type": "object", "properties": { "PathOnHost": { "type": "string" }, "PathInContainer": { "type": "string" }, "CgroupPermissions": { "type": "string" } } }, "RestartPolicy": { "type": "object", "properties": { "Name": { "type": "string", "enum": ["always", "on-failure"] }, "MaximumRetryCount": { "type": "integer" } }, "default": {} }, "PortBinding": { "type": "object", "properties": { "HostPort": { "type": "string" } } }, "HostConfig": { "type": "object", "properties": { "Binds": { "type": "array", "items": { "type": "string" } }, "Links": { "type": "array", "items": { "type": "string" } }, "LxcConf": { "type": "object", "additionalProperties": { "type": "string" } }, "Memory": { "type": "integer", "default": 0 }, "MemorySwap": { "type": "integer", "default": 0 }, "CpuShares": { "type": "integer" }, "CpuPeriod": { "type": "integer" }, "CpusetCpus": { "type": "string" }, "CpusetMems": { "type": "string" }, "BlkioWeight": { "type": "integer" }, "MemorySwappiness": { "type": "integer" }, "OomKillDisable": { "type": "boolean" }, "PortBindings": { "type": "object", "additionalProperties": { "$ref": "#/definitions/PortBinding" } }, "PublishAllPorts": { "type": "boolean" }, "Privileged": { "type": "boolean" }, "ReadonlyRootfs": { "type": "boolean" }, "Dns": { "type": "array", "items": { "type": "string" } }, "DnsSearch": { "type": "array", "items": { "type": "string" } }, "ExtraHosts": { "type": "array", "items": { "type": "string" } }, "VolumesFrom": { "type": "array", "items": { "type": "string" } }, "CapAdd": { "type": "array", "items": { "type": "string" } }, "CapDrop": { "type": "array", "items": { "type": "string" } }, "RestartPolicy": { "$ref": "#/definitions/RestartPolicy" }, "NetworkMode": { "type": "string" }, "Devices": { "type": "array", "items": { "$ref": "#/definitions/Device" } }, "Ulimits": { "type": "array", "items": { "$ref": "#/definitions/Ulimit" } }, "SecurityOpt": { "type": "array", "items": { "type": "string" } }, "LogConfig": { "$ref": "#/definitions/LogConfig" }, "CgroupParent": { "type": "string" } } }, "ContainerConfig": { "type": "object", "properties": { "Id": { "type": "string" }, "Names": { "type": "array", "items": { "type": "string" } }, "Image": { "type": "string" }, "Command": { "type": "string" }, "Created": { "type": "integer" }, "Status": { "type": "string" }, "Ports": { "type": "array", "items": { "$ref": "#/definitions/port" } }, "Labels": { "type": "object", "additionalProperties": { "type": "string" } }, "SizeRw": { "type": "integer" }, "SizeRootFs": { "type": "integer" }, "Hostname": { "type": "integer" }, "Domainname": { "type": "integer" }, "User": { "type": "integer" }, "AttachStdin": { "type": "boolean", "default": false }, "AttachStdout": { "type": "boolean", "default": true }, "AttachStderr": { "type": "boolean", "default": true }, "Tty": { "type": "boolean", "default": false }, "OpenStdin": { "type": "boolean", "default": false }, "StdinOnce": { "type": "boolean", "default": false }, "Env": { "type": "array", "items": { "type": "string" } }, "Cmd": { "type": ["array", "string"], "items": { "type": "string" } }, "Entrypoint": { "type": ["array", "string"], "items": { "type": "string" } }, "Mounts": { "type": "array", "items": { "$ref": "#/definitions/mount" } }, "WorkingDir": { "type": "string" }, "NetworkDisabled": { "type": "boolean" }, "MacAddress": { "type": "string" }, "ExposedPorts": { "type": "object", "additionalProperties": { "type": "object", "enum": [{}], "default": {} } }, "HostConfig": { "$ref": "#/definitions/HostConfig" } } }, "NetworkConfig": { "type": "object", "properties": { "Bridge": { "type": "string" }, "Gateway": { "type": "string" }, "IPAddress": { "type": "string" }, "IPPrefixLen": { "type": "integer" }, "MacAddress": { "type": "string" }, "PortMapping": { "type": "string" }, "Ports": { "type": "array", "items": { "$ref": "#/definitions/port" } } } }, "ContainerState": { "type": "object", "properties": { "Error": { "type": "string" }, "ExitCode": { "type": "integer" }, "FinishedAt": { "type": "string" }, "OOMKilled": { "type": "boolean" }, "Paused": { "type": "boolean" }, "Pid": { "type": "integer" }, "Restarting": { "type": "boolean" }, "Running": { "type": "boolean" }, "StartedAt": { "type": "string" } } }, "Container": { "type": "object", "properties": { "AppArmorProfile": { "type": "string" }, "Args": { "type": "array", "items": { "type": "string" } }, "Config": { "$ref": "#/definitions/ContainerConfig" }, "Created": { "type": "string" }, "Driver": { "type": "string" }, "ExecDriver": { "type": "string" }, "ExecIDs": { "type": "string" }, "HostConfig": { "$ref": "#/definitions/HostConfig" }, "HostnamePath": { "type": "string" }, "HostsPath": { "type": "string" }, "LogPath": { "type": "string" }, "Id": { "type": "string" }, "Image": { "type": "string" }, "MountLabel": { "type": "string" }, "Name": { "type": "string" }, "NetworkSettings": { "$ref": "#/definitions/NetworkConfig" }, "Path": { "type": "string" }, "ProcessLabel": { "type": "string" }, "ResolvConfPath": { "type": "string" }, "RestartCount": { "type": "integer" }, "State": { "$ref": "#/definitions/ContainerState" }, "Mounts": { "type": "array", "items": { "$ref": "#/definitions/mount" } } } }, "ContainerTop": { "type": "object", "properties": { "Titles": { "type": "array", "items": { "type": "string" } }, "Processes": { "type": "array", "items": { "type": "array", "items": { "type": "string" } } } } }, "ContainerChange": { "type": "object", "properties": { "Path": { "type": "string" }, "Kind": { "type": "integer" } } }, "ContainerWait": { "type": "object", "properties": { "StatusCode": { "type": "integer" } } }, "GraphDriver": { "type": "object", "properties": { "Name": { "type": "string" }, "Data": { "type": "object" } } }, "ImageItem": { "type": "object", "properties": { "RepoTags": { "type": "array", "items": { "type": "string" } }, "Id": { "type": "string" }, "ParentId": { "type": "string" }, "Created": { "type": "integer" }, "Size": { "type": "integer" }, "VirtualSize": { "type": "integer" }, "Labels": { "type": "object", "additionalProperties": { "type": "string" } }, "RepoDigests": { "type": "array", "items": { "type": "string" } } } }, "Image": { "type": "object", "properties": { "Id": { "type": "string" }, "Container": { "type": "string" }, "Comment": { "type": "string" }, "Os": { "type": "string" }, "Architecture": { "type": "string" }, "Parent": { "type": "string" }, "ContainerConfig": { "$ref": "#/definitions/ContainerConfig" }, "DockerVersion": { "type": "string" }, "VirtualSize": { "type": "integer" }, "Size": { "type": "integer" }, "Author": { "type": "string" }, "Created": { "type": "string" }, "GraphDriver": { "$ref": "#/definitions/GraphDriver" }, "RepoDigests": { "type": "array", "items": { "type": "string" } }, "RepoTags": { "type": "array", "items": { "type": "string" } }, "Config": { "$ref": "#/definitions/ContainerConfig" } } }, "ImageHistoryItem": { "type": "object", "properties": { "Id": { "type": "string" }, "Created": { "type": "integer" }, "CreatedBy": { "type": "string" }, "Tags": { "type": "array", "items": { "type": "string" } }, "Size": { "type": "integer" }, "Comment": { "type": "string" } } }, "ImageSearchResult": { "type": "object", "properties": { "description": { "type": "string" }, "is_official": { "type": "boolean" }, "is_automated": { "type": "boolean" }, "name": { "type": "string" }, "star_count": { "type": "integer" } } }, "AuthConfig": { "type": "object", "properties": { "username": { "type": "string" }, "password": { "type": "string" }, "email": { "type": "string" }, "serveraddress": { "type": "string" } } }, "SystemInformation": { "type": "object", "properties": { "Containers": { "type": "integer" }, "CpuCfsPeriod": { "type": "boolean" }, "CpuCfsQuota": { "type": "boolean" }, "Debug": { "type": "boolean" }, "DiscoveryBackend": { "type": "string" }, "DockerRootDir": { "type": "string" }, "Driver": { "type": "string" }, "DriverStatus": { "type": "array", "items": { "type": "array", "items": { "type": "string" } } }, "ExecutionDriver": { "type": "string" }, "ExperimentalBuild": { "type": "boolean" }, "HttpProxy": { "type": "string" }, "HttpsProxy": { "type": "string" }, "ID": { "type": "string" }, "IPv4Forwarding": { "type": "boolean" }, "Images": { "type": "integer" }, "IndexServerAddress": { "type": "string" }, "InitPath": { "type": "string" }, "InitSha1": { "type": "string" }, "KernelVersion": { "type": "string" }, "Labels": { "type": "array", "items": { "type": "string" } }, "MemTotal": { "type": "integer" }, "MemoryLimit": { "type": "boolean" }, "NCPU": { "type": "integer" }, "NEventsListener": { "type": "integer" }, "NFd": { "type": "integer" }, "NGoroutines": { "type": "integer" }, "Name": { "type": "string" }, "NoProxy": { "type": "string" }, "OomKillDisable": { "type": "boolean" }, "OperatingSystem": { "type": "string" }, "RegistryConfig": { "$ref": "#/definitions/RegistryConfig" }, "SwapLimit": { "type": "boolean" }, "SystemTime": { "type": "string" }, "ServerVersion": { "type": "string" } } }, "RegistryConfig": { "type": "object", "properties": { "IndexConfigs": { "type": "object", "additionalProperties": { "$ref": "#/definitions/Registry" } }, "InsecureRegistryCIDRs": { "type": "array", "items": { "type": "string" } } } }, "Registry": { "type": "object", "properties": { "Mirrors": { "type": "array", "items": { "type": "string" } }, "Name": { "type": "string" }, "Official": { "type": "boolean" }, "Secure": { "type": "boolean" } } }, "CommitResult": { "type": "object", "properties": { "Id": { "type": "string" } } }, "ExecCreateResult": { "type": "object", "properties": { "Id": { "type": "string" }, "Warnings": { "type": "array", "items": { "type": "string" } } } }, "ExecConfig": { "type": "object", "properties": { "AttachStdin": { "type": "boolean" }, "AttachStdout": { "type": "boolean" }, "AttachStderr": { "type": "boolean" }, "Tty": { "type": "boolean" }, "Cmd": { "type": "array", "items": { "type": "string" } } } }, "ExecStartConfig": { "type": "object", "properties": { "Detach": { "type": "boolean" }, "Tty": { "type": "boolean" } } }, "ExecCommand": { "type": "object", "properties": { "ID": { "type": "string" }, "Running": { "type": "boolean" }, "ExitCode": { "type": "integer" }, "ProcessConfig": { "$ref": "#/definitions/ProcessConfig" }, "OpenStdin": { "type": "boolean" }, "OpenStderr": { "type": "boolean" }, "OpenStdout": { "type": "boolean" }, "Container": { "$ref": "#/definitions/Container" } } }, "ProcessConfig": { "type": "object", "properties": { "privileged": { "type": "boolean" }, "user": { "type": "string" }, "tty": { "type": "boolean" }, "entrypoint": { "type": "string" }, "arguments": { "type": "array", "items": { "type": "string" } } } }, "VolumeList": { "type": "object", "properties": { "Volumes": { "type": "array", "items": { "$ref": "#/definitions/Volume" } } } }, "Volume": { "type": "object", "properties": { "Name": { "type": "string" }, "Driver": { "type": "string" }, "Mountpoint": { "type": "string" } } }, "VolumeConfig": { "type": "object", "properties": { "Name": { "type": "string" }, "Driver": { "type": "string" }, "DriverOpts": { "type": "object", "additionalProperties": { "type": "string" } } } }, "Network": { "type": "object", "properties": { "Name": { "type": "string" }, "Id": { "type": "string" }, "Scope": { "type": "string" }, "Driver": { "type": "string" }, "IPAM": { "$ref": "#/definitions/IPAM" }, "Containers": { "type": "object", "additionalProperties": { "$ref": "#/definitions/NetworkContainer" } }, "Options": { "type": "object", "additionalProperties": { "type": "string" } } } }, "IPAM": { "type": "object", "properties": { "Driver": { "type": "string" }, "Config": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "NetworkContainer": { "type": "object", "properties": { "EndpointID": { "type": "string" }, "MacAddress": { "type": "string" }, "IPv4Address": { "type": "string" }, "IPv6Address": { "type": "string" } } }, "NetworkCreateResult": { "type": "object", "properties": { "Id": { "type": "string" }, "Warning": { "type": "string" } } }, "NetworkCreateConfig": { "type": "object", "properties": { "Name": { "type": "string" }, "Driver": { "type": "string" }, "IPAM": { "$ref": "#/definitions/IPAM" } } }, "ContainerConnect": { "type": "object", "properties": { "Container": { "type": "string" } } }, "ContainerCreateResult": { "type": "object", "properties": { "Id": { "type": "string" }, "Warnings": { "type": "array", "items": { "type": "string" } } } }, "BuildInfo": { "type": "object", "properties": { "id": { "type": "string" }, "stream": { "type": "string" }, "error": { "type": "string" }, "errorDetail": { "$ref": "#/definitions/ErrorDetail" }, "status": { "type": "string" }, "progress": { "type": "string" }, "progressDetail": { "$ref": "#/definitions/ProgressDetail" } } }, "CreateImageInfo": { "type": "object", "properties": { "error": { "type": "string" }, "status": { "type": "string" }, "progress": { "type": "string" }, "progressDetail": { "$ref": "#/definitions/ProgressDetail" } } }, "PushImageInfo": { "type": "object", "properties": { "error": { "type": "string" }, "status": { "type": "string" }, "progress": { "type": "string" }, "progressDetail": { "$ref": "#/definitions/ProgressDetail" } } }, "ErrorDetail": { "type": "object", "properties": { "code": { "type": "integer" }, "message": { "type": "string" } } }, "ProgressDetail": { "type": "object", "properties": { "code": { "type": "integer" }, "message": { "type": "integer" } } }, "Event": { "type": "object", "properties": { "status": { "type": "string" }, "id": { "type": "string" }, "from": { "type": "string" }, "time": { "type": "integer" }, "timeNano": { "type": "integer" } } } }, "paths": { "/containers/json": { "get": { "summary": "List containers", "description": "List containers", "operationId": "findAll", "parameters": [{ "name": "all", "in": "query", "description": "Show all containers. Only running containers are shown by default (i.e., this defaults to false)", "type": "boolean", "default": false }, { "name": "limit", "in": "query", "description": "Show last created containers, include non-running ones.", "type": "integer" }, { "name": "since", "in": "query", "description": "Show only containers created since Id, include non-running ones.", "type": "string" }, { "name": "before", "in": "query", "description": "Show only containers created before Id, include non-running ones.", "type": "string" }, { "name": "size", "in": "query", "description": "1/True/true or 0/False/false, Show the containers sizes.", "type": "boolean" }, { "name": "filters", "in": "query", "description": "A JSON encoded value of the filters (a map[string][]string) to process on the containers list", "type": "array", "items": { "type": "string" } }], "responses": { "200": { "description": "no error", "schema": { "type": "array", "items": { "$ref": "#/definitions/ContainerConfig" } } }, "400": { "description": "bad parameter" }, "500": { "description": "server error" } }, "tags": ["Container"] } }, "/containers/create": { "post": { "summary": "Create a container", "description": "Create a container", "operationId": "create", "parameters": [{ "name": "name", "in": "query", "description": "Assign the specified name to the container. Must match /?[a-zA-Z0-9_-]+.", "type": "string", "pattern": "/?[a-zA-Z0-9_-]+" }, { "name": "container", "in": "body", "description": "Container to create", "schema": { "$ref": "#/definitions/ContainerConfig" } }, { "name": "Content-Type", "required": true, "in": "header", "type": "string", "default": "application/json", "description": "Content Type of input" }], "responses": { "201": { "description": "no error", "schema": { "$ref": "#/definitions/ContainerCreateResult" } }, "404": { "description": "no such container" }, "406": { "description": "impossible to attach" }, "500": { "description": "server error" } }, "tags": ["Container"] } }, "/containers/{id}/json": { "get": { "summary": "Inspect a container", "description": "Return low-level information on the container id", "operationId": "find", "responses": { "200": { "description": "no error", "schema": { "$ref": "#/definitions/Container" } }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }], "tags": ["Container"] } }, "/containers/{id}/top": { "get": { "summary": "List processes running inside a container", "description": "List processes running inside the container id", "operationId": "listProcesses", "responses": { "200": { "description": "no error", "schema": { "$ref": "#/definitions/ContainerTop" } }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }, { "name": "ps_args", "in": "query", "description": "ps arguments to use (e.g., aux)", "type": "string" }], "tags": ["Container"] } }, "/containers/{id}/logs": { "get": { "summary": "Get container logs", "description": "Get stdout and stderr logs from the container id. Note: This endpoint works only for containers with json-file logging driver.", "operationId": "logs", "responses": { "101": { "description": "no error, hints proxy about hijacking", "schema": { "type": "string" } }, "200": { "description": "no error, no upgrade header found", "schema": { "type": "string" } }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }, { "name": "follow", "in": "query", "description": "1/True/true or 0/False/false, return stream. Default false.", "type": "boolean", "default": false }, { "name": "stdout", "in": "query", "description": "1/True/true or 0/False/false, show stdout log. Default false.", "type": "boolean", "default": false }, { "name": "stderr", "in": "query", "description": "1/True/true or 0/False/false, show stderr log. Default false.", "type": "boolean", "default": false }, { "name": "since", "in": "query", "description": "UNIX timestamp (integer) to filter logs. Specifying a timestamp will only output log-entries since that timestamp. Default: 0 (unfiltered)", "type": "integer", "default": 0 }, { "name": "timestamps", "in": "query", "description": "1/True/true or 0/False/false, print timestamps for every log line. ", "type": "boolean", "default": false }, { "name": "tail", "in": "query", "description": "Output specified number of lines at the end of logs: all or . Default all.", "type": "string" }], "tags": ["Container"] } }, "/containers/{id}/changes": { "get": { "summary": "Inspect changes on a container’s filesystem", "description": "Inspect changes on a container’s filesystem", "operationId": "changes", "responses": { "200": { "description": "no error", "schema": { "type": "array", "items": { "$ref": "#/definitions/ContainerChange" } } }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }, { "name": "kind", "in": "query", "description": "Kind of changes", "type": "integer", "enum": [0, 1, 2] }], "tags": ["Container"] } }, "/containers/{id}/export": { "get": { "summary": "Export a container", "description": "Export the contents of container id", "operationId": "export", "responses": { "200": { "description": "no error", "schema": { "type": "string" } }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }], "tags": ["Container"] } }, "/containers/{id}/stats": { "get": { "summary": "Get container stats based on resource usage", "description": "This endpoint returns a live stream of a container’s resource usage statistics.", "operationId": "stats", "responses": { "200": { "description": "no error", "schema": { "type": "object" } }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }, { "name": "stream", "in": "query", "description": "Stream stats", "type": "boolean" }], "tags": ["Container"] } }, "/containers/{id}/resize": { "post": { "summary": "Resize a container TTY", "description": "Resize the TTY for container with id. The unit is number of characters. You must restart the container for the resize to take effect.", "operationId": "resize", "responses": { "200": { "description": "no error" }, "404": { "description": "no such container" }, "500": { "description": "cannot resize container" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }, { "name": "h", "in": "query", "description": "Height of the tty session", "type": "integer" }, { "name": "w", "in": "query", "description": "Width of the tty session", "type": "integer" }], "tags": ["Container"] } }, "/containers/{id}/start": { "post": { "summary": "Start a container", "description": "Start the container id", "operationId": "start", "responses": { "204": { "description": "no error" }, "304": { "description": "container already started" }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }], "tags": ["Container"] } }, "/containers/{id}/stop": { "post": { "summary": "Stop a container", "description": "Stop the container id", "operationId": "stop", "responses": { "204": { "description": "no error" }, "304": { "description": "container already stopped" }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }, { "name": "t", "in": "query", "description": "number of seconds to wait before killing the container", "type": "integer" }], "tags": ["Container"] } }, "/containers/{id}/restart": { "post": { "summary": "Restart a container", "description": "Restart the container id", "operationId": "restart", "responses": { "204": { "description": "no error" }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }, { "name": "t", "in": "query", "description": "number of seconds to wait before killing the container", "type": "integer" }], "tags": ["Container"] } }, "/containers/{id}/kill": { "post": { "summary": "Kill a container", "description": "Send a posix signal to a container", "operationId": "kill", "responses": { "204": { "description": "no error" }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }, { "name": "signal", "in": "query", "description": "Signal to send to the container, integer or string like SIGINT, defaults to SIGKILL", "type": "string" }], "tags": ["Container"] } }, "/containers/{id}/rename": { "post": { "summary": "Rename a container", "description": "Rename the container id to a new_name", "operationId": "rename", "responses": { "204": { "description": "no error" }, "404": { "description": "no such container" }, "409": { "description": "conflict, name already assigned" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }, { "name": "name", "in": "query", "required": true, "description": "New name for the container", "type": "string" }], "tags": ["Container"] } }, "/containers/{id}/pause": { "post": { "summary": "Pause a container", "description": "Pause the container id", "operationId": "pause", "responses": { "204": { "description": "no error" }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }], "tags": ["Container"] } }, "/containers/{id}/unpause": { "post": { "summary": "Unpause a container", "description": "Unpause the container id", "operationId": "unpause", "responses": { "204": { "description": "no error" }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }], "tags": ["Container"] } }, "/containers/{id}/attach": { "post": { "summary": "Attach to a container", "description": "Attach to the container id", "operationId": "attach", "responses": { "200": { "description": "no error" }, "400": { "description": "bad parameter" }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }, { "name": "logs", "in": "query", "description": "1/True/true or 0/False/false, return logs. Default false", "type": "string" }, { "name": "stream", "in": "query", "description": "1/True/true or 0/False/false, return stream. Default false", "type": "string" }, { "name": "stdin", "in": "query", "description": "1/True/true or 0/False/false, if stream=true, attach to stdin. Default false.", "type": "string" }, { "name": "stdout", "in": "query", "description": "1/True/true or 0/False/false, if logs=true, return stdout log, if stream=true, attach to stdout. Default false.", "type": "string" }, { "name": "stderr", "in": "query", "description": "1/True/true or 0/False/false, if logs=true, return stderr log, if stream=true, attach to stderr. Default false.", "type": "string" }], "tags": ["Container"] } }, "/containers/{id}/attach/ws": { "get": { "summary": "Attach to a container (websocket)", "description": "Attach to the container id with a websocket.", "operationId": "attachWebsocket", "responses": { "101": { "description": "no error, hints proxy about hijacking" }, "200": { "description": "no error, no upgrade header found" }, "400": { "description": "bad parameter" }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }, { "name": "logs", "in": "query", "description": "1/True/true or 0/False/false, return logs. Default false", "type": "string" }, { "name": "stream", "in": "query", "description": "1/True/true or 0/False/false, return stream. Default false", "type": "string" }, { "name": "stdin", "in": "query", "description": "1/True/true or 0/False/false, if stream=true, attach to stdin. Default false.", "type": "string" }, { "name": "stdout", "in": "query", "description": "1/True/true or 0/False/false, if logs=true, return stdout log, if stream=true, attach to stdout. Default false.", "type": "string" }, { "name": "stderr", "in": "query", "description": "1/True/true or 0/False/false, if logs=true, return stderr log, if stream=true, attach to stderr. Default false.", "type": "string" }], "tags": ["Container"] } }, "/containers/{id}/wait": { "post": { "summary": "Wait a container", "description": "Block until container id stops, then returns the exit code", "operationId": "wait", "responses": { "200": { "description": "no error", "schema": { "$ref": "#/definitions/ContainerWait" } }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }], "tags": ["Container"] } }, "/containers/{id}": { "delete": { "summary": "Remove a container", "description": "Remove the container id from the filesystem", "operationId": "remove", "responses": { "204": { "description": "no error" }, "400": { "description": "bad parameter" }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }, { "name": "v", "in": "query", "description": "1/True/true or 0/False/false, Remove the volumes associated to the container. Default false.", "type": "string" }, { "name": "force", "in": "query", "description": "1/True/true or 0/False/false, Kill then remove the container. Default false.", "type": "string" }], "tags": ["Container"] } }, "/containers/{id}/archive": { "head": { "summary": "Retrieving information about files and folders in a container", "description": "Retrieving information about files and folders in a container", "operationId": "getArchiveInformation", "responses": { "204": { "description": "no error" }, "404": { "description": "no such container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }, { "name": "path", "in": "query", "required": true, "description": "Resource in the container’s filesystem to archive.", "type": "string" }], "tags": ["Container"] }, "get": { "summary": "Get an archive of a filesystem resource in a container", "description": "Get an tar archive of a resource in the filesystem of container id.", "operationId": "getArchive", "responses": { "200": { "description": "no error" }, "400": { "description": "client error, bad parameter, details in JSON response body, one of: must specify path parameter (path cannot be empty) not a directory (path was asserted to be a directory but exists as a file)" }, "404": { "description": "no such container or path does not exist inside the container" }, "500": { "description": "server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }, { "name": "path", "in": "query", "required": true, "description": "Resource in the container’s filesystem to archive.", "type": "string" }], "tags": ["Container"] }, "put": { "summary": "Extract an archive of files or folders to a directory in a container", "description": "Upload a tar archive to be extracted to a path in the filesystem of container id.", "operationId": "putArchive", "responses": { "200": { "description": "The content was extracted successfully" }, "400": { "description": "Bad parameter" }, "403": { "description": "Permission denied, the volume or container rootfs is marked as read-only." }, "404": { "description": "No such container or path does not exist inside the container" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The container id or name", "type": "string" }, { "name": "path", "in": "query", "required": true, "description": "Path to a directory in the container to extract the archive’s contents into. ", "type": "string" }, { "name": "noOverwriteDirNonDir", "in": "query", "description": "If “1”, “true”, or “True” then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa.", "type": "string" }, { "name": "inputStream", "in": "body", "required": true, "description": "The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz.", "schema": { "type": "string" } }], "tags": ["Container"] } }, "/images/json": { "get": { "summary": "List Images", "description": "List Images", "operationId": "findAll", "responses": { "200": { "description": "no error", "schema": { "type": "array", "items": { "$ref": "#/definitions/ImageItem" } } }, "500": { "description": "server error" } }, "parameters": [{ "name": "all", "in": "query", "description": "Show all images. Only images from a final layer (no children) are shown by default.", "type": "boolean", "default": false }, { "name": "filters", "in": "query", "description": "A JSON encoded value of the filters (a map[string][]string) to process on the containers list", "type": "string" }, { "name": "filter", "in": "query", "description": "Only return images with the specified name.", "type": "string" }, { "name": "digests", "in": "query", "description": "Show digest information, default to false", "type": "boolean" }], "tags": ["Image"] } }, "/build": { "post": { "summary": "Build an image from Dockerfile via stdin", "description": "Build an image from Dockerfile via stdin", "operationId": "build", "parameters": [{ "name": "inputStream", "in": "body", "description": "The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz.", "schema": { "type": "string" } }, { "name": "dockerfile", "in": "query", "description": "Path within the build context to the Dockerfile. This is ignored if remote is specified and points to an individual filename.", "type": "string" }, { "name": "t", "in": "query", "description": "A repository name (and optionally a tag) to apply to the resulting image in case of success.", "type": "string" }, { "name": "remote", "in": "query", "description": "A Git repository URI or HTTP/HTTPS URI build source. If the URI specifies a filename, the file’s contents are placed into a file called Dockerfile.", "type": "string" }, { "name": "q", "in": "query", "description": "Suppress verbose build output.", "type": "boolean", "default": false }, { "name": "nocache", "in": "query", "description": "Do not use the cache when building the image.", "type": "boolean", "default": false }, { "name": "pull", "in": "query", "description": "Attempt to pull the image even if an older image exists locally", "type": "string" }, { "name": "rm", "in": "query", "description": "Remove intermediate containers after a successful build (default behavior).", "type": "boolean", "default": true }, { "name": "forcerm", "in": "query", "description": "always remove intermediate containers (includes rm)", "type": "boolean", "default": false }, { "name": "memory", "in": "query", "description": "Set memory limit for build.", "type": "integer" }, { "name": "memswap", "in": "query", "description": "Total memory (memory + swap), -1 to disable swap.", "type": "integer" }, { "name": "cpushares", "in": "query", "description": "CPU shares (relative weight).", "type": "integer" }, { "name": "cpusetcpus", "in": "query", "description": "CPUs in which to allow execution (e.g., 0-3, 0,1).", "type": "string" }, { "name": "cpuperiod", "in": "query", "description": "The length of a CPU period in microseconds.", "type": "integer" }, { "name": "cpuquota", "in": "query", "description": "Microseconds of CPU time that the container can get in a CPU period.", "type": "integer" }, { "name": "buildargs", "in": "query", "description": "Total memory (memory + swap), -1 to disable swap.", "type": "integer" }, { "name": "Content-type", "in": "header", "description": " Set to 'application/tar'.", "type": "string", "enum": ["application/tar"], "default": "application/tar" }, { "name": "X-Registry-Config", "in": "header", "description": "A base64-url-safe-encoded Registry Auth Config JSON object", "type": "string" }], "responses": { "200": { "description": "no error" }, "500": { "description": "server error" } }, "tags": ["Image"] } }, "/images/create": { "post": { "summary": "Create an image", "description": "Create an image either by pulling it from the registry or by importing it", "operationId": "create", "consumes": ["application/octet-stream"], "responses": { "200": { "description": "no error" }, "500": { "description": "server error" } }, "parameters": [{ "name": "fromImage", "in": "query", "description": "Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image.", "type": "string" }, { "name": "fromSrc", "in": "query", "description": "Source to import. The value may be a URL from which the image can be retrieved or - to read the image from the request body. This parameter may only be used when importing an image.", "type": "string" }, { "name": "repo", "in": "query", "description": "Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image.", "type": "string" }, { "name": "tag", "in": "query", "description": "Tag or digest.", "type": "string" }, { "name": "inputImage", "in": "body", "description": "Image content if the value - has been specified in fromSrc query parameter", "schema": { "type": "string", "format": "binary" }, "required": false }, { "name": "X-Registry-Config", "in": "header", "description": "A base64-encoded AuthConfig object", "type": "string" }], "tags": ["Image"] } }, "/images/{name}/json": { "get": { "summary": "Inspect an image", "description": "Return low-level information on the image name", "operationId": "find", "responses": { "200": { "description": "No error", "schema": { "$ref": "#/definitions/Image" } }, "404": { "description": "No such image" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "name", "in": "path", "description": "Image name or id", "type": "string", "required": true }], "tags": ["Image"] } }, "/images/{name}/history": { "get": { "summary": "Get the history of an image", "description": "Return the history of the image name", "operationId": "history", "responses": { "200": { "description": "No error", "schema": { "type": "array", "items": { "$ref": "#/definitions/ImageHistoryItem" } } }, "404": { "description": "No such image" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "name", "in": "path", "description": "Image name or id", "type": "string", "required": true }], "tags": ["Image"] } }, "/images/{name}/push": { "post": { "summary": "Push an image to the registry", "description": "Push the image name on the registry", "operationId": "push", "responses": { "200": { "description": "No error" }, "404": { "description": "No such image" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "name", "in": "path", "description": "Image name or id", "type": "string", "required": true }, { "name": "tag", "in": "query", "description": "The tag to associate with the image on the registry.", "type": "string" }, { "name": "X-Registry-Auth", "in": "header", "description": "A base64-encoded AuthConfig object", "type": "string", "required": true }], "tags": ["Image"] } }, "/images/{name}/tag": { "post": { "summary": "Tag an image into a repository", "description": "Tag the image name into a repository", "operationId": "tag", "responses": { "201": { "description": "No error" }, "400": { "description": "Bad parameter" }, "404": { "description": "No such image" }, "409": { "description": "Conflict" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "name", "in": "path", "description": "Image name or id", "type": "string", "required": true }, { "name": "repo", "in": "query", "description": "The repository to tag in.", "type": "string" }, { "name": "force", "in": "query", "description": "1/True/true or 0/False/false, default false", "type": "string" }, { "name": "tag", "in": "query", "description": "The new tag name.", "type": "string" }], "tags": ["Image"] } }, "/images/{name}": { "delete": { "summary": "Remove an image", "description": "Remove the image name from the filesystem", "operationId": "remove", "responses": { "200": { "description": "No error" }, "404": { "description": "No such image" }, "409": { "description": "Conflict" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "name", "in": "path", "description": "Image name or id", "type": "string", "required": true }, { "name": "force", "in": "query", "description": "1/True/true or 0/False/false, default false", "type": "string" }, { "name": "noprune", "in": "query", "description": "1/True/true or 0/False/false, default false.", "type": "string" }], "tags": ["Image"] } }, "/images/search": { "get": { "summary": "Search images", "description": "Search for an image on Docker Hub.", "operationId": "search", "responses": { "200": { "description": "No error", "schema": { "type": "array", "items": { "$ref": "#/definitions/ImageSearchResult" } } }, "500": { "description": "Server error" } }, "parameters": [{ "name": "term", "in": "query", "description": "Term to search", "type": "string" }], "tags": ["Image"] } }, "/auth": { "post": { "summary": "Check auth configuration", "description": "Check auth configuration.", "operationId": "checkAuthentication", "responses": { "200": { "description": "No error" }, "204": { "description": "No error" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "authConfig", "in": "body", "description": "Authentication to check", "schema": { "$ref": "#/definitions/AuthConfig" } }], "tags": ["Misc"] } }, "/info": { "get": { "summary": "Display system-wide information", "description": "Display system-wide information.", "operationId": "getSystemInformation", "responses": { "200": { "description": "No error", "schema": { "$ref": "#/definitions/SystemInformation" } }, "500": { "description": "Server error" } }, "tags": ["Misc"] } }, "/version": { "get": { "summary": "Show the docker version information", "description": "Show the docker version information", "operationId": "getVersion", "responses": { "200": { "description": "no error", "schema": { "$ref": "#/definitions/Version" } }, "500": { "description": "server error" } }, "tags": ["Misc"] } }, "/_ping": { "get": { "summary": "Ping the docker server", "description": "Ping the docker server", "operationId": "ping", "produces": ["text/plain"], "responses": { "200": { "description": "no error", "schema": { "type": "string" } }, "500": { "description": "server error" } }, "tags": ["Misc"] } }, "/commit": { "post": { "summary": "Create a new image from a container’s changes", "description": "Create a new image from a container’s changes", "operationId": "commit", "responses": { "201": { "description": "no error", "schema": { "$ref": "#/definitions/CommitResult" } }, "500": { "description": "server error" } }, "parameters": [{ "name": "containerConfig", "in": "body", "description": "The container configuration", "schema": { "$ref": "#/definitions/ContainerConfig" } }, { "name": "container", "in": "query", "description": "Container id or name to commit", "type": "string" }, { "name": "repo", "in": "query", "description": "Repository name for the created image", "type": "string" }, { "name": "tag", "in": "query", "description": "Tag name for the create image", "type": "string" }, { "name": "comment", "in": "query", "description": "Commit message", "type": "string" }, { "name": "author", "in": "query", "description": "author (e.g., “John Hannibal Smith “)", "type": "string" }, { "name": "pause", "in": "query", "description": "1/True/true or 0/False/false, whether to pause the container before committing", "type": "string" }, { "name": "changes", "in": "query", "description": "Dockerfile instructions to apply while committing", "type": "string" }], "tags": ["Image"] } }, "/events": { "get": { "summary": "Monitor Docker’s events", "description": "Get container events from docker, either in real time via streaming, or via polling (using since).", "operationId": "getEvents", "responses": { "200": { "description": "no error" }, "500": { "description": "server error" } }, "parameters": [{ "name": "since", "in": "query", "description": "Timestamp used for polling", "type": "integer" }, { "name": "until", "in": "query", "description": "Timestamp used for polling", "type": "integer" }, { "name": "filters", "in": "query", "description": "A json encoded value of the filters (a map[string][]string) to process on the event list.", "type": "string" }], "tags": ["Misc"] } }, "/images/{name}/get": { "get": { "summary": "Get a tarball containing all images in a repository", "description": "Get a tarball containing all images and metadata for the repository specified by name.", "operationId": "save", "responses": { "200": { "description": "no error", "schema": { "type": "string" } }, "500": { "description": "server error" } }, "parameters": [{ "name": "name", "in": "path", "description": "Image name or id", "type": "string", "required": true }], "tags": ["Image"] } }, "/images/get": { "get": { "summary": "Get a tarball containing all images.", "description": "Get a tarball containing all images and metadata for one or more repositories.", "operationId": "saveAll", "responses": { "200": { "description": "no error", "schema": { "type": "string" } }, "500": { "description": "server error" } }, "parameters": [{ "name": "names", "in": "query", "description": "Image names to filter", "type": "array", "items": { "type": "string" } }], "tags": ["Image"] } }, "/images/load": { "post": { "summary": "Load a tarball with a set of images and tags into docker.", "description": "Load a set of images and tags into a Docker repository. See the image tarball format for more details.", "operationId": "load", "responses": { "200": { "description": "no error" }, "500": { "description": "server error" } }, "parameters": [{ "name": "imagesTarball", "in": "body", "description": "Tar archive containing images", "schema": { "type": "string" } }], "tags": ["Image"] } }, "/containers/{id}/exec": { "post": { "summary": "Exec Create", "description": "Sets up an exec instance in a running container id", "operationId": "create", "responses": { "201": { "description": "no error", "schema": { "$ref": "#/definitions/ExecCreateResult" } }, "404": { "description": "no such container" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "execConfig", "in": "body", "description": "Exec configuration", "schema": { "$ref": "#/definitions/ExecConfig" }, "required": true }, { "name": "Content-Type", "in": "header", "description": "Content Type Header", "required": true, "type": "string", "default": "application/json" }, { "name": "id", "in": "path", "description": "Container name or id", "type": "string", "required": true }], "tags": ["Exec"] } }, "/exec/{id}/start": { "post": { "summary": "Exec Start", "description": "Starts a previously set up exec instance id. If detach is true, this API returns after starting the exec command. Otherwise, this API sets up an interactive session with the exec command.", "operationId": "start", "responses": { "200": { "description": "No error" }, "404": { "description": "No such exec instance" }, "409": { "description": "Container is stopped or paused" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "execStartConfig", "in": "body", "description": "Exec configuration", "schema": { "$ref": "#/definitions/ExecStartConfig" } }, { "name": "Content-Type", "in": "header", "description": "Content Type Header", "required": true, "type": "string", "default": "application/json" }, { "name": "id", "in": "path", "description": "Exec instance id", "required": true, "type": "string" }], "tags": ["Exec"] } }, "/exec/{id}/resize": { "post": { "summary": "Exec Resize", "description": "Resize the tty session used by the exec command id.", "operationId": "resize", "responses": { "201": { "description": "No error" }, "404": { "description": "No such exec instance" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "id", "in": "path", "description": "Exec instance id", "required": true, "type": "string" }, { "name": "h", "in": "query", "description": "Height of the tty session", "type": "integer", "format": "int64" }, { "name": "w", "in": "query", "description": "Width of the tty session", "type": "integer", "format": "int64" }], "tags": ["Exec"] } }, "/exec/{id}/json": { "post": { "summary": "Exec Inspect", "description": "Return low-level information about the exec command id.", "operationId": "find", "responses": { "200": { "description": "No error", "schema": { "$ref": "#/definitions/ExecCommand" } }, "404": { "description": "No such exec instance" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "id", "in": "path", "description": "Exec instance id", "required": true, "type": "string" }], "tags": ["Exec"] } }, "/volumes": { "get": { "summary": "List volumes", "description": "List volumes.", "operationId": "findAll", "responses": { "200": { "description": "No error", "schema": { "$ref": "#/definitions/VolumeList" } }, "500": { "description": "Server error" } }, "parameters": [{ "name": "filters", "in": "query", "description": "JSON encoded value of the filters (a map[string][]string) to process on the volumes list", "type": "string" }], "tags": ["Volume"] } }, "/volumes/create": { "post": { "summary": "Create a volume", "description": "Create a volume.", "operationId": "create", "responses": { "201": { "description": "No error", "schema": { "$ref": "#/definitions/Volume" } }, "500": { "description": "Server error" } }, "parameters": [{ "name": "volumeConfig", "in": "body", "required": true, "description": "Volume configuration", "schema": { "$ref": "#/definitions/VolumeConfig" } }], "tags": ["Volume"] } }, "/volumes/{name}": { "get": { "summary": "Inspect a volume", "description": "Inspect a volume.", "operationId": "find", "responses": { "200": { "description": "No error", "schema": { "$ref": "#/definitions/Volume" } }, "404": { "description": "No such volume" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "name", "in": "path", "required": true, "description": "Volume name or id", "type": "string" }], "tags": ["Volume"] }, "delete": { "summary": "Remove a volume", "description": "Instruct the driver to remove the volume.", "operationId": "remove", "responses": { "204": { "description": "No error" }, "404": { "description": "No such volume or volume driver" }, "409": { "description": "Volume is in use and cannot be removed" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "name", "in": "path", "required": true, "description": "Volume name or id", "type": "string" }], "tags": ["Volume"] } }, "/networks": { "get": { "summary": "List networks", "description": "List networks.", "operationId": "findAll", "responses": { "200": { "description": "No error", "schema": { "type": "array", "items": { "$ref": "#/definitions/Network" } } }, "500": { "description": "Server error" } }, "parameters": [{ "name": "filters", "in": "query", "description": "JSON encoded value of the filters (a map[string][]string) to process on the networks list.", "type": "string" }], "tags": ["Network"] } }, "/networks/{id}": { "get": { "summary": "Inspect network", "description": "Inspect network.", "operationId": "find", "responses": { "200": { "description": "No error", "schema": { "$ref": "#/definitions/Network" } }, "404": { "description": "Network not found" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "id", "in": "path", "description": "Network id or name", "required": true, "type": "string" }], "tags": ["Network"] }, "delete": { "summary": "Remove a network", "description": "Remove a network", "operationId": "remove", "responses": { "204": { "description": "No error" }, "404": { "description": "Network not found" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "id", "in": "path", "description": "Network id or name", "required": true, "type": "string" }], "tags": ["Network"] } }, "/networks/create": { "post": { "summary": "Create network", "description": "Create network.", "operationId": "create", "responses": { "201": { "description": "No error", "schema": { "$ref": "#/definitions/NetworkCreateResult" } }, "404": { "description": "Driver not found" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "networkConfig", "in": "body", "description": "Network configuration", "required": true, "schema": { "$ref": "#/definitions/NetworkCreateConfig" } }], "tags": ["Network"] } }, "/networks/{id}/connect": { "post": { "summary": "Connect a container to a network", "description": "Connect a container to a network.", "operationId": "connect", "responses": { "201": { "description": "No error" }, "404": { "description": "Network or container not found" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "id", "in": "path", "description": "Network id or name", "required": true, "type": "string" }, { "name": "container", "in": "body", "description": "Container", "required": true, "schema": { "$ref": "#/definitions/ContainerConnect" } }], "tags": ["Network"] } }, "/networks/{id}/disconnect": { "post": { "summary": "Disconnect a container to a network", "description": "Disconnect a container to a network.", "operationId": "disconnect", "responses": { "201": { "description": "No error" }, "404": { "description": "Network or container not found" }, "500": { "description": "Server error" } }, "parameters": [{ "name": "id", "in": "path", "description": "Network id or name", "required": true, "type": "string" }, { "name": "container", "in": "body", "description": "Container", "required": true, "schema": { "$ref": "#/definitions/ContainerConnect" } }], "tags": ["Network"] } } } } validate-0.24.0/fixtures/go-swagger/canary/kubernetes/000077500000000000000000000000001457312750000227315ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/canary/kubernetes/swagger.json000066400000000000000000034557071457312750000253100ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "title": "Kubernetes", "version": "unversioned" }, "paths": { "/api/": { "get": { "description": "get available API versions", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core" ], "operationId": "getCoreAPIVersions", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIVersions" } }, "401": { "description": "Unauthorized" } } } }, "/api/v1/": { "get": { "description": "get available resources", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "getCoreV1APIResources", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIResourceList" } }, "401": { "description": "Unauthorized" } } } }, "/api/v1/componentstatuses": { "get": { "description": "list objects of kind ComponentStatus", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1ComponentStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ComponentStatusList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/componentstatuses/{name}": { "get": { "description": "read the specified ComponentStatus", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1ComponentStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ComponentStatus" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the ComponentStatus", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/configmaps": { "get": { "description": "list or watch objects of kind ConfigMap", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1ConfigMapForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ConfigMapList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/endpoints": { "get": { "description": "list or watch objects of kind Endpoints", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1EndpointsForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.EndpointsList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/events": { "get": { "description": "list or watch objects of kind Event", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1EventForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.EventList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/limitranges": { "get": { "description": "list or watch objects of kind LimitRange", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1LimitRangeForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.LimitRangeList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/namespaces": { "get": { "description": "list or watch objects of kind Namespace", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1Namespace", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.NamespaceList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a Namespace", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1Namespace", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Namespace" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Namespace" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of Namespace", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1CollectionNamespace", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/bindings": { "post": { "description": "create a Binding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1NamespacedBinding", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Binding" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Binding" } }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/configmaps": { "get": { "description": "list or watch objects of kind ConfigMap", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1NamespacedConfigMap", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ConfigMapList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a ConfigMap", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1NamespacedConfigMap", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.ConfigMap" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ConfigMap" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of ConfigMap", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1CollectionNamespacedConfigMap", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/configmaps/{name}": { "get": { "description": "read the specified ConfigMap", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedConfigMap", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ConfigMap" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified ConfigMap", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedConfigMap", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.ConfigMap" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ConfigMap" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a ConfigMap", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1NamespacedConfigMap", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified ConfigMap", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedConfigMap", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ConfigMap" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the ConfigMap", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/endpoints": { "get": { "description": "list or watch objects of kind Endpoints", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1NamespacedEndpoints", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.EndpointsList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create Endpoints", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1NamespacedEndpoints", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Endpoints" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Endpoints" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of Endpoints", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1CollectionNamespacedEndpoints", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/endpoints/{name}": { "get": { "description": "read the specified Endpoints", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedEndpoints", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Endpoints" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified Endpoints", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedEndpoints", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Endpoints" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Endpoints" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete Endpoints", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1NamespacedEndpoints", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified Endpoints", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedEndpoints", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Endpoints" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Endpoints", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/events": { "get": { "description": "list or watch objects of kind Event", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1NamespacedEvent", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.EventList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create an Event", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1NamespacedEvent", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Event" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Event" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of Event", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1CollectionNamespacedEvent", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/events/{name}": { "get": { "description": "read the specified Event", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedEvent", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Event" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified Event", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedEvent", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Event" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Event" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete an Event", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1NamespacedEvent", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified Event", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedEvent", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Event", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/limitranges": { "get": { "description": "list or watch objects of kind LimitRange", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1NamespacedLimitRange", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.LimitRangeList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a LimitRange", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1NamespacedLimitRange", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.LimitRange" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.LimitRange" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of LimitRange", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1CollectionNamespacedLimitRange", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/limitranges/{name}": { "get": { "description": "read the specified LimitRange", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedLimitRange", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.LimitRange" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified LimitRange", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedLimitRange", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.LimitRange" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.LimitRange" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a LimitRange", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1NamespacedLimitRange", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified LimitRange", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedLimitRange", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.LimitRange" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the LimitRange", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/persistentvolumeclaims": { "get": { "description": "list or watch objects of kind PersistentVolumeClaim", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1NamespacedPersistentVolumeClaim", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolumeClaimList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a PersistentVolumeClaim", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1NamespacedPersistentVolumeClaim", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.PersistentVolumeClaim" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolumeClaim" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of PersistentVolumeClaim", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1CollectionNamespacedPersistentVolumeClaim", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}": { "get": { "description": "read the specified PersistentVolumeClaim", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedPersistentVolumeClaim", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolumeClaim" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified PersistentVolumeClaim", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedPersistentVolumeClaim", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.PersistentVolumeClaim" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolumeClaim" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a PersistentVolumeClaim", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1NamespacedPersistentVolumeClaim", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified PersistentVolumeClaim", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedPersistentVolumeClaim", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolumeClaim" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the PersistentVolumeClaim", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status": { "get": { "description": "read status of the specified PersistentVolumeClaim", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedPersistentVolumeClaimStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolumeClaim" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified PersistentVolumeClaim", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedPersistentVolumeClaimStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.PersistentVolumeClaim" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolumeClaim" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified PersistentVolumeClaim", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedPersistentVolumeClaimStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolumeClaim" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the PersistentVolumeClaim", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/pods": { "get": { "description": "list or watch objects of kind Pod", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1NamespacedPod", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PodList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a Pod", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1NamespacedPod", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Pod" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Pod" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of Pod", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1CollectionNamespacedPod", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/pods/{name}": { "get": { "description": "read the specified Pod", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedPod", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Pod" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified Pod", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedPod", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Pod" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Pod" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a Pod", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1NamespacedPod", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified Pod", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedPod", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Pod" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Pod", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/pods/{name}/attach": { "get": { "description": "connect GET requests to attach of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1GetNamespacedPodAttach", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "connect POST requests to attach of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1PostNamespacedPodAttach", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "The container in which to execute the command. Defaults to only container if there is only one container in the pod.", "name": "container", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the Pod", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "boolean", "description": "Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.", "name": "stderr", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.", "name": "stdin", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.", "name": "stdout", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.", "name": "tty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/pods/{name}/binding": { "post": { "description": "create binding of a Binding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1NamespacedBindingBinding", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Binding" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Binding" } }, { "uniqueItems": true, "type": "string", "description": "name of the Binding", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/pods/{name}/eviction": { "post": { "description": "create eviction of an Eviction", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1NamespacedEvictionEviction", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.Eviction" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.Eviction" } }, { "uniqueItems": true, "type": "string", "description": "name of the Eviction", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/pods/{name}/exec": { "get": { "description": "connect GET requests to exec of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1GetNamespacedPodExec", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "connect POST requests to exec of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1PostNamespacedPodExec", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "Command is the remote command to execute. argv array. Not executed within a shell.", "name": "command", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "Container in which to execute the command. Defaults to only container if there is only one container in the pod.", "name": "container", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the Pod", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "boolean", "description": "Redirect the standard error stream of the pod for this call. Defaults to true.", "name": "stderr", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Redirect the standard input stream of the pod for this call. Defaults to false.", "name": "stdin", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Redirect the standard output stream of the pod for this call. Defaults to true.", "name": "stdout", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.", "name": "tty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/pods/{name}/log": { "get": { "description": "read log of the specified Pod", "consumes": [ "*/*" ], "produces": [ "text/plain", "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedPodLog", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Pod" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "The container for which to stream logs. Defaults to only container if there is one container in the pod.", "name": "container", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Follow the log stream of the pod. Defaults to false.", "name": "follow", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.", "name": "limitBytes", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the Pod", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Return previous terminated container logs. Defaults to false.", "name": "previous", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", "name": "sinceSeconds", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", "name": "sinceTime", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", "name": "tailLines", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.", "name": "timestamps", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/pods/{name}/portforward": { "get": { "description": "connect GET requests to portforward of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1GetNamespacedPodPortforward", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "connect POST requests to portforward of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1PostNamespacedPodPortforward", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Pod", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true } ] }, "/api/v1/namespaces/{namespace}/pods/{name}/proxy": { "get": { "description": "connect GET requests to proxy of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1GetNamespacedPodProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "connect PUT requests to proxy of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1PutNamespacedPodProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "connect POST requests to proxy of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1PostNamespacedPodProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "connect DELETE requests to proxy of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1DeleteNamespacedPodProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "options": { "description": "connect OPTIONS requests to proxy of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1OptionsNamespacedPodProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "head": { "description": "connect HEAD requests to proxy of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1HeadNamespacedPodProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Pod", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "Path is the URL path to use for the current proxy request to pod.", "name": "path", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}": { "get": { "description": "connect GET requests to proxy of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1GetNamespacedPodProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "connect PUT requests to proxy of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1PutNamespacedPodProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "connect POST requests to proxy of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1PostNamespacedPodProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "connect DELETE requests to proxy of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1DeleteNamespacedPodProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "options": { "description": "connect OPTIONS requests to proxy of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1OptionsNamespacedPodProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "head": { "description": "connect HEAD requests to proxy of Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1HeadNamespacedPodProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Pod", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "path to the resource", "name": "path", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "Path is the URL path to use for the current proxy request to pod.", "name": "path", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/pods/{name}/status": { "get": { "description": "read status of the specified Pod", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedPodStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Pod" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified Pod", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedPodStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Pod" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Pod" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified Pod", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedPodStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Pod" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Pod", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/podtemplates": { "get": { "description": "list or watch objects of kind PodTemplate", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1NamespacedPodTemplate", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PodTemplateList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a PodTemplate", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1NamespacedPodTemplate", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.PodTemplate" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PodTemplate" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of PodTemplate", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1CollectionNamespacedPodTemplate", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/podtemplates/{name}": { "get": { "description": "read the specified PodTemplate", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedPodTemplate", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PodTemplate" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified PodTemplate", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedPodTemplate", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.PodTemplate" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PodTemplate" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a PodTemplate", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1NamespacedPodTemplate", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified PodTemplate", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedPodTemplate", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PodTemplate" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the PodTemplate", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/replicationcontrollers": { "get": { "description": "list or watch objects of kind ReplicationController", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1NamespacedReplicationController", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ReplicationControllerList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a ReplicationController", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1NamespacedReplicationController", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.ReplicationController" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ReplicationController" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of ReplicationController", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1CollectionNamespacedReplicationController", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}": { "get": { "description": "read the specified ReplicationController", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedReplicationController", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ReplicationController" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified ReplicationController", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedReplicationController", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.ReplicationController" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ReplicationController" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a ReplicationController", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1NamespacedReplicationController", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified ReplicationController", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedReplicationController", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ReplicationController" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the ReplicationController", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale": { "get": { "description": "read scale of the specified Scale", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedScaleScale", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Scale" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace scale of the specified Scale", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedScaleScale", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Scale" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Scale" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update scale of the specified Scale", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedScaleScale", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Scale" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Scale", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status": { "get": { "description": "read status of the specified ReplicationController", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedReplicationControllerStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ReplicationController" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified ReplicationController", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedReplicationControllerStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.ReplicationController" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ReplicationController" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified ReplicationController", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedReplicationControllerStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ReplicationController" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the ReplicationController", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/resourcequotas": { "get": { "description": "list or watch objects of kind ResourceQuota", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1NamespacedResourceQuota", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ResourceQuotaList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a ResourceQuota", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1NamespacedResourceQuota", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.ResourceQuota" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ResourceQuota" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of ResourceQuota", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1CollectionNamespacedResourceQuota", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/resourcequotas/{name}": { "get": { "description": "read the specified ResourceQuota", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedResourceQuota", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ResourceQuota" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified ResourceQuota", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedResourceQuota", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.ResourceQuota" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ResourceQuota" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a ResourceQuota", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1NamespacedResourceQuota", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified ResourceQuota", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedResourceQuota", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ResourceQuota" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the ResourceQuota", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/resourcequotas/{name}/status": { "get": { "description": "read status of the specified ResourceQuota", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedResourceQuotaStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ResourceQuota" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified ResourceQuota", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedResourceQuotaStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.ResourceQuota" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ResourceQuota" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified ResourceQuota", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedResourceQuotaStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ResourceQuota" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the ResourceQuota", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/secrets": { "get": { "description": "list or watch objects of kind Secret", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1NamespacedSecret", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.SecretList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a Secret", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1NamespacedSecret", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Secret" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Secret" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of Secret", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1CollectionNamespacedSecret", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/secrets/{name}": { "get": { "description": "read the specified Secret", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedSecret", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Secret" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified Secret", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedSecret", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Secret" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Secret" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a Secret", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1NamespacedSecret", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified Secret", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedSecret", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Secret" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Secret", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/serviceaccounts": { "get": { "description": "list or watch objects of kind ServiceAccount", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1NamespacedServiceAccount", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ServiceAccountList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a ServiceAccount", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1NamespacedServiceAccount", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.ServiceAccount" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ServiceAccount" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of ServiceAccount", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1CollectionNamespacedServiceAccount", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/serviceaccounts/{name}": { "get": { "description": "read the specified ServiceAccount", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedServiceAccount", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ServiceAccount" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified ServiceAccount", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedServiceAccount", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.ServiceAccount" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ServiceAccount" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a ServiceAccount", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1NamespacedServiceAccount", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified ServiceAccount", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedServiceAccount", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ServiceAccount" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the ServiceAccount", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/services": { "get": { "description": "list or watch objects of kind Service", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1NamespacedService", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ServiceList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a Service", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1NamespacedService", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Service" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Service" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/services/{name}": { "get": { "description": "read the specified Service", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedService", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Service" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified Service", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedService", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Service" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Service" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a Service", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1NamespacedService", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified Service", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedService", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Service" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Service", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/services/{name}/proxy": { "get": { "description": "connect GET requests to proxy of Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1GetNamespacedServiceProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "connect PUT requests to proxy of Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1PutNamespacedServiceProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "connect POST requests to proxy of Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1PostNamespacedServiceProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "connect DELETE requests to proxy of Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1DeleteNamespacedServiceProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "options": { "description": "connect OPTIONS requests to proxy of Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1OptionsNamespacedServiceProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "head": { "description": "connect HEAD requests to proxy of Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1HeadNamespacedServiceProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Service", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.", "name": "path", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}": { "get": { "description": "connect GET requests to proxy of Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1GetNamespacedServiceProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "connect PUT requests to proxy of Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1PutNamespacedServiceProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "connect POST requests to proxy of Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1PostNamespacedServiceProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "connect DELETE requests to proxy of Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1DeleteNamespacedServiceProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "options": { "description": "connect OPTIONS requests to proxy of Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1OptionsNamespacedServiceProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "head": { "description": "connect HEAD requests to proxy of Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1HeadNamespacedServiceProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Service", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "path to the resource", "name": "path", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.", "name": "path", "in": "query" } ] }, "/api/v1/namespaces/{namespace}/services/{name}/status": { "get": { "description": "read status of the specified Service", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespacedServiceStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Service" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified Service", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespacedServiceStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Service" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Service" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified Service", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespacedServiceStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Service" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Service", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{name}": { "get": { "description": "read the specified Namespace", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1Namespace", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Namespace" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified Namespace", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1Namespace", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Namespace" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Namespace" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a Namespace", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1Namespace", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified Namespace", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1Namespace", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Namespace" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Namespace", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{name}/finalize": { "put": { "description": "replace finalize of the specified Namespace", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespaceFinalize", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Namespace" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Namespace" } }, { "uniqueItems": true, "type": "string", "description": "name of the Namespace", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/namespaces/{name}/status": { "get": { "description": "read status of the specified Namespace", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NamespaceStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Namespace" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified Namespace", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NamespaceStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Namespace" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Namespace" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified Namespace", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NamespaceStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Namespace" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Namespace", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/nodes": { "get": { "description": "list or watch objects of kind Node", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1Node", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.NodeList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a Node", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1Node", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Node" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Node" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of Node", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1CollectionNode", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/nodes/{name}": { "get": { "description": "read the specified Node", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1Node", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Node" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified Node", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1Node", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Node" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Node" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a Node", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1Node", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified Node", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1Node", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Node" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Node", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/nodes/{name}/proxy": { "get": { "description": "connect GET requests to proxy of Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1GetNodeProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "connect PUT requests to proxy of Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1PutNodeProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "connect POST requests to proxy of Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1PostNodeProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "connect DELETE requests to proxy of Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1DeleteNodeProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "options": { "description": "connect OPTIONS requests to proxy of Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1OptionsNodeProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "head": { "description": "connect HEAD requests to proxy of Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1HeadNodeProxy", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Node", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "Path is the URL path to use for the current proxy request to node.", "name": "path", "in": "query" } ] }, "/api/v1/nodes/{name}/proxy/{path}": { "get": { "description": "connect GET requests to proxy of Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1GetNodeProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "connect PUT requests to proxy of Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1PutNodeProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "connect POST requests to proxy of Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1PostNodeProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "connect DELETE requests to proxy of Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1DeleteNodeProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "options": { "description": "connect OPTIONS requests to proxy of Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1OptionsNodeProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "head": { "description": "connect HEAD requests to proxy of Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "connectCoreV1HeadNodeProxyWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Node", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "path to the resource", "name": "path", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "Path is the URL path to use for the current proxy request to node.", "name": "path", "in": "query" } ] }, "/api/v1/nodes/{name}/status": { "get": { "description": "read status of the specified Node", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1NodeStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Node" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified Node", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1NodeStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Node" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Node" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified Node", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1NodeStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Node" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Node", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/persistentvolumeclaims": { "get": { "description": "list or watch objects of kind PersistentVolumeClaim", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1PersistentVolumeClaimForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolumeClaimList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/persistentvolumes": { "get": { "description": "list or watch objects of kind PersistentVolume", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1PersistentVolume", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolumeList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a PersistentVolume", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "createCoreV1PersistentVolume", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.PersistentVolume" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolume" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of PersistentVolume", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1CollectionPersistentVolume", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/persistentvolumes/{name}": { "get": { "description": "read the specified PersistentVolume", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1PersistentVolume", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolume" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified PersistentVolume", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1PersistentVolume", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.PersistentVolume" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolume" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a PersistentVolume", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "deleteCoreV1PersistentVolume", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified PersistentVolume", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1PersistentVolume", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolume" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the PersistentVolume", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/persistentvolumes/{name}/status": { "get": { "description": "read status of the specified PersistentVolume", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "readCoreV1PersistentVolumeStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolume" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified PersistentVolume", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "replaceCoreV1PersistentVolumeStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.PersistentVolume" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolume" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified PersistentVolume", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "patchCoreV1PersistentVolumeStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PersistentVolume" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the PersistentVolume", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/api/v1/pods": { "get": { "description": "list or watch objects of kind Pod", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1PodForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PodList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/podtemplates": { "get": { "description": "list or watch objects of kind PodTemplate", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1PodTemplateForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.PodTemplateList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/proxy/namespaces/{namespace}/pods/{name}": { "get": { "description": "proxy GET requests to Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1GETNamespacedPod", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "proxy PUT requests to Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1PUTNamespacedPod", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "proxy POST requests to Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1POSTNamespacedPod", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "proxy DELETE requests to Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1DELETENamespacedPod", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "options": { "description": "proxy OPTIONS requests to Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1OPTIONSNamespacedPod", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "head": { "description": "proxy HEAD requests to Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1HEADNamespacedPod", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Pod", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true } ] }, "/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}": { "get": { "description": "proxy GET requests to Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1GETNamespacedPodWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "proxy PUT requests to Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1PUTNamespacedPodWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "proxy POST requests to Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1POSTNamespacedPodWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "proxy DELETE requests to Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1DELETENamespacedPodWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "options": { "description": "proxy OPTIONS requests to Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1OPTIONSNamespacedPodWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "head": { "description": "proxy HEAD requests to Pod", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1HEADNamespacedPodWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Pod", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "path to the resource", "name": "path", "in": "path", "required": true } ] }, "/api/v1/proxy/namespaces/{namespace}/services/{name}": { "get": { "description": "proxy GET requests to Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1GETNamespacedService", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "proxy PUT requests to Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1PUTNamespacedService", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "proxy POST requests to Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1POSTNamespacedService", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "proxy DELETE requests to Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1DELETENamespacedService", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "options": { "description": "proxy OPTIONS requests to Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1OPTIONSNamespacedService", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "head": { "description": "proxy HEAD requests to Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1HEADNamespacedService", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Service", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true } ] }, "/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}": { "get": { "description": "proxy GET requests to Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1GETNamespacedServiceWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "proxy PUT requests to Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1PUTNamespacedServiceWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "proxy POST requests to Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1POSTNamespacedServiceWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "proxy DELETE requests to Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1DELETENamespacedServiceWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "options": { "description": "proxy OPTIONS requests to Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1OPTIONSNamespacedServiceWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "head": { "description": "proxy HEAD requests to Service", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1HEADNamespacedServiceWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Service", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "path to the resource", "name": "path", "in": "path", "required": true } ] }, "/api/v1/proxy/nodes/{name}": { "get": { "description": "proxy GET requests to Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1GETNode", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "proxy PUT requests to Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1PUTNode", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "proxy POST requests to Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1POSTNode", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "proxy DELETE requests to Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1DELETENode", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "options": { "description": "proxy OPTIONS requests to Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1OPTIONSNode", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "head": { "description": "proxy HEAD requests to Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1HEADNode", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Node", "name": "name", "in": "path", "required": true } ] }, "/api/v1/proxy/nodes/{name}/{path}": { "get": { "description": "proxy GET requests to Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1GETNodeWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "proxy PUT requests to Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1PUTNodeWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "proxy POST requests to Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1POSTNodeWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "proxy DELETE requests to Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1DELETENodeWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "options": { "description": "proxy OPTIONS requests to Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1OPTIONSNodeWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "head": { "description": "proxy HEAD requests to Node", "consumes": [ "*/*" ], "produces": [ "*/*" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "proxyCoreV1HEADNodeWithPath", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Node", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "path to the resource", "name": "path", "in": "path", "required": true } ] }, "/api/v1/replicationcontrollers": { "get": { "description": "list or watch objects of kind ReplicationController", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1ReplicationControllerForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ReplicationControllerList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/resourcequotas": { "get": { "description": "list or watch objects of kind ResourceQuota", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1ResourceQuotaForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ResourceQuotaList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/secrets": { "get": { "description": "list or watch objects of kind Secret", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1SecretForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.SecretList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/serviceaccounts": { "get": { "description": "list or watch objects of kind ServiceAccount", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1ServiceAccountForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ServiceAccountList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/services": { "get": { "description": "list or watch objects of kind Service", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "listCoreV1ServiceForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.ServiceList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/configmaps": { "get": { "description": "watch individual changes to a list of ConfigMap", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1ConfigMapListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/endpoints": { "get": { "description": "watch individual changes to a list of Endpoints", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1EndpointsListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/events": { "get": { "description": "watch individual changes to a list of Event", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1EventListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/limitranges": { "get": { "description": "watch individual changes to a list of LimitRange", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1LimitRangeListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces": { "get": { "description": "watch individual changes to a list of Namespace", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespaceList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/configmaps": { "get": { "description": "watch individual changes to a list of ConfigMap", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedConfigMapList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/configmaps/{name}": { "get": { "description": "watch changes to an object of kind ConfigMap", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedConfigMap", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the ConfigMap", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/endpoints": { "get": { "description": "watch individual changes to a list of Endpoints", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedEndpointsList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/endpoints/{name}": { "get": { "description": "watch changes to an object of kind Endpoints", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedEndpoints", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the Endpoints", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/events": { "get": { "description": "watch individual changes to a list of Event", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedEventList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/events/{name}": { "get": { "description": "watch changes to an object of kind Event", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedEvent", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the Event", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/limitranges": { "get": { "description": "watch individual changes to a list of LimitRange", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedLimitRangeList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/limitranges/{name}": { "get": { "description": "watch changes to an object of kind LimitRange", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedLimitRange", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the LimitRange", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/persistentvolumeclaims": { "get": { "description": "watch individual changes to a list of PersistentVolumeClaim", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedPersistentVolumeClaimList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/persistentvolumeclaims/{name}": { "get": { "description": "watch changes to an object of kind PersistentVolumeClaim", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedPersistentVolumeClaim", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the PersistentVolumeClaim", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/pods": { "get": { "description": "watch individual changes to a list of Pod", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedPodList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/pods/{name}": { "get": { "description": "watch changes to an object of kind Pod", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedPod", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the Pod", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/podtemplates": { "get": { "description": "watch individual changes to a list of PodTemplate", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedPodTemplateList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/podtemplates/{name}": { "get": { "description": "watch changes to an object of kind PodTemplate", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedPodTemplate", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the PodTemplate", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/replicationcontrollers": { "get": { "description": "watch individual changes to a list of ReplicationController", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedReplicationControllerList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/replicationcontrollers/{name}": { "get": { "description": "watch changes to an object of kind ReplicationController", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedReplicationController", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the ReplicationController", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/resourcequotas": { "get": { "description": "watch individual changes to a list of ResourceQuota", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedResourceQuotaList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/resourcequotas/{name}": { "get": { "description": "watch changes to an object of kind ResourceQuota", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedResourceQuota", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the ResourceQuota", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/secrets": { "get": { "description": "watch individual changes to a list of Secret", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedSecretList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/secrets/{name}": { "get": { "description": "watch changes to an object of kind Secret", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedSecret", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the Secret", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/serviceaccounts": { "get": { "description": "watch individual changes to a list of ServiceAccount", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedServiceAccountList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/serviceaccounts/{name}": { "get": { "description": "watch changes to an object of kind ServiceAccount", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedServiceAccount", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the ServiceAccount", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/services": { "get": { "description": "watch individual changes to a list of Service", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedServiceList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{namespace}/services/{name}": { "get": { "description": "watch changes to an object of kind Service", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NamespacedService", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the Service", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/namespaces/{name}": { "get": { "description": "watch changes to an object of kind Namespace", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1Namespace", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the Namespace", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/nodes": { "get": { "description": "watch individual changes to a list of Node", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1NodeList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/nodes/{name}": { "get": { "description": "watch changes to an object of kind Node", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1Node", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the Node", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/persistentvolumeclaims": { "get": { "description": "watch individual changes to a list of PersistentVolumeClaim", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1PersistentVolumeClaimListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/persistentvolumes": { "get": { "description": "watch individual changes to a list of PersistentVolume", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1PersistentVolumeList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/persistentvolumes/{name}": { "get": { "description": "watch changes to an object of kind PersistentVolume", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1PersistentVolume", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the PersistentVolume", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/pods": { "get": { "description": "watch individual changes to a list of Pod", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1PodListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/podtemplates": { "get": { "description": "watch individual changes to a list of PodTemplate", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1PodTemplateListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/replicationcontrollers": { "get": { "description": "watch individual changes to a list of ReplicationController", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1ReplicationControllerListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/resourcequotas": { "get": { "description": "watch individual changes to a list of ResourceQuota", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1ResourceQuotaListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/secrets": { "get": { "description": "watch individual changes to a list of Secret", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1SecretListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/serviceaccounts": { "get": { "description": "watch individual changes to a list of ServiceAccount", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1ServiceAccountListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/api/v1/watch/services": { "get": { "description": "watch individual changes to a list of Service", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "core_v1" ], "operationId": "watchCoreV1ServiceListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/": { "get": { "description": "get available API versions", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "apis" ], "operationId": "getAPIVersions", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIGroupList" } }, "401": { "description": "Unauthorized" } } } }, "/apis/apps/": { "get": { "description": "get information of a group", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "apps" ], "operationId": "getAppsAPIGroup", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIGroup" } }, "401": { "description": "Unauthorized" } } } }, "/apis/apps/v1alpha1/": { "get": { "description": "get available resources", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "apps_v1alpha1" ], "operationId": "getAppsV1alpha1APIResources", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIResourceList" } }, "401": { "description": "Unauthorized" } } } }, "/apis/apps/v1alpha1/namespaces/{namespace}/statefulsets": { "get": { "description": "list or watch objects of kind StatefulSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "apps_v1alpha1" ], "operationId": "listAppsV1alpha1NamespacedStatefulSet", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.StatefulSetList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a StatefulSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "apps_v1alpha1" ], "operationId": "createAppsV1alpha1NamespacedStatefulSet", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.StatefulSet" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.StatefulSet" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of StatefulSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "apps_v1alpha1" ], "operationId": "deleteAppsV1alpha1CollectionNamespacedStatefulSet", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}": { "get": { "description": "read the specified StatefulSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "apps_v1alpha1" ], "operationId": "readAppsV1alpha1NamespacedStatefulSet", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.StatefulSet" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified StatefulSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "apps_v1alpha1" ], "operationId": "replaceAppsV1alpha1NamespacedStatefulSet", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.StatefulSet" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.StatefulSet" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a StatefulSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "apps_v1alpha1" ], "operationId": "deleteAppsV1alpha1NamespacedStatefulSet", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified StatefulSet", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "apps_v1alpha1" ], "operationId": "patchAppsV1alpha1NamespacedStatefulSet", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.StatefulSet" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the StatefulSet", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}/status": { "get": { "description": "read status of the specified StatefulSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "apps_v1alpha1" ], "operationId": "readAppsV1alpha1NamespacedStatefulSetStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.StatefulSet" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified StatefulSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "apps_v1alpha1" ], "operationId": "replaceAppsV1alpha1NamespacedStatefulSetStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.StatefulSet" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.StatefulSet" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified StatefulSet", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "apps_v1alpha1" ], "operationId": "patchAppsV1alpha1NamespacedStatefulSetStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.StatefulSet" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the StatefulSet", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/apps/v1alpha1/statefulsets": { "get": { "description": "list or watch objects of kind StatefulSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "apps_v1alpha1" ], "operationId": "listAppsV1alpha1StatefulSetForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.StatefulSetList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/apps/v1alpha1/watch/namespaces/{namespace}/statefulsets": { "get": { "description": "watch individual changes to a list of StatefulSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "apps_v1alpha1" ], "operationId": "watchAppsV1alpha1NamespacedStatefulSetList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/apps/v1alpha1/watch/namespaces/{namespace}/statefulsets/{name}": { "get": { "description": "watch changes to an object of kind StatefulSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "apps_v1alpha1" ], "operationId": "watchAppsV1alpha1NamespacedStatefulSet", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the StatefulSet", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/apps/v1alpha1/watch/statefulsets": { "get": { "description": "watch individual changes to a list of StatefulSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "apps_v1alpha1" ], "operationId": "watchAppsV1alpha1StatefulSetListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/authentication.k8s.io/": { "get": { "description": "get information of a group", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "authentication" ], "operationId": "getAuthenticationAPIGroup", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIGroup" } }, "401": { "description": "Unauthorized" } } } }, "/apis/authentication.k8s.io/v1beta1/": { "get": { "description": "get available resources", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "authentication_v1beta1" ], "operationId": "getAuthenticationV1beta1APIResources", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIResourceList" } }, "401": { "description": "Unauthorized" } } } }, "/apis/authentication.k8s.io/v1beta1/tokenreviews": { "post": { "description": "create a TokenReview", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "authentication_v1beta1" ], "operationId": "createAuthenticationV1beta1TokenReview", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.TokenReview" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.TokenReview" } }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/authorization.k8s.io/": { "get": { "description": "get information of a group", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "authorization" ], "operationId": "getAuthorizationAPIGroup", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIGroup" } }, "401": { "description": "Unauthorized" } } } }, "/apis/authorization.k8s.io/v1beta1/": { "get": { "description": "get available resources", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "authorization_v1beta1" ], "operationId": "getAuthorizationV1beta1APIResources", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIResourceList" } }, "401": { "description": "Unauthorized" } } } }, "/apis/authorization.k8s.io/v1beta1/namespaces/{namespace}/localsubjectaccessreviews": { "post": { "description": "create a LocalSubjectAccessReview", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "authorization_v1beta1" ], "operationId": "createAuthorizationV1beta1NamespacedLocalSubjectAccessReview", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.LocalSubjectAccessReview" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.LocalSubjectAccessReview" } }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/authorization.k8s.io/v1beta1/selfsubjectaccessreviews": { "post": { "description": "create a SelfSubjectAccessReview", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "authorization_v1beta1" ], "operationId": "createAuthorizationV1beta1SelfSubjectAccessReview", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.SelfSubjectAccessReview" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.SelfSubjectAccessReview" } }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/authorization.k8s.io/v1beta1/subjectaccessreviews": { "post": { "description": "create a SubjectAccessReview", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "authorization_v1beta1" ], "operationId": "createAuthorizationV1beta1SubjectAccessReview", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.SubjectAccessReview" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.SubjectAccessReview" } }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/autoscaling/": { "get": { "description": "get information of a group", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "autoscaling" ], "operationId": "getAutoscalingAPIGroup", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIGroup" } }, "401": { "description": "Unauthorized" } } } }, "/apis/autoscaling/v1/": { "get": { "description": "get available resources", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "autoscaling_v1" ], "operationId": "getAutoscalingV1APIResources", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIResourceList" } }, "401": { "description": "Unauthorized" } } } }, "/apis/autoscaling/v1/horizontalpodautoscalers": { "get": { "description": "list or watch objects of kind HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "autoscaling_v1" ], "operationId": "listAutoscalingV1HorizontalPodAutoscalerForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.HorizontalPodAutoscalerList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers": { "get": { "description": "list or watch objects of kind HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "autoscaling_v1" ], "operationId": "listAutoscalingV1NamespacedHorizontalPodAutoscaler", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.HorizontalPodAutoscalerList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "autoscaling_v1" ], "operationId": "createAutoscalingV1NamespacedHorizontalPodAutoscaler", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.HorizontalPodAutoscaler" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.HorizontalPodAutoscaler" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "autoscaling_v1" ], "operationId": "deleteAutoscalingV1CollectionNamespacedHorizontalPodAutoscaler", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}": { "get": { "description": "read the specified HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "autoscaling_v1" ], "operationId": "readAutoscalingV1NamespacedHorizontalPodAutoscaler", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.HorizontalPodAutoscaler" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "autoscaling_v1" ], "operationId": "replaceAutoscalingV1NamespacedHorizontalPodAutoscaler", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.HorizontalPodAutoscaler" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.HorizontalPodAutoscaler" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "autoscaling_v1" ], "operationId": "deleteAutoscalingV1NamespacedHorizontalPodAutoscaler", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified HorizontalPodAutoscaler", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "autoscaling_v1" ], "operationId": "patchAutoscalingV1NamespacedHorizontalPodAutoscaler", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.HorizontalPodAutoscaler" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the HorizontalPodAutoscaler", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { "get": { "description": "read status of the specified HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "autoscaling_v1" ], "operationId": "readAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.HorizontalPodAutoscaler" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "autoscaling_v1" ], "operationId": "replaceAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.HorizontalPodAutoscaler" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.HorizontalPodAutoscaler" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified HorizontalPodAutoscaler", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "autoscaling_v1" ], "operationId": "patchAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.HorizontalPodAutoscaler" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the HorizontalPodAutoscaler", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/autoscaling/v1/watch/horizontalpodautoscalers": { "get": { "description": "watch individual changes to a list of HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "autoscaling_v1" ], "operationId": "watchAutoscalingV1HorizontalPodAutoscalerListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers": { "get": { "description": "watch individual changes to a list of HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "autoscaling_v1" ], "operationId": "watchAutoscalingV1NamespacedHorizontalPodAutoscalerList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}": { "get": { "description": "watch changes to an object of kind HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "autoscaling_v1" ], "operationId": "watchAutoscalingV1NamespacedHorizontalPodAutoscaler", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the HorizontalPodAutoscaler", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/batch/": { "get": { "description": "get information of a group", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "batch" ], "operationId": "getBatchAPIGroup", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIGroup" } }, "401": { "description": "Unauthorized" } } } }, "/apis/batch/v1/": { "get": { "description": "get available resources", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "batch_v1" ], "operationId": "getBatchV1APIResources", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIResourceList" } }, "401": { "description": "Unauthorized" } } } }, "/apis/batch/v1/jobs": { "get": { "description": "list or watch objects of kind Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "batch_v1" ], "operationId": "listBatchV1JobForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.JobList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/batch/v1/namespaces/{namespace}/jobs": { "get": { "description": "list or watch objects of kind Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "batch_v1" ], "operationId": "listBatchV1NamespacedJob", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.JobList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "batch_v1" ], "operationId": "createBatchV1NamespacedJob", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Job" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Job" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "batch_v1" ], "operationId": "deleteBatchV1CollectionNamespacedJob", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/batch/v1/namespaces/{namespace}/jobs/{name}": { "get": { "description": "read the specified Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "batch_v1" ], "operationId": "readBatchV1NamespacedJob", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Job" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "batch_v1" ], "operationId": "replaceBatchV1NamespacedJob", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Job" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Job" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "batch_v1" ], "operationId": "deleteBatchV1NamespacedJob", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified Job", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "batch_v1" ], "operationId": "patchBatchV1NamespacedJob", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Job" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Job", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status": { "get": { "description": "read status of the specified Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "batch_v1" ], "operationId": "readBatchV1NamespacedJobStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Job" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "batch_v1" ], "operationId": "replaceBatchV1NamespacedJobStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Job" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Job" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified Job", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "batch_v1" ], "operationId": "patchBatchV1NamespacedJobStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.Job" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Job", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/batch/v1/watch/jobs": { "get": { "description": "watch individual changes to a list of Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "batch_v1" ], "operationId": "watchBatchV1JobListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/batch/v1/watch/namespaces/{namespace}/jobs": { "get": { "description": "watch individual changes to a list of Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "batch_v1" ], "operationId": "watchBatchV1NamespacedJobList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/batch/v1/watch/namespaces/{namespace}/jobs/{name}": { "get": { "description": "watch changes to an object of kind Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "batch_v1" ], "operationId": "watchBatchV1NamespacedJob", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the Job", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/batch/v2alpha1/": { "get": { "description": "get available resources", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "batch_v2alpha1" ], "operationId": "getBatchV2alpha1APIResources", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIResourceList" } }, "401": { "description": "Unauthorized" } } } }, "/apis/certificates.k8s.io/": { "get": { "description": "get information of a group", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "certificates" ], "operationId": "getCertificatesAPIGroup", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIGroup" } }, "401": { "description": "Unauthorized" } } } }, "/apis/certificates.k8s.io/v1alpha1/": { "get": { "description": "get available resources", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "certificates_v1alpha1" ], "operationId": "getCertificatesV1alpha1APIResources", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIResourceList" } }, "401": { "description": "Unauthorized" } } } }, "/apis/certificates.k8s.io/v1alpha1/certificatesigningrequests": { "get": { "description": "list or watch objects of kind CertificateSigningRequest", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "certificates_v1alpha1" ], "operationId": "listCertificatesV1alpha1CertificateSigningRequest", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.CertificateSigningRequestList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a CertificateSigningRequest", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "certificates_v1alpha1" ], "operationId": "createCertificatesV1alpha1CertificateSigningRequest", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of CertificateSigningRequest", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "certificates_v1alpha1" ], "operationId": "deleteCertificatesV1alpha1CollectionCertificateSigningRequest", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/certificates.k8s.io/v1alpha1/certificatesigningrequests/{name}": { "get": { "description": "read the specified CertificateSigningRequest", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "certificates_v1alpha1" ], "operationId": "readCertificatesV1alpha1CertificateSigningRequest", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified CertificateSigningRequest", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "certificates_v1alpha1" ], "operationId": "replaceCertificatesV1alpha1CertificateSigningRequest", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a CertificateSigningRequest", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "certificates_v1alpha1" ], "operationId": "deleteCertificatesV1alpha1CertificateSigningRequest", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified CertificateSigningRequest", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "certificates_v1alpha1" ], "operationId": "patchCertificatesV1alpha1CertificateSigningRequest", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the CertificateSigningRequest", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/certificates.k8s.io/v1alpha1/certificatesigningrequests/{name}/approval": { "put": { "description": "replace approval of the specified CertificateSigningRequest", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "certificates_v1alpha1" ], "operationId": "replaceCertificatesV1alpha1CertificateSigningRequestApproval", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" } }, { "uniqueItems": true, "type": "string", "description": "name of the CertificateSigningRequest", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/certificates.k8s.io/v1alpha1/certificatesigningrequests/{name}/status": { "put": { "description": "replace status of the specified CertificateSigningRequest", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "certificates_v1alpha1" ], "operationId": "replaceCertificatesV1alpha1CertificateSigningRequestStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" } }, { "uniqueItems": true, "type": "string", "description": "name of the CertificateSigningRequest", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/certificates.k8s.io/v1alpha1/watch/certificatesigningrequests": { "get": { "description": "watch individual changes to a list of CertificateSigningRequest", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "certificates_v1alpha1" ], "operationId": "watchCertificatesV1alpha1CertificateSigningRequestList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/certificates.k8s.io/v1alpha1/watch/certificatesigningrequests/{name}": { "get": { "description": "watch changes to an object of kind CertificateSigningRequest", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "certificates_v1alpha1" ], "operationId": "watchCertificatesV1alpha1CertificateSigningRequest", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the CertificateSigningRequest", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/": { "get": { "description": "get information of a group", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions" ], "operationId": "getExtensionsAPIGroup", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIGroup" } }, "401": { "description": "Unauthorized" } } } }, "/apis/extensions/v1beta1/": { "get": { "description": "get available resources", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "getExtensionsV1beta1APIResources", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIResourceList" } }, "401": { "description": "Unauthorized" } } } }, "/apis/extensions/v1beta1/daemonsets": { "get": { "description": "list or watch objects of kind DaemonSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "listExtensionsV1beta1DaemonSetForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.DaemonSetList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/deployments": { "get": { "description": "list or watch objects of kind Deployment", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "listExtensionsV1beta1DeploymentForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.DeploymentList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/horizontalpodautoscalers": { "get": { "description": "list or watch objects of kind HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "listExtensionsV1beta1HorizontalPodAutoscalerForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.HorizontalPodAutoscalerList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/ingresses": { "get": { "description": "list or watch objects of kind Ingress", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "listExtensionsV1beta1IngressForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.IngressList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/jobs": { "get": { "description": "list or watch objects of kind Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "listExtensionsV1beta1JobForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.JobList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets": { "get": { "description": "list or watch objects of kind DaemonSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "listExtensionsV1beta1NamespacedDaemonSet", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.DaemonSetList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a DaemonSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "createExtensionsV1beta1NamespacedDaemonSet", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.DaemonSet" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.DaemonSet" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of DaemonSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1CollectionNamespacedDaemonSet", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}": { "get": { "description": "read the specified DaemonSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedDaemonSet", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.DaemonSet" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified DaemonSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedDaemonSet", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.DaemonSet" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.DaemonSet" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a DaemonSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1NamespacedDaemonSet", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified DaemonSet", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedDaemonSet", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.DaemonSet" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the DaemonSet", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}/status": { "get": { "description": "read status of the specified DaemonSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedDaemonSetStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.DaemonSet" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified DaemonSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedDaemonSetStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.DaemonSet" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.DaemonSet" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified DaemonSet", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedDaemonSetStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.DaemonSet" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the DaemonSet", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/deployments": { "get": { "description": "list or watch objects of kind Deployment", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "listExtensionsV1beta1NamespacedDeployment", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.DeploymentList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a Deployment", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "createExtensionsV1beta1NamespacedDeployment", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.Deployment" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Deployment" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of Deployment", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1CollectionNamespacedDeployment", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}": { "get": { "description": "read the specified Deployment", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedDeployment", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Deployment" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified Deployment", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedDeployment", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.Deployment" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Deployment" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a Deployment", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1NamespacedDeployment", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified Deployment", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedDeployment", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Deployment" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Deployment", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/rollback": { "post": { "description": "create rollback of a DeploymentRollback", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "createExtensionsV1beta1NamespacedDeploymentRollbackRollback", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.DeploymentRollback" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.DeploymentRollback" } }, { "uniqueItems": true, "type": "string", "description": "name of the DeploymentRollback", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/scale": { "get": { "description": "read scale of the specified Scale", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedDeploymentsScale", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Scale" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace scale of the specified Scale", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedDeploymentsScale", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.Scale" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Scale" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update scale of the specified Scale", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedDeploymentsScale", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Scale" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Scale", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/status": { "get": { "description": "read status of the specified Deployment", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedDeploymentStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Deployment" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified Deployment", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedDeploymentStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.Deployment" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Deployment" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified Deployment", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedDeploymentStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Deployment" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Deployment", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/horizontalpodautoscalers": { "get": { "description": "list or watch objects of kind HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "listExtensionsV1beta1NamespacedHorizontalPodAutoscaler", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.HorizontalPodAutoscalerList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "createExtensionsV1beta1NamespacedHorizontalPodAutoscaler", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.HorizontalPodAutoscaler" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.HorizontalPodAutoscaler" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1CollectionNamespacedHorizontalPodAutoscaler", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}": { "get": { "description": "read the specified HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedHorizontalPodAutoscaler", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.HorizontalPodAutoscaler" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedHorizontalPodAutoscaler", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.HorizontalPodAutoscaler" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.HorizontalPodAutoscaler" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1NamespacedHorizontalPodAutoscaler", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified HorizontalPodAutoscaler", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedHorizontalPodAutoscaler", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.HorizontalPodAutoscaler" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the HorizontalPodAutoscaler", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { "get": { "description": "read status of the specified HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedHorizontalPodAutoscalerStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.HorizontalPodAutoscaler" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedHorizontalPodAutoscalerStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.HorizontalPodAutoscaler" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.HorizontalPodAutoscaler" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified HorizontalPodAutoscaler", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedHorizontalPodAutoscalerStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.HorizontalPodAutoscaler" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the HorizontalPodAutoscaler", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses": { "get": { "description": "list or watch objects of kind Ingress", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "listExtensionsV1beta1NamespacedIngress", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.IngressList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create an Ingress", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "createExtensionsV1beta1NamespacedIngress", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.Ingress" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Ingress" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of Ingress", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1CollectionNamespacedIngress", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}": { "get": { "description": "read the specified Ingress", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedIngress", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Ingress" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified Ingress", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedIngress", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.Ingress" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Ingress" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete an Ingress", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1NamespacedIngress", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified Ingress", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedIngress", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Ingress" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Ingress", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status": { "get": { "description": "read status of the specified Ingress", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedIngressStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Ingress" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified Ingress", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedIngressStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.Ingress" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Ingress" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified Ingress", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedIngressStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Ingress" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Ingress", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/jobs": { "get": { "description": "list or watch objects of kind Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "listExtensionsV1beta1NamespacedJob", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.JobList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "createExtensionsV1beta1NamespacedJob", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.Job" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Job" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1CollectionNamespacedJob", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/jobs/{name}": { "get": { "description": "read the specified Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedJob", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Job" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedJob", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.Job" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Job" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1NamespacedJob", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified Job", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedJob", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Job" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Job", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/jobs/{name}/status": { "get": { "description": "read status of the specified Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedJobStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Job" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedJobStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.Job" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Job" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified Job", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedJobStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Job" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Job", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies": { "get": { "description": "list or watch objects of kind NetworkPolicy", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "listExtensionsV1beta1NamespacedNetworkPolicy", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.NetworkPolicyList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a NetworkPolicy", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "createExtensionsV1beta1NamespacedNetworkPolicy", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.NetworkPolicy" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.NetworkPolicy" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of NetworkPolicy", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1CollectionNamespacedNetworkPolicy", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}": { "get": { "description": "read the specified NetworkPolicy", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedNetworkPolicy", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.NetworkPolicy" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified NetworkPolicy", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedNetworkPolicy", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.NetworkPolicy" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.NetworkPolicy" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a NetworkPolicy", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1NamespacedNetworkPolicy", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified NetworkPolicy", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedNetworkPolicy", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.NetworkPolicy" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the NetworkPolicy", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/replicasets": { "get": { "description": "list or watch objects of kind ReplicaSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "listExtensionsV1beta1NamespacedReplicaSet", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.ReplicaSetList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a ReplicaSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "createExtensionsV1beta1NamespacedReplicaSet", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.ReplicaSet" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.ReplicaSet" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of ReplicaSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1CollectionNamespacedReplicaSet", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}": { "get": { "description": "read the specified ReplicaSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedReplicaSet", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.ReplicaSet" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified ReplicaSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedReplicaSet", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.ReplicaSet" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.ReplicaSet" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a ReplicaSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1NamespacedReplicaSet", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified ReplicaSet", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedReplicaSet", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.ReplicaSet" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the ReplicaSet", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/scale": { "get": { "description": "read scale of the specified Scale", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedReplicasetsScale", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Scale" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace scale of the specified Scale", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedReplicasetsScale", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.Scale" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Scale" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update scale of the specified Scale", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedReplicasetsScale", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Scale" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Scale", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/status": { "get": { "description": "read status of the specified ReplicaSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedReplicaSetStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.ReplicaSet" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified ReplicaSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedReplicaSetStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.ReplicaSet" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.ReplicaSet" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified ReplicaSet", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedReplicaSetStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.ReplicaSet" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the ReplicaSet", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/namespaces/{namespace}/replicationcontrollers/{name}/scale": { "get": { "description": "read scale of the specified Scale", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1NamespacedReplicationcontrollersScale", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Scale" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace scale of the specified Scale", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1NamespacedReplicationcontrollersScale", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.Scale" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Scale" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update scale of the specified Scale", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1NamespacedReplicationcontrollersScale", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.Scale" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Scale", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/networkpolicies": { "get": { "description": "list or watch objects of kind NetworkPolicy", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "listExtensionsV1beta1NetworkPolicyForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.NetworkPolicyList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/replicasets": { "get": { "description": "list or watch objects of kind ReplicaSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "listExtensionsV1beta1ReplicaSetForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.ReplicaSetList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/thirdpartyresources": { "get": { "description": "list or watch objects of kind ThirdPartyResource", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "listExtensionsV1beta1ThirdPartyResource", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.ThirdPartyResourceList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a ThirdPartyResource", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "createExtensionsV1beta1ThirdPartyResource", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.ThirdPartyResource" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.ThirdPartyResource" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of ThirdPartyResource", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1CollectionThirdPartyResource", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/thirdpartyresources/{name}": { "get": { "description": "read the specified ThirdPartyResource", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "readExtensionsV1beta1ThirdPartyResource", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.ThirdPartyResource" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified ThirdPartyResource", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "replaceExtensionsV1beta1ThirdPartyResource", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.ThirdPartyResource" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.ThirdPartyResource" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a ThirdPartyResource", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "deleteExtensionsV1beta1ThirdPartyResource", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified ThirdPartyResource", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "patchExtensionsV1beta1ThirdPartyResource", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.ThirdPartyResource" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the ThirdPartyResource", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/daemonsets": { "get": { "description": "watch individual changes to a list of DaemonSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1DaemonSetListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/deployments": { "get": { "description": "watch individual changes to a list of Deployment", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1DeploymentListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/horizontalpodautoscalers": { "get": { "description": "watch individual changes to a list of HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1HorizontalPodAutoscalerListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/ingresses": { "get": { "description": "watch individual changes to a list of Ingress", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1IngressListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/jobs": { "get": { "description": "watch individual changes to a list of Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1JobListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/namespaces/{namespace}/daemonsets": { "get": { "description": "watch individual changes to a list of DaemonSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1NamespacedDaemonSetList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/namespaces/{namespace}/daemonsets/{name}": { "get": { "description": "watch changes to an object of kind DaemonSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1NamespacedDaemonSet", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the DaemonSet", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/namespaces/{namespace}/deployments": { "get": { "description": "watch individual changes to a list of Deployment", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1NamespacedDeploymentList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/namespaces/{namespace}/deployments/{name}": { "get": { "description": "watch changes to an object of kind Deployment", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1NamespacedDeployment", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the Deployment", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/namespaces/{namespace}/horizontalpodautoscalers": { "get": { "description": "watch individual changes to a list of HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1NamespacedHorizontalPodAutoscalerList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}": { "get": { "description": "watch changes to an object of kind HorizontalPodAutoscaler", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1NamespacedHorizontalPodAutoscaler", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the HorizontalPodAutoscaler", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses": { "get": { "description": "watch individual changes to a list of Ingress", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1NamespacedIngressList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses/{name}": { "get": { "description": "watch changes to an object of kind Ingress", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1NamespacedIngress", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the Ingress", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/namespaces/{namespace}/jobs": { "get": { "description": "watch individual changes to a list of Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1NamespacedJobList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/namespaces/{namespace}/jobs/{name}": { "get": { "description": "watch changes to an object of kind Job", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1NamespacedJob", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the Job", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies": { "get": { "description": "watch individual changes to a list of NetworkPolicy", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1NamespacedNetworkPolicyList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies/{name}": { "get": { "description": "watch changes to an object of kind NetworkPolicy", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1NamespacedNetworkPolicy", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the NetworkPolicy", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/namespaces/{namespace}/replicasets": { "get": { "description": "watch individual changes to a list of ReplicaSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1NamespacedReplicaSetList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/namespaces/{namespace}/replicasets/{name}": { "get": { "description": "watch changes to an object of kind ReplicaSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1NamespacedReplicaSet", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the ReplicaSet", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/networkpolicies": { "get": { "description": "watch individual changes to a list of NetworkPolicy", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1NetworkPolicyListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/replicasets": { "get": { "description": "watch individual changes to a list of ReplicaSet", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1ReplicaSetListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/thirdpartyresources": { "get": { "description": "watch individual changes to a list of ThirdPartyResource", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1ThirdPartyResourceList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/extensions/v1beta1/watch/thirdpartyresources/{name}": { "get": { "description": "watch changes to an object of kind ThirdPartyResource", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "extensions_v1beta1" ], "operationId": "watchExtensionsV1beta1ThirdPartyResource", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the ThirdPartyResource", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/policy/": { "get": { "description": "get information of a group", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "policy" ], "operationId": "getPolicyAPIGroup", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIGroup" } }, "401": { "description": "Unauthorized" } } } }, "/apis/policy/v1alpha1/": { "get": { "description": "get available resources", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "policy_v1alpha1" ], "operationId": "getPolicyV1alpha1APIResources", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIResourceList" } }, "401": { "description": "Unauthorized" } } } }, "/apis/policy/v1alpha1/namespaces/{namespace}/poddisruptionbudgets": { "get": { "description": "list or watch objects of kind PodDisruptionBudget", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "policy_v1alpha1" ], "operationId": "listPolicyV1alpha1NamespacedPodDisruptionBudget", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.PodDisruptionBudgetList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a PodDisruptionBudget", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "policy_v1alpha1" ], "operationId": "createPolicyV1alpha1NamespacedPodDisruptionBudget", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.PodDisruptionBudget" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.PodDisruptionBudget" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of PodDisruptionBudget", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "policy_v1alpha1" ], "operationId": "deletePolicyV1alpha1CollectionNamespacedPodDisruptionBudget", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/policy/v1alpha1/namespaces/{namespace}/poddisruptionbudgets/{name}": { "get": { "description": "read the specified PodDisruptionBudget", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "policy_v1alpha1" ], "operationId": "readPolicyV1alpha1NamespacedPodDisruptionBudget", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.PodDisruptionBudget" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified PodDisruptionBudget", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "policy_v1alpha1" ], "operationId": "replacePolicyV1alpha1NamespacedPodDisruptionBudget", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.PodDisruptionBudget" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.PodDisruptionBudget" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a PodDisruptionBudget", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "policy_v1alpha1" ], "operationId": "deletePolicyV1alpha1NamespacedPodDisruptionBudget", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified PodDisruptionBudget", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "policy_v1alpha1" ], "operationId": "patchPolicyV1alpha1NamespacedPodDisruptionBudget", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.PodDisruptionBudget" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the PodDisruptionBudget", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/policy/v1alpha1/namespaces/{namespace}/poddisruptionbudgets/{name}/status": { "get": { "description": "read status of the specified PodDisruptionBudget", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "policy_v1alpha1" ], "operationId": "readPolicyV1alpha1NamespacedPodDisruptionBudgetStatus", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.PodDisruptionBudget" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace status of the specified PodDisruptionBudget", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "policy_v1alpha1" ], "operationId": "replacePolicyV1alpha1NamespacedPodDisruptionBudgetStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.PodDisruptionBudget" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.PodDisruptionBudget" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update status of the specified PodDisruptionBudget", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "policy_v1alpha1" ], "operationId": "patchPolicyV1alpha1NamespacedPodDisruptionBudgetStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.PodDisruptionBudget" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the PodDisruptionBudget", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/policy/v1alpha1/poddisruptionbudgets": { "get": { "description": "list or watch objects of kind PodDisruptionBudget", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "policy_v1alpha1" ], "operationId": "listPolicyV1alpha1PodDisruptionBudgetForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.PodDisruptionBudgetList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/policy/v1alpha1/watch/namespaces/{namespace}/poddisruptionbudgets": { "get": { "description": "watch individual changes to a list of PodDisruptionBudget", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "policy_v1alpha1" ], "operationId": "watchPolicyV1alpha1NamespacedPodDisruptionBudgetList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/policy/v1alpha1/watch/namespaces/{namespace}/poddisruptionbudgets/{name}": { "get": { "description": "watch changes to an object of kind PodDisruptionBudget", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "policy_v1alpha1" ], "operationId": "watchPolicyV1alpha1NamespacedPodDisruptionBudget", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the PodDisruptionBudget", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/policy/v1alpha1/watch/poddisruptionbudgets": { "get": { "description": "watch individual changes to a list of PodDisruptionBudget", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "policy_v1alpha1" ], "operationId": "watchPolicyV1alpha1PodDisruptionBudgetListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/": { "get": { "description": "get information of a group", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization" ], "operationId": "getRbacAuthorizationAPIGroup", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIGroup" } }, "401": { "description": "Unauthorized" } } } }, "/apis/rbac.authorization.k8s.io/v1alpha1/": { "get": { "description": "get available resources", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "getRbacAuthorizationV1alpha1APIResources", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIResourceList" } }, "401": { "description": "Unauthorized" } } } }, "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings": { "get": { "description": "list or watch objects of kind ClusterRoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "listRbacAuthorizationV1alpha1ClusterRoleBinding", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.ClusterRoleBindingList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a ClusterRoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "createRbacAuthorizationV1alpha1ClusterRoleBinding", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.ClusterRoleBinding" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.ClusterRoleBinding" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of ClusterRoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "deleteRbacAuthorizationV1alpha1CollectionClusterRoleBinding", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}": { "get": { "description": "read the specified ClusterRoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "readRbacAuthorizationV1alpha1ClusterRoleBinding", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.ClusterRoleBinding" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified ClusterRoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "replaceRbacAuthorizationV1alpha1ClusterRoleBinding", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.ClusterRoleBinding" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.ClusterRoleBinding" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a ClusterRoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "deleteRbacAuthorizationV1alpha1ClusterRoleBinding", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified ClusterRoleBinding", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "patchRbacAuthorizationV1alpha1ClusterRoleBinding", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.ClusterRoleBinding" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the ClusterRoleBinding", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles": { "get": { "description": "list or watch objects of kind ClusterRole", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "listRbacAuthorizationV1alpha1ClusterRole", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.ClusterRoleList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a ClusterRole", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "createRbacAuthorizationV1alpha1ClusterRole", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.ClusterRole" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.ClusterRole" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of ClusterRole", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "deleteRbacAuthorizationV1alpha1CollectionClusterRole", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}": { "get": { "description": "read the specified ClusterRole", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "readRbacAuthorizationV1alpha1ClusterRole", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.ClusterRole" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified ClusterRole", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "replaceRbacAuthorizationV1alpha1ClusterRole", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.ClusterRole" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.ClusterRole" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a ClusterRole", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "deleteRbacAuthorizationV1alpha1ClusterRole", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified ClusterRole", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "patchRbacAuthorizationV1alpha1ClusterRole", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.ClusterRole" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the ClusterRole", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings": { "get": { "description": "list or watch objects of kind RoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "listRbacAuthorizationV1alpha1NamespacedRoleBinding", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.RoleBindingList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a RoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "createRbacAuthorizationV1alpha1NamespacedRoleBinding", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.RoleBinding" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.RoleBinding" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of RoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "deleteRbacAuthorizationV1alpha1CollectionNamespacedRoleBinding", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}": { "get": { "description": "read the specified RoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "readRbacAuthorizationV1alpha1NamespacedRoleBinding", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.RoleBinding" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified RoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "replaceRbacAuthorizationV1alpha1NamespacedRoleBinding", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.RoleBinding" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.RoleBinding" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a RoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "deleteRbacAuthorizationV1alpha1NamespacedRoleBinding", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified RoleBinding", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "patchRbacAuthorizationV1alpha1NamespacedRoleBinding", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.RoleBinding" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the RoleBinding", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles": { "get": { "description": "list or watch objects of kind Role", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "listRbacAuthorizationV1alpha1NamespacedRole", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.RoleList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a Role", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "createRbacAuthorizationV1alpha1NamespacedRole", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.Role" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.Role" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of Role", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "deleteRbacAuthorizationV1alpha1CollectionNamespacedRole", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}": { "get": { "description": "read the specified Role", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "readRbacAuthorizationV1alpha1NamespacedRole", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.Role" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified Role", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "replaceRbacAuthorizationV1alpha1NamespacedRole", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1alpha1.Role" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.Role" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a Role", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "deleteRbacAuthorizationV1alpha1NamespacedRole", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified Role", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "patchRbacAuthorizationV1alpha1NamespacedRole", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.Role" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the Role", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/rolebindings": { "get": { "description": "list or watch objects of kind RoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "listRbacAuthorizationV1alpha1RoleBindingForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.RoleBindingList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/roles": { "get": { "description": "list or watch objects of kind Role", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "listRbacAuthorizationV1alpha1RoleForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1alpha1.RoleList" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterrolebindings": { "get": { "description": "watch individual changes to a list of ClusterRoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "watchRbacAuthorizationV1alpha1ClusterRoleBindingList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterrolebindings/{name}": { "get": { "description": "watch changes to an object of kind ClusterRoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "watchRbacAuthorizationV1alpha1ClusterRoleBinding", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the ClusterRoleBinding", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterroles": { "get": { "description": "watch individual changes to a list of ClusterRole", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "watchRbacAuthorizationV1alpha1ClusterRoleList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterroles/{name}": { "get": { "description": "watch changes to an object of kind ClusterRole", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "watchRbacAuthorizationV1alpha1ClusterRole", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the ClusterRole", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/watch/namespaces/{namespace}/rolebindings": { "get": { "description": "watch individual changes to a list of RoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "watchRbacAuthorizationV1alpha1NamespacedRoleBindingList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/watch/namespaces/{namespace}/rolebindings/{name}": { "get": { "description": "watch changes to an object of kind RoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "watchRbacAuthorizationV1alpha1NamespacedRoleBinding", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the RoleBinding", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/watch/namespaces/{namespace}/roles": { "get": { "description": "watch individual changes to a list of Role", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "watchRbacAuthorizationV1alpha1NamespacedRoleList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/watch/namespaces/{namespace}/roles/{name}": { "get": { "description": "watch changes to an object of kind Role", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "watchRbacAuthorizationV1alpha1NamespacedRole", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the Role", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "object name and auth scope, such as for teams and projects", "name": "namespace", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/watch/rolebindings": { "get": { "description": "watch individual changes to a list of RoleBinding", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "watchRbacAuthorizationV1alpha1RoleBindingListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/rbac.authorization.k8s.io/v1alpha1/watch/roles": { "get": { "description": "watch individual changes to a list of Role", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "rbacAuthorization_v1alpha1" ], "operationId": "watchRbacAuthorizationV1alpha1RoleListForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/storage.k8s.io/": { "get": { "description": "get information of a group", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "storage" ], "operationId": "getStorageAPIGroup", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIGroup" } }, "401": { "description": "Unauthorized" } } } }, "/apis/storage.k8s.io/v1beta1/": { "get": { "description": "get available resources", "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "storage_v1beta1" ], "operationId": "getStorageV1beta1APIResources", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.APIResourceList" } }, "401": { "description": "Unauthorized" } } } }, "/apis/storage.k8s.io/v1beta1/storageclasses": { "get": { "description": "list or watch objects of kind StorageClass", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "storage_v1beta1" ], "operationId": "listStorageV1beta1StorageClass", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.StorageClassList" } }, "401": { "description": "Unauthorized" } } }, "post": { "description": "create a StorageClass", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "storage_v1beta1" ], "operationId": "createStorageV1beta1StorageClass", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.StorageClass" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.StorageClass" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete collection of StorageClass", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "storage_v1beta1" ], "operationId": "deleteStorageV1beta1CollectionStorageClass", "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/storage.k8s.io/v1beta1/storageclasses/{name}": { "get": { "description": "read the specified StorageClass", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "storage_v1beta1" ], "operationId": "readStorageV1beta1StorageClass", "parameters": [ { "uniqueItems": true, "type": "boolean", "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", "name": "exact", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Should this value be exported. Export strips fields that a user can not specify.", "name": "export", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.StorageClass" } }, "401": { "description": "Unauthorized" } } }, "put": { "description": "replace the specified StorageClass", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "storage_v1beta1" ], "operationId": "replaceStorageV1beta1StorageClass", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1beta1.StorageClass" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.StorageClass" } }, "401": { "description": "Unauthorized" } } }, "delete": { "description": "delete a StorageClass", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "storage_v1beta1" ], "operationId": "deleteStorageV1beta1StorageClass", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.DeleteOptions" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/unversioned.Status" } }, "401": { "description": "Unauthorized" } } }, "patch": { "description": "partially update the specified StorageClass", "consumes": [ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], "schemes": [ "https" ], "tags": [ "storage_v1beta1" ], "operationId": "patchStorageV1beta1StorageClass", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/unversioned.Patch" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1beta1.StorageClass" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "name of the StorageClass", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" } ] }, "/apis/storage.k8s.io/v1beta1/watch/storageclasses": { "get": { "description": "watch individual changes to a list of StorageClass", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "storage_v1beta1" ], "operationId": "watchStorageV1beta1StorageClassList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/apis/storage.k8s.io/v1beta1/watch/storageclasses/{name}": { "get": { "description": "watch changes to an object of kind StorageClass", "consumes": [ "*/*" ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" ], "schemes": [ "https" ], "tags": [ "storage_v1beta1" ], "operationId": "watchStorageV1beta1StorageClass", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/versioned.Event" } }, "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "name": "fieldSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "name": "labelSelector", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "name of the StorageClass", "name": "name", "in": "path", "required": true }, { "uniqueItems": true, "type": "string", "description": "If 'true', then the output is pretty printed.", "name": "pretty", "in": "query" }, { "uniqueItems": true, "type": "string", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "name": "resourceVersion", "in": "query" }, { "uniqueItems": true, "type": "integer", "description": "Timeout for the list/watch call.", "name": "timeoutSeconds", "in": "query" }, { "uniqueItems": true, "type": "boolean", "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "name": "watch", "in": "query" } ] }, "/logs/": { "get": { "schemes": [ "https" ], "tags": [ "logs" ], "operationId": "logFileListHandler", "responses": { "401": { "description": "Unauthorized" } } } }, "/logs/{logpath}": { "get": { "schemes": [ "https" ], "tags": [ "logs" ], "operationId": "logFileHandler", "responses": { "401": { "description": "Unauthorized" } } }, "parameters": [ { "uniqueItems": true, "type": "string", "description": "path to the log", "name": "logpath", "in": "path", "required": true } ] }, "/version/": { "get": { "description": "get the code version", "consumes": [ "application/json" ], "produces": [ "application/json" ], "schemes": [ "https" ], "tags": [ "version" ], "operationId": "getCodeVersion", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/version.Info" } }, "401": { "description": "Unauthorized" } } } } }, "definitions": { "intstr.IntOrString": { "type": "string", "format": "int-or-string" }, "resource.Quantity": { "type": "string" }, "runtime.RawExtension": { "description": "RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.\n\n// Internal package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.Object `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// External package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// On the wire, the JSON will look something like this: {\n\t\"kind\":\"MyAPIObject\",\n\t\"apiVersion\":\"v1\",\n\t\"myPlugin\": {\n\t\t\"kind\":\"PluginA\",\n\t\t\"aOption\":\"foo\",\n\t},\n}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)", "required": [ "Raw" ], "properties": { "Raw": { "description": "Raw is the underlying serialization of this object.", "type": "string", "format": "byte" } } }, "unversioned.APIGroup": { "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", "versions", "serverAddressByClientCIDRs" ], "properties": { "name": { "description": "name is the name of the group.", "type": "string" }, "preferredVersion": { "description": "preferredVersion is the version preferred by the API server, which probably is the storage version.", "$ref": "#/definitions/unversioned.GroupVersionForDiscovery" }, "serverAddressByClientCIDRs": { "description": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", "type": "array", "items": { "$ref": "#/definitions/unversioned.ServerAddressByClientCIDR" } }, "versions": { "description": "versions are the versions supported in this group.", "type": "array", "items": { "$ref": "#/definitions/unversioned.GroupVersionForDiscovery" } } } }, "unversioned.APIGroupList": { "description": "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", "required": [ "groups" ], "properties": { "groups": { "description": "groups is a list of APIGroup.", "type": "array", "items": { "$ref": "#/definitions/unversioned.APIGroup" } } } }, "unversioned.APIResource": { "description": "APIResource specifies the name of a resource and whether it is namespaced.", "required": [ "name", "namespaced", "kind" ], "properties": { "kind": { "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", "type": "string" }, "name": { "description": "name is the name of the resource.", "type": "string" }, "namespaced": { "description": "namespaced indicates if a resource is namespaced or not.", "type": "boolean" } } }, "unversioned.APIResourceList": { "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", "required": [ "groupVersion", "resources" ], "properties": { "groupVersion": { "description": "groupVersion is the group and version this APIResourceList is for.", "type": "string" }, "resources": { "description": "resources contains the name of the resources and if they are namespaced.", "type": "array", "items": { "$ref": "#/definitions/unversioned.APIResource" } } } }, "unversioned.APIVersions": { "description": "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", "required": [ "versions", "serverAddressByClientCIDRs" ], "properties": { "serverAddressByClientCIDRs": { "description": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", "type": "array", "items": { "$ref": "#/definitions/unversioned.ServerAddressByClientCIDR" } }, "versions": { "description": "versions are the api versions that are available.", "type": "array", "items": { "type": "string" } } } }, "unversioned.GroupVersionForDiscovery": { "description": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", "required": [ "groupVersion", "version" ], "properties": { "groupVersion": { "description": "groupVersion specifies the API group and version in the form \"group/version\"", "type": "string" }, "version": { "description": "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", "type": "string" } } }, "unversioned.LabelSelector": { "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", "properties": { "matchExpressions": { "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", "type": "array", "items": { "$ref": "#/definitions/unversioned.LabelSelectorRequirement" } }, "matchLabels": { "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", "type": "object", "additionalProperties": { "type": "string" } } } }, "unversioned.LabelSelectorRequirement": { "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", "required": [ "key", "operator" ], "properties": { "key": { "description": "key is the label key that the selector applies to.", "type": "string" }, "operator": { "description": "operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist.", "type": "string" }, "values": { "description": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", "type": "array", "items": { "type": "string" } } } }, "unversioned.ListMeta": { "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", "properties": { "resourceVersion": { "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency", "type": "string" }, "selfLink": { "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.", "type": "string" } } }, "unversioned.Patch": { "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body." }, "unversioned.ServerAddressByClientCIDR": { "description": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", "required": [ "clientCIDR", "serverAddress" ], "properties": { "clientCIDR": { "description": "The CIDR with which clients can match their IP to figure out the server address that they should use.", "type": "string" }, "serverAddress": { "description": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", "type": "string" } } }, "unversioned.Status": { "description": "Status is a return value for calls that don't return other objects.", "properties": { "code": { "description": "Suggested HTTP return code for this status, 0 if not set.", "type": "integer", "format": "int32" }, "details": { "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", "$ref": "#/definitions/unversioned.StatusDetails" }, "message": { "description": "A human-readable description of the status of this operation.", "type": "string" }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" }, "reason": { "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", "type": "string" }, "status": { "description": "Status of the operation. One of: \"Success\" or \"Failure\". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "type": "string" } } }, "unversioned.StatusCause": { "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", "properties": { "field": { "description": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", "type": "string" }, "message": { "description": "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", "type": "string" }, "reason": { "description": "A machine-readable description of the cause of the error. If this value is empty there is no information available.", "type": "string" } } }, "unversioned.StatusDetails": { "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", "properties": { "causes": { "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", "type": "array", "items": { "$ref": "#/definitions/unversioned.StatusCause" } }, "group": { "description": "The group attribute of the resource associated with the status StatusReason.", "type": "string" }, "kind": { "description": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "type": "string" }, "name": { "description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", "type": "string" }, "retryAfterSeconds": { "description": "If specified, the time in seconds before the operation should be retried.", "type": "integer", "format": "int32" } } }, "unversioned.Time": { "type": "string", "format": "date-time" }, "v1.AttachedVolume": { "description": "AttachedVolume describes a volume attached to a node", "required": [ "name", "devicePath" ], "properties": { "devicePath": { "description": "DevicePath represents the device path where the volume should be available", "type": "string" }, "name": { "description": "Name of the attached volume", "type": "string" } } }, "v1.Binding": { "description": "Binding ties one object to another. For example, a pod is bound to a node by a scheduler.", "required": [ "target" ], "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "target": { "description": "The target object that you want to bind to the standard object.", "$ref": "#/definitions/v1.ObjectReference" } } }, "v1.Capabilities": { "description": "Adds and removes POSIX capabilities from running containers.", "properties": { "add": { "description": "Added capabilities", "type": "array", "items": { "type": "string" } }, "drop": { "description": "Removed capabilities", "type": "array", "items": { "type": "string" } } } }, "v1.ComponentCondition": { "description": "Information about the condition of a component.", "required": [ "type", "status" ], "properties": { "error": { "description": "Condition error code for a component. For example, a health check error code.", "type": "string" }, "message": { "description": "Message about the condition for a component. For example, information about a health check.", "type": "string" }, "status": { "description": "Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".", "type": "string" }, "type": { "description": "Type of condition for a component. Valid value: \"Healthy\"", "type": "string" } } }, "v1.ComponentStatus": { "description": "ComponentStatus (and ComponentStatusList) holds the cluster validation info.", "properties": { "conditions": { "description": "List of component conditions observed", "type": "array", "items": { "$ref": "#/definitions/v1.ComponentCondition" } }, "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" } } }, "v1.ComponentStatusList": { "description": "Status of all the conditions for the component as a list of ComponentStatus objects.", "required": [ "items" ], "properties": { "items": { "description": "List of ComponentStatus objects.", "type": "array", "items": { "$ref": "#/definitions/v1.ComponentStatus" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.ConfigMap": { "description": "ConfigMap holds configuration data for pods to consume.", "properties": { "data": { "description": "Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.", "type": "object", "additionalProperties": { "type": "string" } }, "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" } } }, "v1.ConfigMapKeySelector": { "description": "Selects a key from a ConfigMap.", "required": [ "key" ], "properties": { "key": { "description": "The key to select.", "type": "string" } } }, "v1.ConfigMapList": { "description": "ConfigMapList is a resource containing a list of ConfigMap objects.", "required": [ "items" ], "properties": { "items": { "description": "Items is the list of ConfigMaps.", "type": "array", "items": { "$ref": "#/definitions/v1.ConfigMap" } }, "metadata": { "description": "More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.Container": { "description": "A single application container that you want to run within a pod.", "required": [ "name" ], "properties": { "args": { "description": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands", "type": "array", "items": { "type": "string" } }, "command": { "description": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands", "type": "array", "items": { "type": "string" } }, "env": { "description": "List of environment variables to set in the container. Cannot be updated.", "type": "array", "items": { "$ref": "#/definitions/v1.EnvVar" } }, "image": { "description": "Docker image name. More info: http://kubernetes.io/docs/user-guide/images", "type": "string" }, "imagePullPolicy": { "description": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/images#updating-images", "type": "string" }, "lifecycle": { "description": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", "$ref": "#/definitions/v1.Lifecycle" }, "livenessProbe": { "description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", "$ref": "#/definitions/v1.Probe" }, "name": { "description": "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", "type": "string" }, "ports": { "description": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", "type": "array", "items": { "$ref": "#/definitions/v1.ContainerPort" } }, "readinessProbe": { "description": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", "$ref": "#/definitions/v1.Probe" }, "resources": { "description": "Compute Resources required by this container. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources", "$ref": "#/definitions/v1.ResourceRequirements" }, "securityContext": { "description": "Security options the pod should run with. More info: http://releases.k8s.io/HEAD/docs/design/security_context.md", "$ref": "#/definitions/v1.SecurityContext" }, "stdin": { "description": "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", "type": "boolean" }, "stdinOnce": { "description": "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", "type": "boolean" }, "terminationMessagePath": { "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated.", "type": "string" }, "tty": { "description": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", "type": "boolean" }, "volumeMounts": { "description": "Pod volumes to mount into the container's filesystem. Cannot be updated.", "type": "array", "items": { "$ref": "#/definitions/v1.VolumeMount" } }, "workingDir": { "description": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", "type": "string" } } }, "v1.ContainerImage": { "description": "Describe a container image", "required": [ "names" ], "properties": { "names": { "description": "Names by which this image is known. e.g. [\"gcr.io/google_containers/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]", "type": "array", "items": { "type": "string" } }, "sizeBytes": { "description": "The size of the image in bytes.", "type": "integer", "format": "int64" } } }, "v1.ContainerPort": { "description": "ContainerPort represents a network port in a single container.", "required": [ "containerPort" ], "properties": { "containerPort": { "description": "Number of port to expose on the pod's IP address. This must be a valid port number, 0 \u003c x \u003c 65536.", "type": "integer", "format": "int32" }, "hostIP": { "description": "What host IP to bind the external port to.", "type": "string" }, "hostPort": { "description": "Number of port to expose on the host. If specified, this must be a valid port number, 0 \u003c x \u003c 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.", "type": "integer", "format": "int32" }, "name": { "description": "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.", "type": "string" }, "protocol": { "description": "Protocol for port. Must be UDP or TCP. Defaults to \"TCP\".", "type": "string" } } }, "v1.ContainerState": { "description": "ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.", "properties": { "running": { "description": "Details about a running container", "$ref": "#/definitions/v1.ContainerStateRunning" }, "terminated": { "description": "Details about a terminated container", "$ref": "#/definitions/v1.ContainerStateTerminated" }, "waiting": { "description": "Details about a waiting container", "$ref": "#/definitions/v1.ContainerStateWaiting" } } }, "v1.ContainerStateRunning": { "description": "ContainerStateRunning is a running state of a container.", "properties": { "startedAt": { "description": "Time at which the container was last (re-)started", "$ref": "#/definitions/unversioned.Time" } } }, "v1.ContainerStateTerminated": { "description": "ContainerStateTerminated is a terminated state of a container.", "required": [ "exitCode" ], "properties": { "containerID": { "description": "Container's ID in the format 'docker://\u003ccontainer_id\u003e'", "type": "string" }, "exitCode": { "description": "Exit status from the last termination of the container", "type": "integer", "format": "int32" }, "finishedAt": { "description": "Time at which the container last terminated", "$ref": "#/definitions/unversioned.Time" }, "message": { "description": "Message regarding the last termination of the container", "type": "string" }, "reason": { "description": "(brief) reason from the last termination of the container", "type": "string" }, "signal": { "description": "Signal from the last termination of the container", "type": "integer", "format": "int32" }, "startedAt": { "description": "Time at which previous execution of the container started", "$ref": "#/definitions/unversioned.Time" } } }, "v1.ContainerStateWaiting": { "description": "ContainerStateWaiting is a waiting state of a container.", "properties": { "message": { "description": "Message regarding why the container is not yet running.", "type": "string" }, "reason": { "description": "(brief) reason the container is not yet running.", "type": "string" } } }, "v1.ContainerStatus": { "description": "ContainerStatus contains details for the current status of this container.", "required": [ "name", "ready", "restartCount", "image", "imageID" ], "properties": { "containerID": { "description": "Container's ID in the format 'docker://\u003ccontainer_id\u003e'. More info: http://kubernetes.io/docs/user-guide/container-environment#container-information", "type": "string" }, "image": { "description": "The image the container is running. More info: http://kubernetes.io/docs/user-guide/images", "type": "string" }, "imageID": { "description": "ImageID of the container's image.", "type": "string" }, "lastState": { "description": "Details about the container's last termination condition.", "$ref": "#/definitions/v1.ContainerState" }, "name": { "description": "This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.", "type": "string" }, "ready": { "description": "Specifies whether the container has passed its readiness probe.", "type": "boolean" }, "restartCount": { "description": "The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC.", "type": "integer", "format": "int32" }, "state": { "description": "Details about the container's current condition.", "$ref": "#/definitions/v1.ContainerState" } } }, "v1.CrossVersionObjectReference": { "description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", "required": [ "kind", "name" ], "properties": { "apiVersion": { "description": "API version of the referent", "type": "string" }, "kind": { "description": "Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds\"", "type": "string" }, "name": { "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", "type": "string" } } }, "v1.DaemonEndpoint": { "description": "DaemonEndpoint contains information about a single Daemon endpoint.", "required": [ "Port" ], "properties": { "Port": { "description": "Port number of the given endpoint.", "type": "integer", "format": "int32" } } }, "v1.DeleteOptions": { "description": "DeleteOptions may be provided when deleting an API object", "properties": { "gracePeriodSeconds": { "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "type": "integer", "format": "int64" }, "orphanDependents": { "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", "type": "boolean" }, "preconditions": { "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", "$ref": "#/definitions/v1.Preconditions" } } }, "v1.EndpointAddress": { "description": "EndpointAddress is a tuple that describes single IP address.", "required": [ "ip" ], "properties": { "hostname": { "description": "The Hostname of this endpoint", "type": "string" }, "ip": { "description": "The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.", "type": "string" }, "nodeName": { "description": "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.", "type": "string" }, "targetRef": { "description": "Reference to object providing the endpoint.", "$ref": "#/definitions/v1.ObjectReference" } } }, "v1.EndpointPort": { "description": "EndpointPort is a tuple that describes a single port.", "required": [ "port" ], "properties": { "name": { "description": "The name of this port (corresponds to ServicePort.Name). Must be a DNS_LABEL. Optional only if one port is defined.", "type": "string" }, "port": { "description": "The port number of the endpoint.", "type": "integer", "format": "int32" }, "protocol": { "description": "The IP protocol for this port. Must be UDP or TCP. Default is TCP.", "type": "string" } } }, "v1.EndpointSubset": { "description": "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]", "properties": { "addresses": { "description": "IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.", "type": "array", "items": { "$ref": "#/definitions/v1.EndpointAddress" } }, "notReadyAddresses": { "description": "IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.", "type": "array", "items": { "$ref": "#/definitions/v1.EndpointAddress" } }, "ports": { "description": "Port numbers available on the related IP addresses.", "type": "array", "items": { "$ref": "#/definitions/v1.EndpointPort" } } } }, "v1.Endpoints": { "description": "Endpoints is a collection of endpoints that implement the actual service. Example:\n Name: \"mysvc\",\n Subsets: [\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n },\n {\n Addresses: [{\"ip\": \"10.10.3.3\"}],\n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n },\n ]", "required": [ "subsets" ], "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "subsets": { "description": "The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.", "type": "array", "items": { "$ref": "#/definitions/v1.EndpointSubset" } } } }, "v1.EndpointsList": { "description": "EndpointsList is a list of endpoints.", "required": [ "items" ], "properties": { "items": { "description": "List of endpoints.", "type": "array", "items": { "$ref": "#/definitions/v1.Endpoints" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.EnvVar": { "description": "EnvVar represents an environment variable present in a Container.", "required": [ "name" ], "properties": { "name": { "description": "Name of the environment variable. Must be a C_IDENTIFIER.", "type": "string" }, "value": { "description": "Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".", "type": "string" }, "valueFrom": { "description": "Source for the environment variable's value. Cannot be used if value is not empty.", "$ref": "#/definitions/v1.EnvVarSource" } } }, "v1.EnvVarSource": { "description": "EnvVarSource represents a source for the value of an EnvVar.", "properties": { "configMapKeyRef": { "description": "Selects a key of a ConfigMap.", "$ref": "#/definitions/v1.ConfigMapKeySelector" }, "fieldRef": { "description": "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP.", "$ref": "#/definitions/v1.ObjectFieldSelector" }, "resourceFieldRef": { "description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", "$ref": "#/definitions/v1.ResourceFieldSelector" }, "secretKeyRef": { "description": "Selects a key of a secret in the pod's namespace", "$ref": "#/definitions/v1.SecretKeySelector" } } }, "v1.Event": { "description": "Event is a report of an event somewhere in the cluster.", "required": [ "metadata", "involvedObject" ], "properties": { "count": { "description": "The number of times this event has occurred.", "type": "integer", "format": "int32" }, "firstTimestamp": { "description": "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", "$ref": "#/definitions/unversioned.Time" }, "involvedObject": { "description": "The object that this event is about.", "$ref": "#/definitions/v1.ObjectReference" }, "lastTimestamp": { "description": "The time at which the most recent occurrence of this event was recorded.", "$ref": "#/definitions/unversioned.Time" }, "message": { "description": "A human-readable description of the status of this operation.", "type": "string" }, "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "reason": { "description": "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.", "type": "string" }, "source": { "description": "The component reporting this event. Should be a short machine understandable string.", "$ref": "#/definitions/v1.EventSource" }, "type": { "description": "Type of this event (Normal, Warning), new types could be added in the future", "type": "string" } } }, "v1.EventList": { "description": "EventList is a list of events.", "required": [ "items" ], "properties": { "items": { "description": "List of events", "type": "array", "items": { "$ref": "#/definitions/v1.Event" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.EventSource": { "description": "EventSource contains information for an event.", "properties": { "component": { "description": "Component from which the event is generated.", "type": "string" }, "host": { "description": "Node name on which the event is generated.", "type": "string" } } }, "v1.ExecAction": { "description": "ExecAction describes a \"run in container\" action.", "properties": { "command": { "description": "Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.", "type": "array", "items": { "type": "string" } } } }, "v1.HTTPGetAction": { "description": "HTTPGetAction describes an action based on HTTP Get requests.", "required": [ "port" ], "properties": { "host": { "description": "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", "type": "string" }, "httpHeaders": { "description": "Custom headers to set in the request. HTTP allows repeated headers.", "type": "array", "items": { "$ref": "#/definitions/v1.HTTPHeader" } }, "path": { "description": "Path to access on the HTTP server.", "type": "string" }, "port": { "description": "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", "$ref": "#/definitions/intstr.IntOrString" }, "scheme": { "description": "Scheme to use for connecting to the host. Defaults to HTTP.", "type": "string" } } }, "v1.HTTPHeader": { "description": "HTTPHeader describes a custom header to be used in HTTP probes", "required": [ "name", "value" ], "properties": { "name": { "description": "The header field name", "type": "string" }, "value": { "description": "The header field value", "type": "string" } } }, "v1.Handler": { "description": "Handler defines a specific action that should be taken", "properties": { "exec": { "description": "One and only one of the following should be specified. Exec specifies the action to take.", "$ref": "#/definitions/v1.ExecAction" }, "httpGet": { "description": "HTTPGet specifies the http request to perform.", "$ref": "#/definitions/v1.HTTPGetAction" }, "tcpSocket": { "description": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", "$ref": "#/definitions/v1.TCPSocketAction" } } }, "v1.HorizontalPodAutoscaler": { "description": "configuration of a horizontal pod autoscaler.", "properties": { "metadata": { "description": "Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", "$ref": "#/definitions/v1.HorizontalPodAutoscalerSpec" }, "status": { "description": "current information about the autoscaler.", "$ref": "#/definitions/v1.HorizontalPodAutoscalerStatus" } } }, "v1.HorizontalPodAutoscalerList": { "description": "list of horizontal pod autoscaler objects.", "required": [ "items" ], "properties": { "items": { "description": "list of horizontal pod autoscaler objects.", "type": "array", "items": { "$ref": "#/definitions/v1.HorizontalPodAutoscaler" } }, "metadata": { "description": "Standard list metadata.", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.HorizontalPodAutoscalerSpec": { "description": "specification of a horizontal pod autoscaler.", "required": [ "scaleTargetRef", "maxReplicas" ], "properties": { "maxReplicas": { "description": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.", "type": "integer", "format": "int32" }, "minReplicas": { "description": "lower limit for the number of pods that can be set by the autoscaler, default 1.", "type": "integer", "format": "int32" }, "scaleTargetRef": { "description": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.", "$ref": "#/definitions/v1.CrossVersionObjectReference" }, "targetCPUUtilizationPercentage": { "description": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.", "type": "integer", "format": "int32" } } }, "v1.HorizontalPodAutoscalerStatus": { "description": "current status of a horizontal pod autoscaler", "required": [ "currentReplicas", "desiredReplicas" ], "properties": { "currentCPUUtilizationPercentage": { "description": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.", "type": "integer", "format": "int32" }, "currentReplicas": { "description": "current number of replicas of pods managed by this autoscaler.", "type": "integer", "format": "int32" }, "desiredReplicas": { "description": "desired number of replicas of pods managed by this autoscaler.", "type": "integer", "format": "int32" }, "lastScaleTime": { "description": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.", "$ref": "#/definitions/unversioned.Time" }, "observedGeneration": { "description": "most recent generation observed by this autoscaler.", "type": "integer", "format": "int64" } } }, "v1.Job": { "description": "Job represents the configuration of a single job.", "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec is a structure defining the expected behavior of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.JobSpec" }, "status": { "description": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.JobStatus" } } }, "v1.JobCondition": { "description": "JobCondition describes current state of a job.", "required": [ "type", "status" ], "properties": { "lastProbeTime": { "description": "Last time the condition was checked.", "$ref": "#/definitions/unversioned.Time" }, "lastTransitionTime": { "description": "Last time the condition transit from one status to another.", "$ref": "#/definitions/unversioned.Time" }, "message": { "description": "Human readable message indicating details about last transition.", "type": "string" }, "reason": { "description": "(brief) reason for the condition's last transition.", "type": "string" }, "status": { "description": "Status of the condition, one of True, False, Unknown.", "type": "string" }, "type": { "description": "Type of job condition, Complete or Failed.", "type": "string" } } }, "v1.JobList": { "description": "JobList is a collection of jobs.", "required": [ "items" ], "properties": { "items": { "description": "Items is the list of Job.", "type": "array", "items": { "$ref": "#/definitions/v1.Job" } }, "metadata": { "description": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.JobSpec": { "description": "JobSpec describes how the job execution will look like.", "required": [ "template" ], "properties": { "activeDeadlineSeconds": { "description": "Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer", "type": "integer", "format": "int64" }, "completions": { "description": "Completions specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: http://kubernetes.io/docs/user-guide/jobs", "type": "integer", "format": "int32" }, "manualSelector": { "description": "ManualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md", "type": "boolean" }, "parallelism": { "description": "Parallelism specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) \u003c .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: http://kubernetes.io/docs/user-guide/jobs", "type": "integer", "format": "int32" }, "selector": { "description": "Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", "$ref": "#/definitions/unversioned.LabelSelector" }, "template": { "description": "Template is the object that describes the pod that will be created when executing a job. More info: http://kubernetes.io/docs/user-guide/jobs", "$ref": "#/definitions/v1.PodTemplateSpec" } } }, "v1.JobStatus": { "description": "JobStatus represents the current state of a Job.", "properties": { "active": { "description": "Active is the number of actively running pods.", "type": "integer", "format": "int32" }, "completionTime": { "description": "CompletionTime represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", "$ref": "#/definitions/unversioned.Time" }, "conditions": { "description": "Conditions represent the latest available observations of an object's current state. More info: http://kubernetes.io/docs/user-guide/jobs", "type": "array", "items": { "$ref": "#/definitions/v1.JobCondition" } }, "failed": { "description": "Failed is the number of pods which reached Phase Failed.", "type": "integer", "format": "int32" }, "startTime": { "description": "StartTime represents time when the job was acknowledged by the Job Manager. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", "$ref": "#/definitions/unversioned.Time" }, "succeeded": { "description": "Succeeded is the number of pods which reached Phase Succeeded.", "type": "integer", "format": "int32" } } }, "v1.Lifecycle": { "description": "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.", "properties": { "postStart": { "description": "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: http://kubernetes.io/docs/user-guide/container-environment#hook-details", "$ref": "#/definitions/v1.Handler" }, "preStop": { "description": "PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: http://kubernetes.io/docs/user-guide/container-environment#hook-details", "$ref": "#/definitions/v1.Handler" } } }, "v1.LimitRange": { "description": "LimitRange sets resource usage limits for each kind of resource in a Namespace.", "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec defines the limits enforced. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.LimitRangeSpec" } } }, "v1.LimitRangeItem": { "description": "LimitRangeItem defines a min/max usage limit for any resource that matches on kind.", "properties": { "default": { "description": "Default resource requirement limit value by resource name if resource limit is omitted.", "type": "object", "additionalProperties": { "$ref": "#/definitions/resource.Quantity" } }, "defaultRequest": { "description": "DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.", "type": "object", "additionalProperties": { "$ref": "#/definitions/resource.Quantity" } }, "max": { "description": "Max usage constraints on this kind by resource name.", "type": "object", "additionalProperties": { "$ref": "#/definitions/resource.Quantity" } }, "maxLimitRequestRatio": { "description": "MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.", "type": "object", "additionalProperties": { "$ref": "#/definitions/resource.Quantity" } }, "min": { "description": "Min usage constraints on this kind by resource name.", "type": "object", "additionalProperties": { "$ref": "#/definitions/resource.Quantity" } }, "type": { "description": "Type of resource that this limit applies to.", "type": "string" } } }, "v1.LimitRangeList": { "description": "LimitRangeList is a list of LimitRange items.", "required": [ "items" ], "properties": { "items": { "description": "Items is a list of LimitRange objects. More info: http://releases.k8s.io/HEAD/docs/design/admission_control_limit_range.md", "type": "array", "items": { "$ref": "#/definitions/v1.LimitRange" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.LimitRangeSpec": { "description": "LimitRangeSpec defines a min/max usage limit for resources that match on kind.", "required": [ "limits" ], "properties": { "limits": { "description": "Limits is the list of LimitRangeItem objects that are enforced.", "type": "array", "items": { "$ref": "#/definitions/v1.LimitRangeItem" } } } }, "v1.LoadBalancerIngress": { "description": "LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.", "properties": { "hostname": { "description": "Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)", "type": "string" }, "ip": { "description": "IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)", "type": "string" } } }, "v1.LoadBalancerStatus": { "description": "LoadBalancerStatus represents the status of a load-balancer.", "properties": { "ingress": { "description": "Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.", "type": "array", "items": { "$ref": "#/definitions/v1.LoadBalancerIngress" } } } }, "v1.LocalObjectReference": { "description": "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", "properties": { "name": { "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "type": "string" } } }, "v1.Namespace": { "description": "Namespace provides a scope for Names. Use of multiple namespaces is optional.", "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec defines the behavior of the Namespace. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.NamespaceSpec" }, "status": { "description": "Status describes the current status of a Namespace. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.NamespaceStatus" } } }, "v1.NamespaceList": { "description": "NamespaceList is a list of Namespaces.", "required": [ "items" ], "properties": { "items": { "description": "Items is the list of Namespace objects in the list. More info: http://kubernetes.io/docs/user-guide/namespaces", "type": "array", "items": { "$ref": "#/definitions/v1.Namespace" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.NamespaceSpec": { "description": "NamespaceSpec describes the attributes on a Namespace.", "properties": { "finalizers": { "description": "Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: http://releases.k8s.io/HEAD/docs/design/namespaces.md#finalizers", "type": "array", "items": { "type": "string" } } } }, "v1.NamespaceStatus": { "description": "NamespaceStatus is information about the current status of a Namespace.", "properties": { "phase": { "description": "Phase is the current lifecycle phase of the namespace. More info: http://releases.k8s.io/HEAD/docs/design/namespaces.md#phases", "type": "string" } } }, "v1.Node": { "description": "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).", "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec defines the behavior of a node. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.NodeSpec" }, "status": { "description": "Most recently observed status of the node. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.NodeStatus" } } }, "v1.NodeAddress": { "description": "NodeAddress contains information for the node's address.", "required": [ "type", "address" ], "properties": { "address": { "description": "The node address.", "type": "string" }, "type": { "description": "Node address type, one of Hostname, ExternalIP or InternalIP.", "type": "string" } } }, "v1.NodeCondition": { "description": "NodeCondition contains condition information for a node.", "required": [ "type", "status" ], "properties": { "lastHeartbeatTime": { "description": "Last time we got an update on a given condition.", "$ref": "#/definitions/unversioned.Time" }, "lastTransitionTime": { "description": "Last time the condition transit from one status to another.", "$ref": "#/definitions/unversioned.Time" }, "message": { "description": "Human readable message indicating details about last transition.", "type": "string" }, "reason": { "description": "(brief) reason for the condition's last transition.", "type": "string" }, "status": { "description": "Status of the condition, one of True, False, Unknown.", "type": "string" }, "type": { "description": "Type of node condition.", "type": "string" } } }, "v1.NodeDaemonEndpoints": { "description": "NodeDaemonEndpoints lists ports opened by daemons running on the Node.", "properties": { "kubeletEndpoint": { "description": "Endpoint on which Kubelet is listening.", "$ref": "#/definitions/v1.DaemonEndpoint" } } }, "v1.NodeList": { "description": "NodeList is the whole list of all Nodes which have been registered with master.", "required": [ "items" ], "properties": { "items": { "description": "List of nodes", "type": "array", "items": { "$ref": "#/definitions/v1.Node" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.NodeSpec": { "description": "NodeSpec describes the attributes that a node is created with.", "properties": { "externalID": { "description": "External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated.", "type": "string" }, "podCIDR": { "description": "PodCIDR represents the pod IP range assigned to the node.", "type": "string" }, "providerID": { "description": "ID of the node assigned by the cloud provider in the format: \u003cProviderName\u003e://\u003cProviderSpecificNodeID\u003e", "type": "string" }, "unschedulable": { "description": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration\"`", "type": "boolean" } } }, "v1.NodeStatus": { "description": "NodeStatus is information about the current status of a node.", "properties": { "addresses": { "description": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses", "type": "array", "items": { "$ref": "#/definitions/v1.NodeAddress" } }, "allocatable": { "description": "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.", "type": "object", "additionalProperties": { "$ref": "#/definitions/resource.Quantity" } }, "capacity": { "description": "Capacity represents the total resources of a node. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#capacity for more details.", "type": "object", "additionalProperties": { "$ref": "#/definitions/resource.Quantity" } }, "conditions": { "description": "Conditions is an array of current observed node conditions. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition", "type": "array", "items": { "$ref": "#/definitions/v1.NodeCondition" } }, "daemonEndpoints": { "description": "Endpoints of daemons running on the Node.", "$ref": "#/definitions/v1.NodeDaemonEndpoints" }, "images": { "description": "List of container images on this node", "type": "array", "items": { "$ref": "#/definitions/v1.ContainerImage" } }, "nodeInfo": { "description": "Set of ids/uuids to uniquely identify the node. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-info", "$ref": "#/definitions/v1.NodeSystemInfo" }, "phase": { "description": "NodePhase is the recently observed lifecycle phase of the node. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase The field is never populated, and now is deprecated.", "type": "string" }, "volumesAttached": { "description": "List of volumes that are attached to the node.", "type": "array", "items": { "$ref": "#/definitions/v1.AttachedVolume" } }, "volumesInUse": { "description": "List of attachable volumes in use (mounted) by the node.", "type": "array", "items": { "type": "string" } } } }, "v1.NodeSystemInfo": { "description": "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.", "required": [ "machineID", "systemUUID", "bootID", "kernelVersion", "osImage", "containerRuntimeVersion", "kubeletVersion", "kubeProxyVersion", "operatingSystem", "architecture" ], "properties": { "architecture": { "description": "The Architecture reported by the node", "type": "string" }, "bootID": { "description": "Boot ID reported by the node.", "type": "string" }, "containerRuntimeVersion": { "description": "ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).", "type": "string" }, "kernelVersion": { "description": "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).", "type": "string" }, "kubeProxyVersion": { "description": "KubeProxy Version reported by the node.", "type": "string" }, "kubeletVersion": { "description": "Kubelet Version reported by the node.", "type": "string" }, "machineID": { "description": "MachineID reported by the node. For unique machine identification in the cluster this field is prefered. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html", "type": "string" }, "operatingSystem": { "description": "The Operating System reported by the node", "type": "string" }, "osImage": { "description": "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", "type": "string" }, "systemUUID": { "description": "SystemUUID reported by the node. For unique machine identification MachineID is prefered. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html", "type": "string" } } }, "v1.ObjectFieldSelector": { "description": "ObjectFieldSelector selects an APIVersioned field of an object.", "required": [ "fieldPath" ], "properties": { "apiVersion": { "description": "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".", "type": "string" }, "fieldPath": { "description": "Path of the field to select in the specified API version.", "type": "string" } } }, "v1.ObjectMeta": { "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", "properties": { "annotations": { "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", "type": "object", "additionalProperties": { "type": "string" } }, "clusterName": { "description": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", "type": "string" }, "creationTimestamp": { "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/unversioned.Time" }, "deletionGracePeriodSeconds": { "description": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", "type": "integer", "format": "int64" }, "deletionTimestamp": { "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource will be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. Once the resource is deleted in the API, the Kubelet will send a hard termination signal to the container. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/unversioned.Time" }, "finalizers": { "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", "type": "array", "items": { "type": "string" } }, "generateName": { "description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency", "type": "string" }, "generation": { "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", "type": "integer", "format": "int64" }, "labels": { "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "type": "string" }, "namespace": { "description": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", "type": "string" }, "ownerReferences": { "description": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", "type": "array", "items": { "$ref": "#/definitions/v1.OwnerReference" } }, "resourceVersion": { "description": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency", "type": "string" }, "selfLink": { "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.", "type": "string" }, "uid": { "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", "type": "string" } } }, "v1.ObjectReference": { "description": "ObjectReference contains enough information to let you inspect or modify the referred object.", "properties": { "apiVersion": { "description": "API version of the referent.", "type": "string" }, "fieldPath": { "description": "If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.", "type": "string" }, "kind": { "description": "Kind of the referent. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "type": "string" }, "name": { "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "type": "string" }, "namespace": { "description": "Namespace of the referent. More info: http://kubernetes.io/docs/user-guide/namespaces", "type": "string" }, "resourceVersion": { "description": "Specific resourceVersion to which this reference is made, if any. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency", "type": "string" }, "uid": { "description": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", "type": "string" } } }, "v1.OwnerReference": { "description": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", "required": [ "apiVersion", "kind", "name", "uid" ], "properties": { "apiVersion": { "description": "API version of the referent.", "type": "string" }, "controller": { "description": "If true, this reference points to the managing controller.", "type": "boolean" }, "kind": { "description": "Kind of the referent. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "type": "string" }, "name": { "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "type": "string" }, "uid": { "description": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", "type": "string" } } }, "v1.PersistentVolume": { "description": "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: http://kubernetes.io/docs/user-guide/persistent-volumes", "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistent-volumes", "$ref": "#/definitions/v1.PersistentVolumeSpec" }, "status": { "description": "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistent-volumes", "$ref": "#/definitions/v1.PersistentVolumeStatus" } } }, "v1.PersistentVolumeClaim": { "description": "PersistentVolumeClaim is a user's request for and claim to a persistent volume", "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec defines the desired characteristics of a volume requested by a pod author. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims", "$ref": "#/definitions/v1.PersistentVolumeClaimSpec" }, "status": { "description": "Status represents the current information/status of a persistent volume claim. Read-only. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims", "$ref": "#/definitions/v1.PersistentVolumeClaimStatus" } } }, "v1.PersistentVolumeClaimList": { "description": "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.", "required": [ "items" ], "properties": { "items": { "description": "A list of persistent volume claims. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims", "type": "array", "items": { "$ref": "#/definitions/v1.PersistentVolumeClaim" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.PersistentVolumeClaimSpec": { "description": "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes", "properties": { "accessModes": { "description": "AccessModes contains the desired access modes the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1", "type": "array", "items": { "type": "string" } }, "resources": { "description": "Resources represents the minimum resources the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources", "$ref": "#/definitions/v1.ResourceRequirements" }, "selector": { "description": "A label query over volumes to consider for binding.", "$ref": "#/definitions/unversioned.LabelSelector" }, "volumeName": { "description": "VolumeName is the binding reference to the PersistentVolume backing this claim.", "type": "string" } } }, "v1.PersistentVolumeClaimStatus": { "description": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.", "properties": { "accessModes": { "description": "AccessModes contains the actual access modes the volume backing the PVC has. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1", "type": "array", "items": { "type": "string" } }, "capacity": { "description": "Represents the actual resources of the underlying volume.", "type": "object", "additionalProperties": { "$ref": "#/definitions/resource.Quantity" } }, "phase": { "description": "Phase represents the current phase of PersistentVolumeClaim.", "type": "string" } } }, "v1.PersistentVolumeList": { "description": "PersistentVolumeList is a list of PersistentVolume items.", "required": [ "items" ], "properties": { "items": { "description": "List of persistent volumes. More info: http://kubernetes.io/docs/user-guide/persistent-volumes", "type": "array", "items": { "$ref": "#/definitions/v1.PersistentVolume" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.PersistentVolumeSpec": { "description": "PersistentVolumeSpec is the specification of a persistent volume.", "properties": { "accessModes": { "description": "AccessModes contains all ways the volume can be mounted. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes", "type": "array", "items": { "type": "string" } }, "capacity": { "description": "A description of the persistent volume's resources and capacity. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#capacity", "type": "object", "additionalProperties": { "$ref": "#/definitions/resource.Quantity" } }, "claimRef": { "description": "ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#binding", "$ref": "#/definitions/v1.ObjectReference" }, "persistentVolumeReclaimPolicy": { "description": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy", "type": "string" } } }, "v1.PersistentVolumeStatus": { "description": "PersistentVolumeStatus is the current status of a persistent volume.", "properties": { "message": { "description": "A human-readable message indicating details about why the volume is in this state.", "type": "string" }, "phase": { "description": "Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#phase", "type": "string" }, "reason": { "description": "Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.", "type": "string" } } }, "v1.Pod": { "description": "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.", "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Specification of the desired behavior of the pod. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.PodSpec" }, "status": { "description": "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.PodStatus" } } }, "v1.PodCondition": { "description": "PodCondition contains details for the current condition of this pod.", "required": [ "type", "status" ], "properties": { "lastProbeTime": { "description": "Last time we probed the condition.", "$ref": "#/definitions/unversioned.Time" }, "lastTransitionTime": { "description": "Last time the condition transitioned from one status to another.", "$ref": "#/definitions/unversioned.Time" }, "message": { "description": "Human-readable message indicating details about last transition.", "type": "string" }, "reason": { "description": "Unique, one-word, CamelCase reason for the condition's last transition.", "type": "string" }, "status": { "description": "Status is the status of the condition. Can be True, False, Unknown. More info: http://kubernetes.io/docs/user-guide/pod-states#pod-conditions", "type": "string" }, "type": { "description": "Type is the type of the condition. Currently only Ready. More info: http://kubernetes.io/docs/user-guide/pod-states#pod-conditions", "type": "string" } } }, "v1.PodList": { "description": "PodList is a list of Pods.", "required": [ "items" ], "properties": { "items": { "description": "List of pods. More info: http://kubernetes.io/docs/user-guide/pods", "type": "array", "items": { "$ref": "#/definitions/v1.Pod" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.PodSecurityContext": { "description": "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.", "properties": { "fsGroup": { "description": "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume.", "type": "integer", "format": "int64" }, "runAsNonRoot": { "description": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", "type": "boolean" }, "runAsUser": { "description": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", "type": "integer", "format": "int64" }, "seLinuxOptions": { "description": "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", "$ref": "#/definitions/v1.SELinuxOptions" }, "supplementalGroups": { "description": "A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.", "type": "array", "items": { "type": "integer", "format": "int64" } } } }, "v1.PodSpec": { "description": "PodSpec is a description of a pod.", "required": [ "containers" ], "properties": { "activeDeadlineSeconds": { "description": "Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.", "type": "integer", "format": "int64" }, "containers": { "description": "List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers", "type": "array", "items": { "$ref": "#/definitions/v1.Container" } }, "dnsPolicy": { "description": "Set DNS policy for containers within the pod. One of 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\".", "type": "string" }, "hostIPC": { "description": "Use the host's ipc namespace. Optional: Default to false.", "type": "boolean" }, "hostNetwork": { "description": "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.", "type": "boolean" }, "hostPID": { "description": "Use the host's pid namespace. Optional: Default to false.", "type": "boolean" }, "hostname": { "description": "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", "type": "string" }, "imagePullSecrets": { "description": "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod", "type": "array", "items": { "$ref": "#/definitions/v1.LocalObjectReference" } }, "nodeName": { "description": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.", "type": "string" }, "nodeSelector": { "description": "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: http://kubernetes.io/docs/user-guide/node-selection/README", "type": "object", "additionalProperties": { "type": "string" } }, "restartPolicy": { "description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: http://kubernetes.io/docs/user-guide/pod-states#restartpolicy", "type": "string" }, "securityContext": { "description": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", "$ref": "#/definitions/v1.PodSecurityContext" }, "serviceAccount": { "description": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", "type": "string" }, "serviceAccountName": { "description": "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md", "type": "string" }, "subdomain": { "description": "If specified, the fully qualified Pod hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the pod will not have a domainname at all.", "type": "string" }, "terminationGracePeriodSeconds": { "description": "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.", "type": "integer", "format": "int64" }, "volumes": { "description": "List of volumes that can be mounted by containers belonging to the pod. More info: http://kubernetes.io/docs/user-guide/volumes", "type": "array", "items": { "$ref": "#/definitions/v1.Volume" } } } }, "v1.PodStatus": { "description": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system.", "properties": { "conditions": { "description": "Current service state of pod. More info: http://kubernetes.io/docs/user-guide/pod-states#pod-conditions", "type": "array", "items": { "$ref": "#/definitions/v1.PodCondition" } }, "containerStatuses": { "description": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses", "type": "array", "items": { "$ref": "#/definitions/v1.ContainerStatus" } }, "hostIP": { "description": "IP address of the host to which the pod is assigned. Empty if not yet scheduled.", "type": "string" }, "message": { "description": "A human readable message indicating details about why the pod is in this condition.", "type": "string" }, "phase": { "description": "Current condition of the pod. More info: http://kubernetes.io/docs/user-guide/pod-states#pod-phase", "type": "string" }, "podIP": { "description": "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.", "type": "string" }, "reason": { "description": "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'OutOfDisk'", "type": "string" }, "startTime": { "description": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.", "$ref": "#/definitions/unversioned.Time" } } }, "v1.PodTemplate": { "description": "PodTemplate describes a template for creating copies of a predefined pod.", "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "template": { "description": "Template defines the pods that will be created from this pod template. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.PodTemplateSpec" } } }, "v1.PodTemplateList": { "description": "PodTemplateList is a list of PodTemplates.", "required": [ "items" ], "properties": { "items": { "description": "List of pod templates", "type": "array", "items": { "$ref": "#/definitions/v1.PodTemplate" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.PodTemplateSpec": { "description": "PodTemplateSpec describes the data a pod should have when created from a template", "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Specification of the desired behavior of the pod. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.PodSpec" } } }, "v1.Preconditions": { "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", "properties": { "uid": { "description": "Specifies the target UID.", "type": "string" } } }, "v1.Probe": { "description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", "properties": { "failureThreshold": { "description": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", "type": "integer", "format": "int32" }, "initialDelaySeconds": { "description": "Number of seconds after the container has started before liveness probes are initiated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", "type": "integer", "format": "int32" }, "periodSeconds": { "description": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", "type": "integer", "format": "int32" }, "successThreshold": { "description": "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.", "type": "integer", "format": "int32" }, "timeoutSeconds": { "description": "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", "type": "integer", "format": "int32" } } }, "v1.ReplicationController": { "description": "ReplicationController represents the configuration of a replication controller.", "properties": { "metadata": { "description": "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec defines the specification of the desired behavior of the replication controller. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.ReplicationControllerSpec" }, "status": { "description": "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.ReplicationControllerStatus" } } }, "v1.ReplicationControllerCondition": { "description": "ReplicationControllerCondition describes the state of a replication controller at a certain point.", "required": [ "type", "status" ], "properties": { "lastTransitionTime": { "description": "The last time the condition transitioned from one status to another.", "$ref": "#/definitions/unversioned.Time" }, "message": { "description": "A human readable message indicating details about the transition.", "type": "string" }, "reason": { "description": "The reason for the condition's last transition.", "type": "string" }, "status": { "description": "Status of the condition, one of True, False, Unknown.", "type": "string" }, "type": { "description": "Type of replication controller condition.", "type": "string" } } }, "v1.ReplicationControllerList": { "description": "ReplicationControllerList is a collection of replication controllers.", "required": [ "items" ], "properties": { "items": { "description": "List of replication controllers. More info: http://kubernetes.io/docs/user-guide/replication-controller", "type": "array", "items": { "$ref": "#/definitions/v1.ReplicationController" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.ReplicationControllerSpec": { "description": "ReplicationControllerSpec is the specification of a replication controller.", "properties": { "minReadySeconds": { "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", "type": "integer", "format": "int32" }, "replicas": { "description": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller", "type": "integer", "format": "int32" }, "selector": { "description": "Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", "type": "object", "additionalProperties": { "type": "string" } }, "template": { "description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template", "$ref": "#/definitions/v1.PodTemplateSpec" } } }, "v1.ReplicationControllerStatus": { "description": "ReplicationControllerStatus represents the current status of a replication controller.", "required": [ "replicas" ], "properties": { "availableReplicas": { "description": "The number of available replicas (ready for at least minReadySeconds) for this replication controller.", "type": "integer", "format": "int32" }, "conditions": { "description": "Represents the latest available observations of a replication controller's current state.", "type": "array", "items": { "$ref": "#/definitions/v1.ReplicationControllerCondition" } }, "fullyLabeledReplicas": { "description": "The number of pods that have labels matching the labels of the pod template of the replication controller.", "type": "integer", "format": "int32" }, "observedGeneration": { "description": "ObservedGeneration reflects the generation of the most recently observed replication controller.", "type": "integer", "format": "int64" }, "readyReplicas": { "description": "The number of ready replicas for this replication controller.", "type": "integer", "format": "int32" }, "replicas": { "description": "Replicas is the most recently oberved number of replicas. More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller", "type": "integer", "format": "int32" } } }, "v1.ResourceFieldSelector": { "description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format", "required": [ "resource" ], "properties": { "containerName": { "description": "Container name: required for volumes, optional for env vars", "type": "string" }, "divisor": { "description": "Specifies the output format of the exposed resources, defaults to \"1\"", "$ref": "#/definitions/resource.Quantity" }, "resource": { "description": "Required: resource to select", "type": "string" } } }, "v1.ResourceQuota": { "description": "ResourceQuota sets aggregate quota restrictions enforced per namespace", "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec defines the desired quota. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.ResourceQuotaSpec" }, "status": { "description": "Status defines the actual enforced quota and its current usage. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.ResourceQuotaStatus" } } }, "v1.ResourceQuotaList": { "description": "ResourceQuotaList is a list of ResourceQuota items.", "required": [ "items" ], "properties": { "items": { "description": "Items is a list of ResourceQuota objects. More info: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota", "type": "array", "items": { "$ref": "#/definitions/v1.ResourceQuota" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.ResourceQuotaSpec": { "description": "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.", "properties": { "hard": { "description": "Hard is the set of desired hard limits for each named resource. More info: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota", "type": "object", "additionalProperties": { "$ref": "#/definitions/resource.Quantity" } }, "scopes": { "description": "A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.", "type": "array", "items": { "type": "string" } } } }, "v1.ResourceQuotaStatus": { "description": "ResourceQuotaStatus defines the enforced hard limits and observed use.", "properties": { "hard": { "description": "Hard is the set of enforced hard limits for each named resource. More info: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota", "type": "object", "additionalProperties": { "$ref": "#/definitions/resource.Quantity" } }, "used": { "description": "Used is the current observed total usage of the resource in the namespace.", "type": "object", "additionalProperties": { "$ref": "#/definitions/resource.Quantity" } } } }, "v1.ResourceRequirements": { "description": "ResourceRequirements describes the compute resource requirements.", "properties": { "limits": { "description": "Limits describes the maximum amount of compute resources allowed. More info: http://kubernetes.io/docs/user-guide/compute-resources/", "type": "object", "additionalProperties": { "$ref": "#/definitions/resource.Quantity" } }, "requests": { "description": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: http://kubernetes.io/docs/user-guide/compute-resources/", "type": "object", "additionalProperties": { "$ref": "#/definitions/resource.Quantity" } } } }, "v1.SELinuxOptions": { "description": "SELinuxOptions are the labels to be applied to the container", "properties": { "level": { "description": "Level is SELinux level label that applies to the container.", "type": "string" }, "role": { "description": "Role is a SELinux role label that applies to the container.", "type": "string" }, "type": { "description": "Type is a SELinux type label that applies to the container.", "type": "string" }, "user": { "description": "User is a SELinux user label that applies to the container.", "type": "string" } } }, "v1.Scale": { "description": "Scale represents a scaling request for a resource.", "properties": { "metadata": { "description": "Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", "$ref": "#/definitions/v1.ScaleSpec" }, "status": { "description": "current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.", "$ref": "#/definitions/v1.ScaleStatus" } } }, "v1.ScaleSpec": { "description": "ScaleSpec describes the attributes of a scale subresource.", "properties": { "replicas": { "description": "desired number of instances for the scaled object.", "type": "integer", "format": "int32" } } }, "v1.ScaleStatus": { "description": "ScaleStatus represents the current status of a scale subresource.", "required": [ "replicas" ], "properties": { "replicas": { "description": "actual number of observed instances of the scaled object.", "type": "integer", "format": "int32" }, "selector": { "description": "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors", "type": "string" } } }, "v1.Secret": { "description": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", "properties": { "data": { "description": "Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", "type": "object", "additionalProperties": { "type": "array", "items": { "type": "integer", "format": "byte" } } }, "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "stringData": { "description": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", "type": "object", "additionalProperties": { "type": "string" } }, "type": { "description": "Used to facilitate programmatic handling of secret data.", "type": "string" } } }, "v1.SecretKeySelector": { "description": "SecretKeySelector selects a key of a Secret.", "required": [ "key" ], "properties": { "key": { "description": "The key of the secret to select from. Must be a valid secret key.", "type": "string" } } }, "v1.SecretList": { "description": "SecretList is a list of Secret.", "required": [ "items" ], "properties": { "items": { "description": "Items is a list of secret objects. More info: http://kubernetes.io/docs/user-guide/secrets", "type": "array", "items": { "$ref": "#/definitions/v1.Secret" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.SecurityContext": { "description": "SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.", "properties": { "capabilities": { "description": "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.", "$ref": "#/definitions/v1.Capabilities" }, "privileged": { "description": "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.", "type": "boolean" }, "readOnlyRootFilesystem": { "description": "Whether this container has a read-only root filesystem. Default is false.", "type": "boolean" }, "runAsNonRoot": { "description": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", "type": "boolean" }, "runAsUser": { "description": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", "type": "integer", "format": "int64" }, "seLinuxOptions": { "description": "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", "$ref": "#/definitions/v1.SELinuxOptions" } } }, "v1.Service": { "description": "Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.", "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec defines the behavior of a service. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.ServiceSpec" }, "status": { "description": "Most recently observed status of the service. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1.ServiceStatus" } } }, "v1.ServiceAccount": { "description": "ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets", "properties": { "imagePullSecrets": { "description": "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: http://kubernetes.io/docs/user-guide/secrets#manually-specifying-an-imagepullsecret", "type": "array", "items": { "$ref": "#/definitions/v1.LocalObjectReference" } }, "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "secrets": { "description": "Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: http://kubernetes.io/docs/user-guide/secrets", "type": "array", "items": { "$ref": "#/definitions/v1.ObjectReference" } } } }, "v1.ServiceAccountList": { "description": "ServiceAccountList is a list of ServiceAccount objects", "required": [ "items" ], "properties": { "items": { "description": "List of ServiceAccounts. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md#service-accounts", "type": "array", "items": { "$ref": "#/definitions/v1.ServiceAccount" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.ServiceList": { "description": "ServiceList holds a list of services.", "required": [ "items" ], "properties": { "items": { "description": "List of services", "type": "array", "items": { "$ref": "#/definitions/v1.Service" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1.ServicePort": { "description": "ServicePort contains information on service's port.", "required": [ "port" ], "properties": { "name": { "description": "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the 'Name' field in EndpointPort objects. Optional if only one ServicePort is defined on this service.", "type": "string" }, "nodePort": { "description": "The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: http://kubernetes.io/docs/user-guide/services#type--nodeport", "type": "integer", "format": "int32" }, "port": { "description": "The port that will be exposed by this service.", "type": "integer", "format": "int32" }, "protocol": { "description": "The IP protocol for this port. Supports \"TCP\" and \"UDP\". Default is TCP.", "type": "string" }, "targetPort": { "description": "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: http://kubernetes.io/docs/user-guide/services#defining-a-service", "$ref": "#/definitions/intstr.IntOrString" } } }, "v1.ServiceSpec": { "description": "ServiceSpec describes the attributes that a user creates on a service.", "required": [ "ports" ], "properties": { "clusterIP": { "description": "clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \"None\", empty string (\"\"), or a valid IP address. \"None\" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies", "type": "string" }, "deprecatedPublicIPs": { "description": "deprecatedPublicIPs is deprecated and replaced by the externalIPs field with almost the exact same semantics. This field is retained in the v1 API for compatibility until at least 8/20/2016. It will be removed from any new API revisions. If both deprecatedPublicIPs *and* externalIPs are set, deprecatedPublicIPs is used.", "type": "array", "items": { "type": "string" } }, "externalIPs": { "description": "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. A previous form of this functionality exists as the deprecatedPublicIPs field. When using this field, callers should also clear the deprecatedPublicIPs field.", "type": "array", "items": { "type": "string" } }, "externalName": { "description": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName.", "type": "string" }, "loadBalancerIP": { "description": "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.", "type": "string" }, "loadBalancerSourceRanges": { "description": "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: http://kubernetes.io/docs/user-guide/services-firewalls", "type": "array", "items": { "type": "string" } }, "ports": { "description": "The list of ports that are exposed by this service. More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies", "type": "array", "items": { "$ref": "#/definitions/v1.ServicePort" } }, "selector": { "description": "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: http://kubernetes.io/docs/user-guide/services#overview", "type": "object", "additionalProperties": { "type": "string" } }, "sessionAffinity": { "description": "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies", "type": "string" }, "type": { "description": "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: http://kubernetes.io/docs/user-guide/services#overview", "type": "string" } } }, "v1.ServiceStatus": { "description": "ServiceStatus represents the current status of a service.", "properties": { "loadBalancer": { "description": "LoadBalancer contains the current status of the load-balancer, if one is present.", "$ref": "#/definitions/v1.LoadBalancerStatus" } } }, "v1.TCPSocketAction": { "description": "TCPSocketAction describes an action based on opening a socket", "required": [ "port" ], "properties": { "port": { "description": "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", "$ref": "#/definitions/intstr.IntOrString" } } }, "v1.Volume": { "description": "Volume represents a named volume in a pod that may be accessed by any container in the pod.", "required": [ "name" ], "properties": { "name": { "description": "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "type": "string" } } }, "v1.VolumeMount": { "description": "VolumeMount describes a mounting of a Volume within a container.", "required": [ "name", "mountPath" ], "properties": { "mountPath": { "description": "Path within the container at which the volume should be mounted. Must not contain ':'.", "type": "string" }, "name": { "description": "This must match the Name of a Volume.", "type": "string" }, "readOnly": { "description": "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", "type": "boolean" }, "subPath": { "description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", "type": "string" } } }, "v1alpha1.CertificateSigningRequest": { "description": "Describes a certificate signing request", "properties": { "metadata": { "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "The certificate request itself and any additional information.", "$ref": "#/definitions/v1alpha1.CertificateSigningRequestSpec" }, "status": { "description": "Derived information about the request.", "$ref": "#/definitions/v1alpha1.CertificateSigningRequestStatus" } } }, "v1alpha1.CertificateSigningRequestCondition": { "required": [ "type" ], "properties": { "lastUpdateTime": { "description": "timestamp for the last update to this condition", "$ref": "#/definitions/unversioned.Time" }, "message": { "description": "human readable message with details about the request state", "type": "string" }, "reason": { "description": "brief reason for the request state", "type": "string" }, "type": { "description": "request approval state, currently Approved or Denied.", "type": "string" } } }, "v1alpha1.CertificateSigningRequestList": { "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" } }, "metadata": { "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1alpha1.CertificateSigningRequestSpec": { "description": "This information is immutable after the request is created. Only the Request and ExtraInfo fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", "required": [ "request" ], "properties": { "groups": { "type": "array", "items": { "type": "string" } }, "request": { "description": "Base64-encoded PKCS#10 CSR data", "type": "string", "format": "byte" }, "uid": { "type": "string" }, "username": { "description": "Information about the requesting user (if relevant) See user.Info interface for details", "type": "string" } } }, "v1alpha1.CertificateSigningRequestStatus": { "properties": { "certificate": { "description": "If request was approved, the controller will place the issued certificate here.", "type": "string", "format": "byte" }, "conditions": { "description": "Conditions applied to the request, such as approval or denial.", "type": "array", "items": { "$ref": "#/definitions/v1alpha1.CertificateSigningRequestCondition" } } } }, "v1alpha1.ClusterRole": { "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", "required": [ "rules" ], "properties": { "metadata": { "description": "Standard object's metadata.", "$ref": "#/definitions/v1.ObjectMeta" }, "rules": { "description": "Rules holds all the PolicyRules for this ClusterRole", "type": "array", "items": { "$ref": "#/definitions/v1alpha1.PolicyRule" } } } }, "v1alpha1.ClusterRoleBinding": { "description": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", "required": [ "subjects", "roleRef" ], "properties": { "metadata": { "description": "Standard object's metadata.", "$ref": "#/definitions/v1.ObjectMeta" }, "roleRef": { "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", "$ref": "#/definitions/v1alpha1.RoleRef" }, "subjects": { "description": "Subjects holds references to the objects the role applies to.", "type": "array", "items": { "$ref": "#/definitions/v1alpha1.Subject" } } } }, "v1alpha1.ClusterRoleBindingList": { "description": "ClusterRoleBindingList is a collection of ClusterRoleBindings", "required": [ "items" ], "properties": { "items": { "description": "Items is a list of ClusterRoleBindings", "type": "array", "items": { "$ref": "#/definitions/v1alpha1.ClusterRoleBinding" } }, "metadata": { "description": "Standard object's metadata.", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1alpha1.ClusterRoleList": { "description": "ClusterRoleList is a collection of ClusterRoles", "required": [ "items" ], "properties": { "items": { "description": "Items is a list of ClusterRoles", "type": "array", "items": { "$ref": "#/definitions/v1alpha1.ClusterRole" } }, "metadata": { "description": "Standard object's metadata.", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1alpha1.Eviction": { "description": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods/\u003cpod name\u003e/eviction.", "properties": { "deleteOptions": { "description": "DeleteOptions may be provided", "$ref": "#/definitions/v1.DeleteOptions" }, "metadata": { "description": "ObjectMeta describes the pod that is being evicted.", "$ref": "#/definitions/v1.ObjectMeta" } } }, "v1alpha1.PodDisruptionBudget": { "description": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", "properties": { "metadata": { "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Specification of the desired behavior of the PodDisruptionBudget.", "$ref": "#/definitions/v1alpha1.PodDisruptionBudgetSpec" }, "status": { "description": "Most recently observed status of the PodDisruptionBudget.", "$ref": "#/definitions/v1alpha1.PodDisruptionBudgetStatus" } } }, "v1alpha1.PodDisruptionBudgetList": { "description": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/v1alpha1.PodDisruptionBudget" } }, "metadata": { "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1alpha1.PodDisruptionBudgetSpec": { "description": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", "properties": { "minAvailable": { "description": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", "$ref": "#/definitions/intstr.IntOrString" }, "selector": { "description": "Label query over pods whose evictions are managed by the disruption budget.", "$ref": "#/definitions/unversioned.LabelSelector" } } }, "v1alpha1.PodDisruptionBudgetStatus": { "description": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", "required": [ "disruptionAllowed", "currentHealthy", "desiredHealthy", "expectedPods" ], "properties": { "currentHealthy": { "description": "current number of healthy pods", "type": "integer", "format": "int32" }, "desiredHealthy": { "description": "minimum desired number of healthy pods", "type": "integer", "format": "int32" }, "disruptionAllowed": { "description": "Whether or not a disruption is currently allowed.", "type": "boolean" }, "expectedPods": { "description": "total number of pods counted by this disruption budget", "type": "integer", "format": "int32" } } }, "v1alpha1.PolicyRule": { "description": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", "required": [ "verbs" ], "properties": { "apiGroups": { "description": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", "type": "array", "items": { "type": "string" } }, "attributeRestrictions": { "description": "AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.", "$ref": "#/definitions/runtime.RawExtension" }, "nonResourceURLs": { "description": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", "type": "array", "items": { "type": "string" } }, "resourceNames": { "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", "type": "array", "items": { "type": "string" } }, "resources": { "description": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", "type": "array", "items": { "type": "string" } }, "verbs": { "description": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", "type": "array", "items": { "type": "string" } } } }, "v1alpha1.Role": { "description": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", "required": [ "rules" ], "properties": { "metadata": { "description": "Standard object's metadata.", "$ref": "#/definitions/v1.ObjectMeta" }, "rules": { "description": "Rules holds all the PolicyRules for this Role", "type": "array", "items": { "$ref": "#/definitions/v1alpha1.PolicyRule" } } } }, "v1alpha1.RoleBinding": { "description": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", "required": [ "subjects", "roleRef" ], "properties": { "metadata": { "description": "Standard object's metadata.", "$ref": "#/definitions/v1.ObjectMeta" }, "roleRef": { "description": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", "$ref": "#/definitions/v1alpha1.RoleRef" }, "subjects": { "description": "Subjects holds references to the objects the role applies to.", "type": "array", "items": { "$ref": "#/definitions/v1alpha1.Subject" } } } }, "v1alpha1.RoleBindingList": { "description": "RoleBindingList is a collection of RoleBindings", "required": [ "items" ], "properties": { "items": { "description": "Items is a list of RoleBindings", "type": "array", "items": { "$ref": "#/definitions/v1alpha1.RoleBinding" } }, "metadata": { "description": "Standard object's metadata.", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1alpha1.RoleList": { "description": "RoleList is a collection of Roles", "required": [ "items" ], "properties": { "items": { "description": "Items is a list of Roles", "type": "array", "items": { "$ref": "#/definitions/v1alpha1.Role" } }, "metadata": { "description": "Standard object's metadata.", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1alpha1.RoleRef": { "description": "RoleRef contains information that points to the role being used", "required": [ "apiGroup", "kind", "name" ], "properties": { "apiGroup": { "description": "APIGroup is the group for the resource being referenced", "type": "string" }, "kind": { "description": "Kind is the type of resource being referenced", "type": "string" }, "name": { "description": "Name is the name of resource being referenced", "type": "string" } } }, "v1alpha1.StatefulSet": { "description": "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity. StatefulSet is currently in alpha and subject to change without notice.", "properties": { "metadata": { "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec defines the desired identities of pods in this set.", "$ref": "#/definitions/v1alpha1.StatefulSetSpec" }, "status": { "description": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", "$ref": "#/definitions/v1alpha1.StatefulSetStatus" } } }, "v1alpha1.StatefulSetList": { "description": "StatefulSetList is a collection of StatefulSets.", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/v1alpha1.StatefulSet" } }, "metadata": { "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1alpha1.StatefulSetSpec": { "description": "A StatefulSetSpec is the specification of a StatefulSet.", "required": [ "template", "serviceName" ], "properties": { "replicas": { "description": "Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", "type": "integer", "format": "int32" }, "selector": { "description": "Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", "$ref": "#/definitions/unversioned.LabelSelector" }, "serviceName": { "description": "ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", "type": "string" }, "template": { "description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", "$ref": "#/definitions/v1.PodTemplateSpec" }, "volumeClaimTemplates": { "description": "VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", "type": "array", "items": { "$ref": "#/definitions/v1.PersistentVolumeClaim" } } } }, "v1alpha1.StatefulSetStatus": { "description": "StatefulSetStatus represents the current state of a StatefulSet.", "required": [ "replicas" ], "properties": { "observedGeneration": { "description": "most recent generation observed by this autoscaler.", "type": "integer", "format": "int64" }, "replicas": { "description": "Replicas is the number of actual replicas.", "type": "integer", "format": "int32" } } }, "v1alpha1.Subject": { "description": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", "required": [ "kind", "name" ], "properties": { "apiVersion": { "description": "APIVersion holds the API group and version of the referenced object.", "type": "string" }, "kind": { "description": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", "type": "string" }, "name": { "description": "Name of the object being referenced.", "type": "string" }, "namespace": { "description": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", "type": "string" } } }, "v1beta1.APIVersion": { "description": "An APIVersion represents a single concrete version of an object model.", "properties": { "name": { "description": "Name of this version (e.g. 'v1').", "type": "string" } } }, "v1beta1.CPUTargetUtilization": { "required": [ "targetPercentage" ], "properties": { "targetPercentage": { "description": "fraction of the requested CPU that should be utilized/used, e.g. 70 means that 70% of the requested CPU should be in use.", "type": "integer", "format": "int32" } } }, "v1beta1.DaemonSet": { "description": "DaemonSet represents the configuration of a daemon set.", "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec defines the desired behavior of this daemon set. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1beta1.DaemonSetSpec" }, "status": { "description": "Status is the current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1beta1.DaemonSetStatus" } } }, "v1beta1.DaemonSetList": { "description": "DaemonSetList is a collection of daemon sets.", "required": [ "items" ], "properties": { "items": { "description": "Items is a list of daemon sets.", "type": "array", "items": { "$ref": "#/definitions/v1beta1.DaemonSet" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1beta1.DaemonSetSpec": { "description": "DaemonSetSpec is the specification of a daemon set.", "required": [ "template" ], "properties": { "selector": { "description": "Selector is a label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", "$ref": "#/definitions/unversioned.LabelSelector" }, "template": { "description": "Template is the object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template", "$ref": "#/definitions/v1.PodTemplateSpec" } } }, "v1beta1.DaemonSetStatus": { "description": "DaemonSetStatus represents the current status of a daemon set.", "required": [ "currentNumberScheduled", "numberMisscheduled", "desiredNumberScheduled", "numberReady" ], "properties": { "currentNumberScheduled": { "description": "CurrentNumberScheduled is the number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md", "type": "integer", "format": "int32" }, "desiredNumberScheduled": { "description": "DesiredNumberScheduled is the total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md", "type": "integer", "format": "int32" }, "numberMisscheduled": { "description": "NumberMisscheduled is the number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md", "type": "integer", "format": "int32" }, "numberReady": { "description": "NumberReady is the number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", "type": "integer", "format": "int32" } } }, "v1beta1.Deployment": { "description": "Deployment enables declarative updates for Pods and ReplicaSets.", "properties": { "metadata": { "description": "Standard object metadata.", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Specification of the desired behavior of the Deployment.", "$ref": "#/definitions/v1beta1.DeploymentSpec" }, "status": { "description": "Most recently observed status of the Deployment.", "$ref": "#/definitions/v1beta1.DeploymentStatus" } } }, "v1beta1.DeploymentCondition": { "description": "DeploymentCondition describes the state of a deployment at a certain point.", "required": [ "type", "status", "lastUpdateTime", "lastTransitionTime", "reason", "message" ], "properties": { "lastTransitionTime": { "description": "Last time the condition transitioned from one status to another.", "$ref": "#/definitions/unversioned.Time" }, "lastUpdateTime": { "description": "The last time this condition was updated.", "$ref": "#/definitions/unversioned.Time" }, "message": { "description": "A human readable message indicating details about the transition.", "type": "string" }, "reason": { "description": "The reason for the condition's last transition.", "type": "string" }, "status": { "description": "Status of the condition, one of True, False, Unknown.", "type": "string" }, "type": { "description": "Type of deployment condition.", "type": "string" } } }, "v1beta1.DeploymentList": { "description": "DeploymentList is a list of Deployments.", "required": [ "items" ], "properties": { "items": { "description": "Items is the list of Deployments.", "type": "array", "items": { "$ref": "#/definitions/v1beta1.Deployment" } }, "metadata": { "description": "Standard list metadata.", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1beta1.DeploymentRollback": { "description": "DeploymentRollback stores the information required to rollback a deployment.", "required": [ "name", "rollbackTo" ], "properties": { "name": { "description": "Required: This must match the Name of a deployment.", "type": "string" }, "rollbackTo": { "description": "The config of this deployment rollback.", "$ref": "#/definitions/v1beta1.RollbackConfig" }, "updatedAnnotations": { "description": "The annotations to be updated to a deployment", "type": "object", "additionalProperties": { "type": "string" } } } }, "v1beta1.DeploymentSpec": { "description": "DeploymentSpec is the specification of the desired behavior of the Deployment.", "required": [ "template", "progressDeadlineSeconds" ], "properties": { "minReadySeconds": { "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", "type": "integer", "format": "int32" }, "paused": { "description": "Indicates that the deployment is paused and will not be processed by the deployment controller.", "type": "boolean" }, "progressDeadlineSeconds": { "description": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. This is not set by default.", "type": "integer", "format": "int32" }, "replicas": { "description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", "type": "integer", "format": "int32" }, "revisionHistoryLimit": { "description": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified.", "type": "integer", "format": "int32" }, "rollbackTo": { "description": "The config this deployment is rolling back to. Will be cleared after rollback is done.", "$ref": "#/definitions/v1beta1.RollbackConfig" }, "selector": { "description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", "$ref": "#/definitions/unversioned.LabelSelector" }, "strategy": { "description": "The deployment strategy to use to replace existing pods with new ones.", "$ref": "#/definitions/v1beta1.DeploymentStrategy" }, "template": { "description": "Template describes the pods that will be created.", "$ref": "#/definitions/v1.PodTemplateSpec" } } }, "v1beta1.DeploymentStatus": { "description": "DeploymentStatus is the most recently observed status of the Deployment.", "required": [ "conditions" ], "properties": { "availableReplicas": { "description": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", "type": "integer", "format": "int32" }, "conditions": { "description": "Represents the latest available observations of a deployment's current state.", "type": "array", "items": { "$ref": "#/definitions/v1beta1.DeploymentCondition" } }, "observedGeneration": { "description": "The generation observed by the deployment controller.", "type": "integer", "format": "int64" }, "replicas": { "description": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", "type": "integer", "format": "int32" }, "unavailableReplicas": { "description": "Total number of unavailable pods targeted by this deployment.", "type": "integer", "format": "int32" }, "updatedReplicas": { "description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", "type": "integer", "format": "int32" } } }, "v1beta1.DeploymentStrategy": { "description": "DeploymentStrategy describes how to replace existing pods with new ones.", "properties": { "rollingUpdate": { "description": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", "$ref": "#/definitions/v1beta1.RollingUpdateDeployment" }, "type": { "description": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", "type": "string" } } }, "v1beta1.HorizontalPodAutoscaler": { "description": "configuration of a horizontal pod autoscaler.", "properties": { "metadata": { "description": "Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", "$ref": "#/definitions/v1beta1.HorizontalPodAutoscalerSpec" }, "status": { "description": "current information about the autoscaler.", "$ref": "#/definitions/v1beta1.HorizontalPodAutoscalerStatus" } } }, "v1beta1.HorizontalPodAutoscalerList": { "description": "list of horizontal pod autoscaler objects.", "required": [ "items" ], "properties": { "items": { "description": "list of horizontal pod autoscaler objects.", "type": "array", "items": { "$ref": "#/definitions/v1beta1.HorizontalPodAutoscaler" } }, "metadata": { "description": "Standard list metadata.", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1beta1.HorizontalPodAutoscalerSpec": { "description": "specification of a horizontal pod autoscaler.", "required": [ "scaleRef", "maxReplicas" ], "properties": { "cpuUtilization": { "description": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified it defaults to the target CPU utilization at 80% of the requested resources.", "$ref": "#/definitions/v1beta1.CPUTargetUtilization" }, "maxReplicas": { "description": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.", "type": "integer", "format": "int32" }, "minReplicas": { "description": "lower limit for the number of pods that can be set by the autoscaler, default 1.", "type": "integer", "format": "int32" }, "scaleRef": { "description": "reference to Scale subresource; horizontal pod autoscaler will learn the current resource consumption from its status, and will set the desired number of pods by modifying its spec.", "$ref": "#/definitions/v1beta1.SubresourceReference" } } }, "v1beta1.HorizontalPodAutoscalerStatus": { "description": "current status of a horizontal pod autoscaler", "required": [ "currentReplicas", "desiredReplicas" ], "properties": { "currentCPUUtilizationPercentage": { "description": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.", "type": "integer", "format": "int32" }, "currentReplicas": { "description": "current number of replicas of pods managed by this autoscaler.", "type": "integer", "format": "int32" }, "desiredReplicas": { "description": "desired number of replicas of pods managed by this autoscaler.", "type": "integer", "format": "int32" }, "lastScaleTime": { "description": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.", "$ref": "#/definitions/unversioned.Time" }, "observedGeneration": { "description": "most recent generation observed by this autoscaler.", "type": "integer", "format": "int64" } } }, "v1beta1.Ingress": { "description": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec is the desired state of the Ingress. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1beta1.IngressSpec" }, "status": { "description": "Status is the current state of the Ingress. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1beta1.IngressStatus" } } }, "v1beta1.IngressBackend": { "description": "IngressBackend describes all endpoints for a given service and port.", "required": [ "serviceName", "servicePort" ], "properties": { "serviceName": { "description": "Specifies the name of the referenced service.", "type": "string" }, "servicePort": { "description": "Specifies the port of the referenced service.", "$ref": "#/definitions/intstr.IntOrString" } } }, "v1beta1.IngressList": { "description": "IngressList is a collection of Ingress.", "required": [ "items" ], "properties": { "items": { "description": "Items is the list of Ingress.", "type": "array", "items": { "$ref": "#/definitions/v1beta1.Ingress" } }, "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1beta1.IngressRule": { "description": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", "properties": { "host": { "description": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the\n\t IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.", "type": "string" } } }, "v1beta1.IngressSpec": { "description": "IngressSpec describes the Ingress the user wishes to exist.", "properties": { "backend": { "description": "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", "$ref": "#/definitions/v1beta1.IngressBackend" }, "rules": { "description": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", "type": "array", "items": { "$ref": "#/definitions/v1beta1.IngressRule" } }, "tls": { "description": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", "type": "array", "items": { "$ref": "#/definitions/v1beta1.IngressTLS" } } } }, "v1beta1.IngressStatus": { "description": "IngressStatus describe the current state of the Ingress.", "properties": { "loadBalancer": { "description": "LoadBalancer contains the current status of the load-balancer.", "$ref": "#/definitions/v1.LoadBalancerStatus" } } }, "v1beta1.IngressTLS": { "description": "IngressTLS describes the transport layer security associated with an Ingress.", "properties": { "hosts": { "description": "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", "type": "array", "items": { "type": "string" } }, "secretName": { "description": "SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", "type": "string" } } }, "v1beta1.Job": { "description": "Job represents the configuration of a single job.", "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec is a structure defining the expected behavior of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1beta1.JobSpec" }, "status": { "description": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1beta1.JobStatus" } } }, "v1beta1.JobCondition": { "description": "JobCondition describes current state of a job.", "required": [ "type", "status" ], "properties": { "lastProbeTime": { "description": "Last time the condition was checked.", "$ref": "#/definitions/unversioned.Time" }, "lastTransitionTime": { "description": "Last time the condition transit from one status to another.", "$ref": "#/definitions/unversioned.Time" }, "message": { "description": "Human readable message indicating details about last transition.", "type": "string" }, "reason": { "description": "(brief) reason for the condition's last transition.", "type": "string" }, "status": { "description": "Status of the condition, one of True, False, Unknown.", "type": "string" }, "type": { "description": "Type of job condition, Complete or Failed.", "type": "string" } } }, "v1beta1.JobList": { "description": "JobList is a collection of jobs.", "required": [ "items" ], "properties": { "items": { "description": "Items is the list of Job.", "type": "array", "items": { "$ref": "#/definitions/v1beta1.Job" } }, "metadata": { "description": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1beta1.JobSpec": { "description": "JobSpec describes how the job execution will look like.", "required": [ "template" ], "properties": { "activeDeadlineSeconds": { "description": "Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer", "type": "integer", "format": "int64" }, "autoSelector": { "description": "AutoSelector controls generation of pod labels and pod selectors. It was not present in the original extensions/v1beta1 Job definition, but exists to allow conversion from batch/v1 Jobs, where it corresponds to, but has the opposite meaning as, ManualSelector. More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md", "type": "boolean" }, "completions": { "description": "Completions specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: http://kubernetes.io/docs/user-guide/jobs", "type": "integer", "format": "int32" }, "parallelism": { "description": "Parallelism specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) \u003c .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: http://kubernetes.io/docs/user-guide/jobs", "type": "integer", "format": "int32" }, "selector": { "description": "Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", "$ref": "#/definitions/unversioned.LabelSelector" }, "template": { "description": "Template is the object that describes the pod that will be created when executing a job. More info: http://kubernetes.io/docs/user-guide/jobs", "$ref": "#/definitions/v1.PodTemplateSpec" } } }, "v1beta1.JobStatus": { "description": "JobStatus represents the current state of a Job.", "properties": { "active": { "description": "Active is the number of actively running pods.", "type": "integer", "format": "int32" }, "completionTime": { "description": "CompletionTime represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", "$ref": "#/definitions/unversioned.Time" }, "conditions": { "description": "Conditions represent the latest available observations of an object's current state. More info: http://kubernetes.io/docs/user-guide/jobs", "type": "array", "items": { "$ref": "#/definitions/v1beta1.JobCondition" } }, "failed": { "description": "Failed is the number of pods which reached Phase Failed.", "type": "integer", "format": "int32" }, "startTime": { "description": "StartTime represents time when the job was acknowledged by the Job Manager. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", "$ref": "#/definitions/unversioned.Time" }, "succeeded": { "description": "Succeeded is the number of pods which reached Phase Succeeded.", "type": "integer", "format": "int32" } } }, "v1beta1.LocalSubjectAccessReview": { "description": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.", "required": [ "spec" ], "properties": { "metadata": { "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", "$ref": "#/definitions/v1beta1.SubjectAccessReviewSpec" }, "status": { "description": "Status is filled in by the server and indicates whether the request is allowed or not", "$ref": "#/definitions/v1beta1.SubjectAccessReviewStatus" } } }, "v1beta1.NetworkPolicy": { "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Specification of the desired behavior for this NetworkPolicy.", "$ref": "#/definitions/v1beta1.NetworkPolicySpec" } } }, "v1beta1.NetworkPolicyIngressRule": { "description": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", "properties": { "from": { "description": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.", "type": "array", "items": { "$ref": "#/definitions/v1beta1.NetworkPolicyPeer" } }, "ports": { "description": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", "type": "array", "items": { "$ref": "#/definitions/v1beta1.NetworkPolicyPort" } } } }, "v1beta1.NetworkPolicyList": { "description": "Network Policy List is a list of NetworkPolicy objects.", "required": [ "items" ], "properties": { "items": { "description": "Items is a list of schema objects.", "type": "array", "items": { "$ref": "#/definitions/v1beta1.NetworkPolicy" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1beta1.NetworkPolicyPeer": { "properties": { "namespaceSelector": { "description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces.", "$ref": "#/definitions/unversioned.LabelSelector" }, "podSelector": { "description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace.", "$ref": "#/definitions/unversioned.LabelSelector" } } }, "v1beta1.NetworkPolicyPort": { "properties": { "port": { "description": "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.", "$ref": "#/definitions/intstr.IntOrString" }, "protocol": { "description": "Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP.", "type": "string" } } }, "v1beta1.NetworkPolicySpec": { "required": [ "podSelector" ], "properties": { "ingress": { "description": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not affect ingress isolation. If this field is present and contains at least one rule, this policy allows any traffic which matches at least one of the ingress rules in this list.", "type": "array", "items": { "$ref": "#/definitions/v1beta1.NetworkPolicyIngressRule" } }, "podSelector": { "description": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.", "$ref": "#/definitions/unversioned.LabelSelector" } } }, "v1beta1.NonResourceAttributes": { "description": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface", "properties": { "path": { "description": "Path is the URL path of the request", "type": "string" }, "verb": { "description": "Verb is the standard HTTP verb", "type": "string" } } }, "v1beta1.ReplicaSet": { "description": "ReplicaSet represents the configuration of a ReplicaSet.", "properties": { "metadata": { "description": "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec defines the specification of the desired behavior of the ReplicaSet. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1beta1.ReplicaSetSpec" }, "status": { "description": "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", "$ref": "#/definitions/v1beta1.ReplicaSetStatus" } } }, "v1beta1.ReplicaSetCondition": { "description": "ReplicaSetCondition describes the state of a replica set at a certain point.", "required": [ "type", "status" ], "properties": { "lastTransitionTime": { "description": "The last time the condition transitioned from one status to another.", "$ref": "#/definitions/unversioned.Time" }, "message": { "description": "A human readable message indicating details about the transition.", "type": "string" }, "reason": { "description": "The reason for the condition's last transition.", "type": "string" }, "status": { "description": "Status of the condition, one of True, False, Unknown.", "type": "string" }, "type": { "description": "Type of replica set condition.", "type": "string" } } }, "v1beta1.ReplicaSetList": { "description": "ReplicaSetList is a collection of ReplicaSets.", "required": [ "items" ], "properties": { "items": { "description": "List of ReplicaSets. More info: http://kubernetes.io/docs/user-guide/replication-controller", "type": "array", "items": { "$ref": "#/definitions/v1beta1.ReplicaSet" } }, "metadata": { "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1beta1.ReplicaSetSpec": { "description": "ReplicaSetSpec is the specification of a ReplicaSet.", "properties": { "minReadySeconds": { "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", "type": "integer", "format": "int32" }, "replicas": { "description": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller", "type": "integer", "format": "int32" }, "selector": { "description": "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", "$ref": "#/definitions/unversioned.LabelSelector" }, "template": { "description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template", "$ref": "#/definitions/v1.PodTemplateSpec" } } }, "v1beta1.ReplicaSetStatus": { "description": "ReplicaSetStatus represents the current status of a ReplicaSet.", "required": [ "replicas" ], "properties": { "availableReplicas": { "description": "The number of available replicas (ready for at least minReadySeconds) for this replica set.", "type": "integer", "format": "int32" }, "conditions": { "description": "Represents the latest available observations of a replica set's current state.", "type": "array", "items": { "$ref": "#/definitions/v1beta1.ReplicaSetCondition" } }, "fullyLabeledReplicas": { "description": "The number of pods that have labels matching the labels of the pod template of the replicaset.", "type": "integer", "format": "int32" }, "observedGeneration": { "description": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", "type": "integer", "format": "int64" }, "readyReplicas": { "description": "The number of ready replicas for this replica set.", "type": "integer", "format": "int32" }, "replicas": { "description": "Replicas is the most recently oberved number of replicas. More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller", "type": "integer", "format": "int32" } } }, "v1beta1.ResourceAttributes": { "description": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", "properties": { "group": { "description": "Group is the API Group of the Resource. \"*\" means all.", "type": "string" }, "name": { "description": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.", "type": "string" }, "namespace": { "description": "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview", "type": "string" }, "resource": { "description": "Resource is one of the existing resource types. \"*\" means all.", "type": "string" }, "subresource": { "description": "Subresource is one of the existing resource types. \"\" means none.", "type": "string" }, "verb": { "description": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", "type": "string" }, "version": { "description": "Version is the API Version of the Resource. \"*\" means all.", "type": "string" } } }, "v1beta1.RollbackConfig": { "properties": { "revision": { "description": "The revision to rollback to. If set to 0, rollbck to the last revision.", "type": "integer", "format": "int64" } } }, "v1beta1.RollingUpdateDeployment": { "description": "Spec to control the desired behavior of rolling update.", "properties": { "maxSurge": { "description": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", "$ref": "#/definitions/intstr.IntOrString" }, "maxUnavailable": { "description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", "$ref": "#/definitions/intstr.IntOrString" } } }, "v1beta1.Scale": { "description": "represents a scaling request for a resource.", "properties": { "metadata": { "description": "Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", "$ref": "#/definitions/v1beta1.ScaleSpec" }, "status": { "description": "current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.", "$ref": "#/definitions/v1beta1.ScaleStatus" } } }, "v1beta1.ScaleSpec": { "description": "describes the attributes of a scale subresource", "properties": { "replicas": { "description": "desired number of instances for the scaled object.", "type": "integer", "format": "int32" } } }, "v1beta1.ScaleStatus": { "description": "represents the current status of a scale subresource.", "required": [ "replicas" ], "properties": { "replicas": { "description": "actual number of observed instances of the scaled object.", "type": "integer", "format": "int32" }, "selector": { "description": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", "type": "object", "additionalProperties": { "type": "string" } }, "targetSelector": { "description": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", "type": "string" } } }, "v1beta1.SelfSubjectAccessReview": { "description": "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action", "required": [ "spec" ], "properties": { "metadata": { "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec holds information about the request being evaluated. user and groups must be empty", "$ref": "#/definitions/v1beta1.SelfSubjectAccessReviewSpec" }, "status": { "description": "Status is filled in by the server and indicates whether the request is allowed or not", "$ref": "#/definitions/v1beta1.SubjectAccessReviewStatus" } } }, "v1beta1.SelfSubjectAccessReviewSpec": { "description": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", "properties": { "nonResourceAttributes": { "description": "NonResourceAttributes describes information for a non-resource access request", "$ref": "#/definitions/v1beta1.NonResourceAttributes" }, "resourceAttributes": { "description": "ResourceAuthorizationAttributes describes information for a resource access request", "$ref": "#/definitions/v1beta1.ResourceAttributes" } } }, "v1beta1.StorageClass": { "description": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", "required": [ "provisioner" ], "properties": { "metadata": { "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "parameters": { "description": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", "type": "object", "additionalProperties": { "type": "string" } }, "provisioner": { "description": "Provisioner indicates the type of the provisioner.", "type": "string" } } }, "v1beta1.StorageClassList": { "description": "StorageClassList is a collection of storage classes.", "required": [ "items" ], "properties": { "items": { "description": "Items is the list of StorageClasses", "type": "array", "items": { "$ref": "#/definitions/v1beta1.StorageClass" } }, "metadata": { "description": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1beta1.SubjectAccessReview": { "description": "SubjectAccessReview checks whether or not a user or group can perform an action.", "required": [ "spec" ], "properties": { "metadata": { "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec holds information about the request being evaluated", "$ref": "#/definitions/v1beta1.SubjectAccessReviewSpec" }, "status": { "description": "Status is filled in by the server and indicates whether the request is allowed or not", "$ref": "#/definitions/v1beta1.SubjectAccessReviewStatus" } } }, "v1beta1.SubjectAccessReviewSpec": { "description": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", "properties": { "extra": { "description": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.", "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } }, "group": { "description": "Groups is the groups you're testing for.", "type": "array", "items": { "type": "string" } }, "nonResourceAttributes": { "description": "NonResourceAttributes describes information for a non-resource access request", "$ref": "#/definitions/v1beta1.NonResourceAttributes" }, "resourceAttributes": { "description": "ResourceAuthorizationAttributes describes information for a resource access request", "$ref": "#/definitions/v1beta1.ResourceAttributes" }, "user": { "description": "User is the user you're testing for. If you specify \"User\" but not \"Group\", then is it interpreted as \"What if User were not a member of any groups", "type": "string" } } }, "v1beta1.SubjectAccessReviewStatus": { "description": "SubjectAccessReviewStatus", "required": [ "allowed" ], "properties": { "allowed": { "description": "Allowed is required. True if the action would be allowed, false otherwise.", "type": "boolean" }, "evaluationError": { "description": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", "type": "string" }, "reason": { "description": "Reason is optional. It indicates why a request was allowed or denied.", "type": "string" } } }, "v1beta1.SubresourceReference": { "description": "SubresourceReference contains enough information to let you inspect or modify the referred subresource.", "properties": { "apiVersion": { "description": "API version of the referent", "type": "string" }, "kind": { "description": "Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", "type": "string" }, "name": { "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", "type": "string" }, "subresource": { "description": "Subresource name of the referent", "type": "string" } } }, "v1beta1.ThirdPartyResource": { "description": "A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource types to the API. It consists of one or more Versions of the api.", "properties": { "description": { "description": "Description is the description of this object.", "type": "string" }, "metadata": { "description": "Standard object metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "versions": { "description": "Versions are versions for this third party object", "type": "array", "items": { "$ref": "#/definitions/v1beta1.APIVersion" } } } }, "v1beta1.ThirdPartyResourceList": { "description": "ThirdPartyResourceList is a list of ThirdPartyResources.", "required": [ "items" ], "properties": { "items": { "description": "Items is the list of ThirdPartyResources.", "type": "array", "items": { "$ref": "#/definitions/v1beta1.ThirdPartyResource" } }, "metadata": { "description": "Standard list metadata.", "$ref": "#/definitions/unversioned.ListMeta" } } }, "v1beta1.TokenReview": { "description": "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.", "required": [ "spec" ], "properties": { "metadata": { "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { "description": "Spec holds information about the request being evaluated", "$ref": "#/definitions/v1beta1.TokenReviewSpec" }, "status": { "description": "Status is filled in by the server and indicates whether the request can be authenticated.", "$ref": "#/definitions/v1beta1.TokenReviewStatus" } } }, "v1beta1.TokenReviewSpec": { "description": "TokenReviewSpec is a description of the token authentication request.", "properties": { "token": { "description": "Token is the opaque bearer token.", "type": "string" } } }, "v1beta1.TokenReviewStatus": { "description": "TokenReviewStatus is the result of the token authentication request.", "properties": { "authenticated": { "description": "Authenticated indicates that the token was associated with a known user.", "type": "boolean" }, "error": { "description": "Error indicates that the token couldn't be checked", "type": "string" }, "user": { "description": "User is the UserInfo associated with the provided token.", "$ref": "#/definitions/v1beta1.UserInfo" } } }, "v1beta1.UserInfo": { "description": "UserInfo holds the information about the user needed to implement the user.Info interface.", "properties": { "extra": { "description": "Any additional information provided by the authenticator.", "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } }, "groups": { "description": "The names of groups this user is a part of.", "type": "array", "items": { "type": "string" } }, "uid": { "description": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", "type": "string" }, "username": { "description": "The name that uniquely identifies this user among all active users.", "type": "string" } } }, "version.Info": { "description": "Info contains versioning information. how we'll want to distribute that information.", "required": [ "major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform" ], "properties": { "buildDate": { "type": "string" }, "compiler": { "type": "string" }, "gitCommit": { "type": "string" }, "gitTreeState": { "type": "string" }, "gitVersion": { "type": "string" }, "goVersion": { "type": "string" }, "major": { "type": "string" }, "minor": { "type": "string" }, "platform": { "type": "string" } } }, "versioned.Event": { "description": "Event represents a single event to a watched resource.", "required": [ "type", "object" ], "properties": { "object": { "description": "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.", "$ref": "#/definitions/runtime.RawExtension" }, "type": { "type": "string" } } } }, "securityDefinitions": { "BearerToken": { "description": "Bearer Token authentication", "type": "apiKey", "name": "authorization", "in": "header" } }, "security": [ { "BearerToken": [] } ] } validate-0.24.0/fixtures/go-swagger/canary/ms-cog-sci/000077500000000000000000000000001457312750000225235ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/canary/ms-cog-sci/swagger.json000066400000000000000000000472461457312750000250720ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "title": "Azure Machine Learning - Text Analytics", "version": "1.0", "description": "The Text Analytics API is a suite of text analytics web services built with Azure Machine Learning. \r\nThe API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. \r\nNo training data is needed to use this API; just bring your text data. \r\nThis API uses advanced natural language processing techniques to deliver best in class predictions.\r\n\r\nFurther documentation can be found in https://azure.microsoft.com/en-us/documentation/articles/machine-learning-apps-text-analytics/" }, "host": "westus.api.cognitive.microsoft.com", "basePath": "/text/analytics/v2.0", "schemes": [ "https" ], "paths": { "/keyPhrases": { "post": { "description": "The API returns a list of strings denoting the key talking points in the input text. \r\n We employ techniques from Microsoft Office's sophisticated Natural Language Processing toolkit. \r\n Currently, the following languages are supported: English, German, Spanish and Japanese.", "operationId": "Key Phrases", "parameters": [ { "name": "subscription-key", "in": "query", "description": "subscription key in url", "type": "string" }, { "name": "Ocp-Apim-Subscription-Key", "in": "header", "description": "subscription key in header", "type": "string" }, { "name": "multiLanguageBatchInputV2", "in": "body", "schema": { "$ref": "#/definitions/MultiLanguageBatchInputV2" } } ], "consumes": [ "application/json", "text/json" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/KeyPhraseBatchResultV2" } }, "400": { "description": "BadRequest", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "produces": [ "application/json", "text/json" ] } }, "/languages": { "post": { "description": "The API returns the detected language and a numeric score between 0 and 1. \r\n Scores close to 1 indicate 100% certainty that the identified language is true. \r\n A total of 120 languages are supported.", "operationId": "Detect Language", "parameters": [ { "name": "numberOfLanguagesToDetect", "in": "query", "description": "Format - int32. (Optional) Number of languages to detect. Set to 1 by default.", "type": "integer" }, { "name": "subscription-key", "in": "query", "description": "subscription key in url", "type": "string" }, { "name": "Ocp-Apim-Subscription-Key", "in": "header", "description": "subscription key in header", "type": "string" }, { "name": "batchInputV2", "in": "body", "schema": { "$ref": "#/definitions/BatchInputV2" } } ], "consumes": [ "application/json", "text/json" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/LanguageBatchResultV2" } }, "400": { "description": "BadRequest", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "produces": [ "application/json", "text/json" ] } }, "/operations/{operationId}": { "get": { "description": "Get the status of an operation submitted for processing. If the the operation has reached a 'Succeeded' state, will also return the result.", "operationId": "Operation Status", "parameters": [ { "name": "operationId", "in": "path", "description": "A unique id for the submitted operation.", "required": true, "type": "string" }, { "name": "subscription-key", "in": "query", "description": "subscription key in url", "type": "string" }, { "name": "Ocp-Apim-Subscription-Key", "in": "header", "description": "subscription key in header", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/OperationResult" } }, "400": { "description": "BadRequest", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "produces": [ "application/json", "text/json" ] } }, "/sentiment": { "post": { "description": "The API returns a numeric score between 0 and 1. \r\n Scores close to 1 indicate positive sentiment, while scores close to 0 indicate negative sentiment. \r\n Sentiment score is generated using classification techniques. \r\n The input features to the classifier include n-grams, features generated from part-of-speech tags, and word embeddings. \r\n Currently, the following languages are supported: English, Spanish, French, Portuguese.", "operationId": "Sentiment", "parameters": [ { "name": "subscription-key", "in": "query", "description": "subscription key in url", "type": "string" }, { "name": "Ocp-Apim-Subscription-Key", "in": "header", "description": "subscription key in header", "type": "string" }, { "name": "multiLanguageBatchInputV2", "in": "body", "schema": { "$ref": "#/definitions/MultiLanguageBatchInputV2" } } ], "consumes": [ "application/json", "text/json" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SentimentBatchResultV2" } }, "400": { "description": "BadRequest", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "produces": [ "application/json", "text/json" ] } }, "/topics": { "post": { "description": "The API returns the top detected topics for a list of submitted text documents. \r\n A topic is identified with a key phrase, which can be one or more related words. \r\n Use the URL parameters and stop word list to control which words or documents are filtered out. \r\n You can also supply a list of topics to exclude from the response. \r\n At least 100 text documents must be submitted, however it is designed to detect topics across hundreds to thousands of documents. \r\n Note that one transaction is charged per text document submitted. \r\n For best performance, limit each document to a short, human written text paragraph such as review, conversation or user feedback.", "operationId": "Detect Topics", "parameters": [ { "name": "minDocumentsPerWord", "in": "query", "description": "Format - int32. (optional) Words that occur in less than this many documents are ignored. \r\n Use this parameter to help exclude rare document topics.\r\n Omit to let the service choose appropriate value.", "type": "integer" }, { "name": "maxDocumentsPerWord", "in": "query", "description": "Format - int32. (optional) Words that occur in more than this many documents are ignored. \r\n Use this parameter to help exclude ubiquitous document topics.\r\n Omit to let the service choose appropriate value.", "type": "integer" }, { "name": "subscription-key", "in": "query", "description": "subscription key in url", "type": "string" }, { "name": "Ocp-Apim-Subscription-Key", "in": "header", "description": "subscription key in header", "type": "string" }, { "name": "topicDetectionInputV2", "in": "body", "schema": { "$ref": "#/definitions/TopicDetectionInputV2" } } ], "consumes": [ "application/json", "text/json" ], "responses": { "202": { "description": "Accepted", "headers": { "Operation-Location": { "type": "string", "description": "URL of the created operation. Invoke a GET HTTP request to retrieve the operation status." } } }, "400": { "description": "BadRequest", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "produces": [ "application/json", "text/json" ] } } }, "definitions": { "MultiLanguageBatchInputV2": { "type": "object", "properties": { "documents": { "type": "array", "items": { "$ref": "#/definitions/MultiLanguageInputV2" } } } }, "MultiLanguageInputV2": { "type": "object", "properties": { "language": { "description": "This is the 2 letter ISO 639-1 representation of a language.\r\n For example, use \"en\" for English; \"es\" for Spanish etc.,", "type": "string" }, "id": { "description": "Unique, non-empty document identifier.", "type": "string" }, "text": { "type": "string" } } }, "KeyPhraseBatchResultV2": { "type": "object", "properties": { "documents": { "type": "array", "items": { "$ref": "#/definitions/KeyPhraseBatchResultItemV2" } }, "errors": { "type": "array", "items": { "$ref": "#/definitions/ErrorRecordV2" } } } }, "KeyPhraseBatchResultItemV2": { "type": "object", "properties": { "keyPhrases": { "description": "A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document.", "type": "array", "items": { "type": "string" } }, "id": { "description": "Unique document identifier.", "type": "string" } } }, "ErrorRecordV2": { "type": "object", "properties": { "id": { "description": "Input document unique identifier the error refers to.", "type": "string" }, "message": { "description": "Error message.", "type": "string" } } }, "ErrorResponse": { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "target": { "type": "string" }, "innerError": { "$ref": "#/definitions/InternalError" } } }, "InternalError": { "type": "object", "properties": { "code": { "enum": [ "invalidParameterValue", "invalidRequestBodyFormat", "missingRequiredHeader", "invalidRequestContent", "missingRequiredParameter" ], "type": "string" }, "message": { "type": "string" }, "innerError": { "$ref": "#/definitions/InternalError" } } }, "BatchInputV2": { "type": "object", "properties": { "documents": { "type": "array", "items": { "$ref": "#/definitions/InputV2" } } } }, "InputV2": { "type": "object", "properties": { "id": { "description": "Unique, non-empty document identifier.", "type": "string" }, "text": { "type": "string" } } }, "Object": { "type": "object", "properties": {} }, "LanguageBatchResultV2": { "type": "object", "properties": { "documents": { "type": "array", "items": { "$ref": "#/definitions/LanguageBatchResultItemV2" } }, "errors": { "type": "array", "items": { "$ref": "#/definitions/ErrorRecordV2" } } } }, "LanguageBatchResultItemV2": { "type": "object", "properties": { "id": { "description": "Unique document identifier.", "type": "string" }, "detectedLanguages": { "description": "A list of extracted languages.", "type": "array", "items": { "$ref": "#/definitions/DetectedLanguageV2" } } } }, "DetectedLanguageV2": { "type": "object", "properties": { "name": { "description": "Long name of a detected language (e.g. English, French).", "type": "string" }, "iso6391Name": { "description": "A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr).", "type": "string" }, "score": { "format": "double", "description": "A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true.", "type": "number" } } }, "OperationResult": { "type": "object", "properties": { "status": { "description": "Operation status.", "enum": [ "notStarted", "running", "failed", "cancelled", "succeeded" ], "type": "string" }, "createdDateTime": { "format": "date-time", "description": "Operation creation date time (ISO 8601 literal).", "type": "string" }, "lastActionDateTime": { "format": "date-time", "description": "Operation last status change date time (ISO 8601 literal).", "type": "string" }, "operationType": { "description": "Name of API endpoint that created the operation.", "type": "string" }, "operationProcessingResult": { "$ref": "#/definitions/OperationProcessingResult", "description": "Operation result. Specific format varies according to the operation type. Exists only in case the operation has reached a 'Succeeded' state." }, "message": { "description": "Error message. Exists only in case the operation has reached a 'Failed' state.", "type": "string" } } }, "OperationProcessingResult": { "required": [ "discriminator" ], "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/ErrorRecordV2" } }, "discriminator": { "type": "string" } }, "discriminator": "discriminator" }, "SentimentBatchResultV2": { "type": "object", "properties": { "documents": { "type": "array", "items": { "$ref": "#/definitions/SentimentBatchResultItemV2" } }, "errors": { "type": "array", "items": { "$ref": "#/definitions/ErrorRecordV2" } } } }, "SentimentBatchResultItemV2": { "type": "object", "properties": { "score": { "format": "double", "description": "A decimal number between 0 and 1 denoting the sentiment of the document. \r\n A score above 0.7 usually refers to a positive document while a score below 0.3 normally has a negative connotation.\r\n Mid values refer to neutral text.", "type": "number" }, "id": { "description": "Unique document identifier.", "type": "string" } } }, "TopicDetectionInputV2": { "type": "object", "properties": { "stopWords": { "description": "List of words to ignore from all documents during pre-processing.", "type": "array", "items": { "type": "string" } }, "topicsToExclude": { "description": "List of topics to omit from the response.", "type": "array", "items": { "type": "string" } }, "documents": { "type": "array", "items": { "$ref": "#/definitions/InputV2" } } } }, "TopicDetectionResultV2": { "description": "This is object returned for the clustering call", "type": "object", "allOf": [ { "$ref": "#/definitions/OperationProcessingResult" }, { "type": "object", "properties": { "topics": { "type": "array", "items": { "$ref": "#/definitions/TopicInfoRecordV2" } }, "topicAssignments": { "type": "array", "items": { "$ref": "#/definitions/TopicAssignmentRecordV2" } }, "errors": { "type": "array", "items": { "$ref": "#/definitions/ErrorRecordV2" } } } } ], "properties": {} }, "TopicInfoRecordV2": { "type": "object", "properties": { "id": { "description": "A unique identifier for each topic.", "type": "string" }, "score": { "format": "double", "description": "Count of documents assigned to topic.", "type": "number" }, "keyPhrase": { "description": "A summarizing word or phrase for the topic.", "type": "string" } } }, "TopicAssignmentRecordV2": { "type": "object", "properties": { "documentId": { "description": "Identifier for the document. Equates to the ID included in the input.", "type": "string" }, "topicId": { "description": "The topic ID which the document has been assigned to.", "type": "string" }, "distance": { "format": "double", "description": "Document-to-topic affiliation score between 0 and 1. The lower a distance score the stronger the topic affiliation is.", "type": "number" } } } } } validate-0.24.0/fixtures/go-swagger/canary/petstore/000077500000000000000000000000001457312750000224275ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/canary/petstore/swagger.json000066400000000000000000000325541457312750000247720ustar00rootroot00000000000000{"swagger":"2.0","info":{"description":"This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.","version":"1.0.0","title":"Swagger Petstore","termsOfService":"http://swagger.io/terms/","contact":{"email":"apiteam@swagger.io"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"host":"petstore.swagger.io","basePath":"/v2","tags":[{"name":"pet","description":"Everything about your Pets","externalDocs":{"description":"Find out more","url":"http://swagger.io"}},{"name":"store","description":"Access to Petstore orders"},{"name":"user","description":"Operations about user","externalDocs":{"description":"Find out more about our store","url":"http://swagger.io"}}],"schemes":["http"],"paths":{"/pet":{"post":{"tags":["pet"],"summary":"Add a new pet to the store","description":"","operationId":"addPet","consumes":["application/json","application/xml"],"produces":["application/xml","application/json"],"parameters":[{"in":"body","name":"body","description":"Pet object that needs to be added to the store","required":true,"schema":{"$ref":"#/definitions/Pet"}}],"responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]},"put":{"tags":["pet"],"summary":"Update an existing pet","description":"","operationId":"updatePet","consumes":["application/json","application/xml"],"produces":["application/xml","application/json"],"parameters":[{"in":"body","name":"body","description":"Pet object that needs to be added to the store","required":true,"schema":{"$ref":"#/definitions/Pet"}}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"},"405":{"description":"Validation exception"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/pet/findByStatus":{"get":{"tags":["pet"],"summary":"Finds Pets by status","description":"Multiple status values can be provided with comma separated strings","operationId":"findPetsByStatus","produces":["application/xml","application/json"],"parameters":[{"name":"status","in":"query","description":"Status values that need to be considered for filter","required":true,"type":"array","items":{"type":"string","enum":["available","pending","sold"],"default":"available"},"collectionFormat":"multi"}],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/Pet"}}},"400":{"description":"Invalid status value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/pet/findByTags":{"get":{"tags":["pet"],"summary":"Finds Pets by tags","description":"Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.","operationId":"findPetsByTags","produces":["application/xml","application/json"],"parameters":[{"name":"tags","in":"query","description":"Tags to filter by","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi"}],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/Pet"}}},"400":{"description":"Invalid tag value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"deprecated":true}},"/pet/{petId}":{"get":{"tags":["pet"],"summary":"Find pet by ID","description":"Returns a single pet","operationId":"getPetById","produces":["application/xml","application/json"],"parameters":[{"name":"petId","in":"path","description":"ID of pet to return","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Pet"}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"}},"security":[{"api_key":[]}]},"post":{"tags":["pet"],"summary":"Updates a pet in the store with form data","description":"","operationId":"updatePetWithForm","consumes":["application/x-www-form-urlencoded"],"produces":["application/xml","application/json"],"parameters":[{"name":"petId","in":"path","description":"ID of pet that needs to be updated","required":true,"type":"integer","format":"int64"},{"name":"name","in":"formData","description":"Updated name of the pet","required":false,"type":"string"},{"name":"status","in":"formData","description":"Updated status of the pet","required":false,"type":"string"}],"responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]},"delete":{"tags":["pet"],"summary":"Deletes a pet","description":"","operationId":"deletePet","produces":["application/xml","application/json"],"parameters":[{"name":"api_key","in":"header","required":false,"type":"string"},{"name":"petId","in":"path","description":"Pet id to delete","required":true,"type":"integer","format":"int64"}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/pet/{petId}/uploadImage":{"post":{"tags":["pet"],"summary":"uploads an image","description":"","operationId":"uploadFile","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"petId","in":"path","description":"ID of pet to update","required":true,"type":"integer","format":"int64"},{"name":"additionalMetadata","in":"formData","description":"Additional data to pass to server","required":false,"type":"string"},{"name":"file","in":"formData","description":"file to upload","required":false,"type":"file"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiResponse"}}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/store/inventory":{"get":{"tags":["store"],"summary":"Returns pet inventories by status","description":"Returns a map of status codes to quantities","operationId":"getInventory","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}}}},"security":[{"api_key":[]}]}},"/store/order":{"post":{"tags":["store"],"summary":"Place an order for a pet","description":"","operationId":"placeOrder","produces":["application/xml","application/json"],"parameters":[{"in":"body","name":"body","description":"order placed for purchasing the pet","required":true,"schema":{"$ref":"#/definitions/Order"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Order"}},"400":{"description":"Invalid Order"}}}},"/store/order/{orderId}":{"get":{"tags":["store"],"summary":"Find purchase order by ID","description":"For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions","operationId":"getOrderById","produces":["application/xml","application/json"],"parameters":[{"name":"orderId","in":"path","description":"ID of pet that needs to be fetched","required":true,"type":"integer","maximum":10.0,"minimum":1.0,"format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Order"}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Order not found"}}},"delete":{"tags":["store"],"summary":"Delete purchase order by ID","description":"For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors","operationId":"deleteOrder","produces":["application/xml","application/json"],"parameters":[{"name":"orderId","in":"path","description":"ID of the order that needs to be deleted","required":true,"type":"integer","minimum":1.0,"format":"int64"}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Order not found"}}}},"/user":{"post":{"tags":["user"],"summary":"Create user","description":"This can only be done by the logged in user.","operationId":"createUser","produces":["application/xml","application/json"],"parameters":[{"in":"body","name":"body","description":"Created user object","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"default":{"description":"successful operation"}}}},"/user/createWithArray":{"post":{"tags":["user"],"summary":"Creates list of users with given input array","description":"","operationId":"createUsersWithArrayInput","produces":["application/xml","application/json"],"parameters":[{"in":"body","name":"body","description":"List of user object","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/User"}}}],"responses":{"default":{"description":"successful operation"}}}},"/user/createWithList":{"post":{"tags":["user"],"summary":"Creates list of users with given input array","description":"","operationId":"createUsersWithListInput","produces":["application/xml","application/json"],"parameters":[{"in":"body","name":"body","description":"List of user object","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/User"}}}],"responses":{"default":{"description":"successful operation"}}}},"/user/login":{"get":{"tags":["user"],"summary":"Logs user into the system","description":"","operationId":"loginUser","produces":["application/xml","application/json"],"parameters":[{"name":"username","in":"query","description":"The user name for login","required":true,"type":"string"},{"name":"password","in":"query","description":"The password for login in clear text","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{"X-Rate-Limit":{"type":"integer","format":"int32","description":"calls per hour allowed by the user"},"X-Expires-After":{"type":"string","format":"date-time","description":"date in UTC when token expires"}}},"400":{"description":"Invalid username/password supplied"}}}},"/user/logout":{"get":{"tags":["user"],"summary":"Logs out current logged in user session","description":"","operationId":"logoutUser","produces":["application/xml","application/json"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"/user/{username}":{"get":{"tags":["user"],"summary":"Get user by user name","description":"","operationId":"getUserByName","produces":["application/xml","application/json"],"parameters":[{"name":"username","in":"path","description":"The name that needs to be fetched. Use user1 for testing. ","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/User"}},"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}}},"put":{"tags":["user"],"summary":"Updated user","description":"This can only be done by the logged in user.","operationId":"updateUser","produces":["application/xml","application/json"],"parameters":[{"name":"username","in":"path","description":"name that need to be updated","required":true,"type":"string"},{"in":"body","name":"body","description":"Updated user object","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"400":{"description":"Invalid user supplied"},"404":{"description":"User not found"}}},"delete":{"tags":["user"],"summary":"Delete user","description":"This can only be done by the logged in user.","operationId":"deleteUser","produces":["application/xml","application/json"],"parameters":[{"name":"username","in":"path","description":"The name that needs to be deleted","required":true,"type":"string"}],"responses":{"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}}}}},"securityDefinitions":{"petstore_auth":{"type":"oauth2","authorizationUrl":"http://petstore.swagger.io/oauth/dialog","flow":"implicit","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}},"api_key":{"type":"apiKey","name":"api_key","in":"header"}},"definitions":{"Order":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"petId":{"type":"integer","format":"int64"},"quantity":{"type":"integer","format":"int32"},"shipDate":{"type":"string","format":"date-time"},"status":{"type":"string","description":"Order Status","enum":["placed","approved","delivered"]},"complete":{"type":"boolean","default":false}},"xml":{"name":"Order"}},"Category":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"Category"}},"User":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"},"phone":{"type":"string"},"userStatus":{"type":"integer","format":"int32","description":"User Status"}},"xml":{"name":"User"}},"Tag":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"Tag"}},"Pet":{"type":"object","required":["name","photoUrls"],"properties":{"id":{"type":"integer","format":"int64"},"category":{"$ref":"#/definitions/Category"},"name":{"type":"string","example":"doggie"},"photoUrls":{"type":"array","xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string"}},"tags":{"type":"array","xml":{"name":"tag","wrapped":true},"items":{"$ref":"#/definitions/Tag"}},"status":{"type":"string","description":"pet status in the store","enum":["available","pending","sold"]}},"xml":{"name":"Pet"}},"ApiResponse":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}}}},"externalDocs":{"description":"Find out more about Swagger","url":"http://swagger.io"}}validate-0.24.0/fixtures/go-swagger/canary/quay.io/000077500000000000000000000000001457312750000221475ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/canary/quay.io/swagger.json000066400000000000000000004675141457312750000245220ustar00rootroot00000000000000{ "info": { "termsOfService": "https://quay.io/tos", "version": "v1", "contact": { "email": "support@quay.io" }, "description": "This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. You can find out more at Quay.", "title": "Quay Frontend" }, "paths": { "/api/v1/organization/{orgname}/invoices": { "x-name": "endpoints.api.billing.OrganizationInvoiceList", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "x-tag": "billing", "x-path": "/api/v1/organization/{orgname}/invoices", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "tags": ["billing"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "listOrgInvoices", "description": "List the invoices for the specified orgnaization." } }, "/api/v1/plans/": { "x-name": "endpoints.api.billing.ListPlans", "x-tag": "billing", "x-path": "/api/v1/plans/", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "tags": ["billing"], "description": "List the avaialble plans.", "parameters": [], "operationId": "listPlans" } }, "/api/v1/repository/{repository}/build/": { "x-name": "endpoints.api.build.RepositoryBuildList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "Returns all builds since the given unix timecode", "required": false, "type": "integer", "name": "since", "in": "query" }, { "description": "The maximum number of builds to return", "required": false, "type": "integer", "name": "limit", "in": "query" }], "tags": ["build"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getRepoBuilds", "description": "Get the list of repository builds." }, "x-path": "/api/v1/repository/{repository}/build/", "x-tag": "build", "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/RepositoryBuildRequest" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["build"], "security": [{ "oauth2_implicit": ["repo:write"] }], "operationId": "requestRepoBuild", "description": "Request that a repository be built and pushed from the specified input." } }, "/api/v1/repository/{repository}/build/{build_uuid}/status": { "x-name": "endpoints.api.build.RepositoryBuildStatus", "parameters": [{ "description": "The UUID of the build", "required": true, "type": "string", "name": "build_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "build", "x-path": "/api/v1/repository/{repository}/build/{build_uuid}/status", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The UUID of the build", "required": true, "type": "string", "name": "build_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["build"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getRepoBuildStatus", "description": "Return the status for the builds specified by the build uuids." } }, "/api/v1/repository/{repository}/build/{build_uuid}": { "x-name": "endpoints.api.build.RepositoryBuildResource", "parameters": [{ "description": "The UUID of the build", "required": true, "type": "string", "name": "build_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The UUID of the build", "required": true, "type": "string", "name": "build_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["build"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getRepoBuild", "description": "Returns information about a build." }, "x-path": "/api/v1/repository/{repository}/build/{build_uuid}", "x-tag": "build", "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The UUID of the build", "required": true, "type": "string", "name": "build_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["build"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "cancelRepoBuild", "description": "Cancels a repository build if it has not yet been picked up by a build worker." } }, "/api/v1/repository/{repository}/build/{build_uuid}/logs": { "x-name": "endpoints.api.build.RepositoryBuildLogs", "parameters": [{ "description": "The UUID of the build", "required": true, "type": "string", "name": "build_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "build", "x-path": "/api/v1/repository/{repository}/build/{build_uuid}/logs", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The UUID of the build", "required": true, "type": "string", "name": "build_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["build"], "security": [{ "oauth2_implicit": ["repo:write"] }], "operationId": "getRepoBuildLogs", "description": "Return the build logs for the build specified by the build uuid." } }, "/api/v1/discovery": { "x-name": "endpoints.api.discovery.DiscoveryResource", "x-tag": "discovery", "x-path": "/api/v1/discovery", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "tags": ["discovery"], "description": "List all of the API endpoints available in the swagger API format.", "parameters": [{ "description": "Whether to include internal APIs.", "required": false, "type": "boolean", "name": "internal", "in": "query" }], "operationId": "discovery" } }, "/api/v1/repository/{repository}/image/{image_id}": { "x-name": "endpoints.api.image.RepositoryImage", "parameters": [{ "description": "The Docker image ID", "required": true, "type": "string", "name": "image_id", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "image", "x-path": "/api/v1/repository/{repository}/image/{image_id}", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The Docker image ID", "required": true, "type": "string", "name": "image_id", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["image"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getImage", "description": "Get the information available for the specified image." } }, "/api/v1/repository/{repository}/image/{image_id}/changes": { "x-name": "endpoints.api.image.RepositoryImageChanges", "parameters": [{ "description": "The Docker image ID", "required": true, "type": "string", "name": "image_id", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "image", "x-path": "/api/v1/repository/{repository}/image/{image_id}/changes", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The Docker image ID", "required": true, "type": "string", "name": "image_id", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["image"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getImageChanges", "description": "Get the list of changes for the specified image." } }, "/api/v1/repository/{repository}/image/": { "x-name": "endpoints.api.image.RepositoryImageList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "image", "x-path": "/api/v1/repository/{repository}/image/", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["image"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "listRepositoryImages", "description": "List the images for the specified repository." } }, "/api/v1/organization/{orgname}/aggregatelogs": { "x-name": "endpoints.api.logs.OrgAggregateLogs", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "x-tag": "logs", "x-path": "/api/v1/organization/{orgname}/aggregatelogs", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "Username for which to filter logs.", "required": false, "type": "string", "name": "performer", "in": "query" }, { "description": "Latest time to which to get logs. (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "endtime", "in": "query" }, { "description": "Earliest time from which to get logs. (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "starttime", "in": "query" }], "tags": ["logs"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getAggregateOrgLogs", "description": "Gets the aggregated logs for the specified organization." } }, "/api/v1/organization/{orgname}/logs": { "x-name": "endpoints.api.logs.OrgLogs", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "x-tag": "logs", "x-path": "/api/v1/organization/{orgname}/logs", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The page number for the logs", "required": false, "type": "integer", "name": "page", "in": "query" }, { "description": "Username for which to filter logs.", "required": false, "type": "string", "name": "performer", "in": "query" }, { "description": "Latest time to which to get logs. (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "endtime", "in": "query" }, { "description": "Earliest time from which to get logs. (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "starttime", "in": "query" }], "tags": ["logs"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "listOrgLogs", "description": "List the logs for the specified organization." } }, "/api/v1/repository/{repository}/logs": { "x-name": "endpoints.api.logs.RepositoryLogs", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "logs", "x-path": "/api/v1/repository/{repository}/logs", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The page number for the logs", "required": false, "type": "integer", "name": "page", "in": "query" }, { "description": "Latest time to which to get logs (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "endtime", "in": "query" }, { "description": "Earliest time from which to get logs (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "starttime", "in": "query" }], "tags": ["logs"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "listRepoLogs", "description": "List the logs for the specified repository." } }, "/api/v1/repository/{repository}/aggregatelogs": { "x-name": "endpoints.api.logs.RepositoryAggregateLogs", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "logs", "x-path": "/api/v1/repository/{repository}/aggregatelogs", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "Latest time to which to get logs (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "endtime", "in": "query" }, { "description": "Earliest time from which to get logs (%m/%d/%Y %Z)", "required": false, "type": "string", "name": "starttime", "in": "query" }], "tags": ["logs"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "getAggregateRepoLogs", "description": "Returns the aggregated logs for the specified repository." } }, "/api/v1/organization/{orgname}/members/{membername}": { "x-name": "endpoints.api.organization.OrganizationMember", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The username of the organization member", "required": true, "type": "string", "name": "membername", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The username of the organization member", "required": true, "type": "string", "name": "membername", "in": "path" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrganizationMember", "description": "Retrieves the details of a member of the organization." }, "x-path": "/api/v1/organization/{orgname}/members/{membername}", "x-tag": "organization", "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The username of the organization member", "required": true, "type": "string", "name": "membername", "in": "path" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "removeOrganizationMember", "description": "Removes a member from an organization, revoking all its repository\n priviledges and removing it from all teams in the organization." } }, "/api/v1/organization/{orgname}": { "x-name": "endpoints.api.organization.Organization", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrganization", "description": "Get the details for the specified organization" }, "x-path": "/api/v1/organization/{orgname}", "x-tag": "organization", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "schema": { "$ref": "#/definitions/UpdateOrg" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "changeOrganizationDetails", "description": "Change the details for the specified organization." } }, "/api/v1/organization/{orgname}/applications/{client_id}": { "x-name": "endpoints.api.organization.OrganizationApplicationResource", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The OAuth client ID", "required": true, "type": "string", "name": "client_id", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The OAuth client ID", "required": true, "type": "string", "name": "client_id", "in": "path" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrganizationApplication", "description": "Retrieves the application with the specified client_id under the specified organization" }, "x-path": "/api/v1/organization/{orgname}/applications/{client_id}", "x-tag": "organization", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The OAuth client ID", "required": true, "type": "string", "name": "client_id", "in": "path" }, { "schema": { "$ref": "#/definitions/UpdateApp" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "updateOrganizationApplication", "description": "Updates an application under this organization." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The OAuth client ID", "required": true, "type": "string", "name": "client_id", "in": "path" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "deleteOrganizationApplication", "description": "Deletes the application under this organization." } }, "/api/v1/organization/{orgname}/applications": { "x-name": "endpoints.api.organization.OrganizationApplications", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrganizationApplications", "description": "List the applications for the specified organization" }, "x-path": "/api/v1/organization/{orgname}/applications", "x-tag": "organization", "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "schema": { "$ref": "#/definitions/NewApp" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "createOrganizationApplication", "description": "Creates a new application under this organization." } }, "/api/v1/organization/{orgname}/members": { "x-name": "endpoints.api.organization.OrganizationMemberList", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "x-tag": "organization", "x-path": "/api/v1/organization/{orgname}/members", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "tags": ["organization"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrganizationMembers", "description": "List the human members of the specified organization." } }, "/api/v1/app/{client_id}": { "x-name": "endpoints.api.organization.ApplicationInformation", "parameters": [{ "description": "The OAuth client ID", "required": true, "type": "string", "name": "client_id", "in": "path" }], "x-tag": "organization", "x-path": "/api/v1/app/{client_id}", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "tags": ["organization"], "description": "Get information on the specified application.", "parameters": [{ "description": "The OAuth client ID", "required": true, "type": "string", "name": "client_id", "in": "path" }], "operationId": "getApplicationInformation" } }, "/api/v1/repository/{repository}/permissions/team/{teamname}": { "x-name": "endpoints.api.permission.RepositoryTeamPermission", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The name of the team to which the permission applies", "required": true, "type": "string", "name": "teamname", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the team to which the permission applies", "required": true, "type": "string", "name": "teamname", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "getTeamPermissions", "description": "Fetch the permission for the specified team." }, "x-path": "/api/v1/repository/{repository}/permissions/team/{teamname}", "x-tag": "permission", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the team to which the permission applies", "required": true, "type": "string", "name": "teamname", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/TeamPermission" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "changeTeamPermissions", "description": "Update the existing team permission." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the team to which the permission applies", "required": true, "type": "string", "name": "teamname", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "deleteTeamPermissions", "description": "Delete the permission for the specified team." } }, "/api/v1/repository/{repository}/permissions/user/": { "x-name": "endpoints.api.permission.RepositoryUserPermissionList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "permission", "x-path": "/api/v1/repository/{repository}/permissions/user/", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "listRepoUserPermissions", "description": "List all user permissions." } }, "/api/v1/repository/{repository}/permissions/team/": { "x-name": "endpoints.api.permission.RepositoryTeamPermissionList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "permission", "x-path": "/api/v1/repository/{repository}/permissions/team/", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "listRepoTeamPermissions", "description": "List all team permission." } }, "/api/v1/repository/{repository}/permissions/user/{username}": { "x-name": "endpoints.api.permission.RepositoryUserPermission", "parameters": [{ "description": "The username of the user to which the permission applies", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The username of the user to which the permission applies", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "getUserPermissions", "description": "Get the Fetch the permission for the specified user." }, "x-path": "/api/v1/repository/{repository}/permissions/user/{username}", "x-tag": "permission", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The username of the user to which the permission applies", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/UserPermission" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "changeUserPermissions", "description": "Update the perimssions for an existing repository." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The username of the user to which the permission applies", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "deleteUserPermissions", "description": "Delete the permission for the user." } }, "/api/v1/repository/{repository}/permissions/user/{username}/transitive": { "x-name": "endpoints.api.permission.RepositoryUserTransitivePermission", "parameters": [{ "description": "The username of the user to which the permissions apply", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "permission", "x-path": "/api/v1/repository/{repository}/permissions/user/{username}/transitive", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The username of the user to which the permissions apply", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["permission"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "getUserTransitivePermission", "description": "Get the fetch the permission for the specified user." } }, "/api/v1/organization/{orgname}/prototypes": { "x-name": "endpoints.api.prototype.PermissionPrototypeList", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "tags": ["prototype"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrganizationPrototypePermissions", "description": "List the existing prototypes for this organization." }, "x-path": "/api/v1/organization/{orgname}/prototypes", "x-tag": "prototype", "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "schema": { "$ref": "#/definitions/NewPrototype" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["prototype"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "createOrganizationPrototypePermission", "description": "Create a new permission prototype." } }, "/api/v1/organization/{orgname}/prototypes/{prototypeid}": { "x-name": "endpoints.api.prototype.PermissionPrototype", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The ID of the prototype", "required": true, "type": "string", "name": "prototypeid", "in": "path" }], "x-path": "/api/v1/organization/{orgname}/prototypes/{prototypeid}", "x-tag": "prototype", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The ID of the prototype", "required": true, "type": "string", "name": "prototypeid", "in": "path" }, { "schema": { "$ref": "#/definitions/PrototypeUpdate" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["prototype"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "updateOrganizationPrototypePermission", "description": "Update the role of an existing permission prototype." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The ID of the prototype", "required": true, "type": "string", "name": "prototypeid", "in": "path" }], "tags": ["prototype"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "deleteOrganizationPrototypePermission", "description": "Delete an existing permission prototype." } }, "/api/v1/repository": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "schema": { "$ref": "#/definitions/NewRepo" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["repository"], "security": [{ "oauth2_implicit": ["repo:create"] }], "operationId": "createRepo", "description": "Create a new repository." }, "x-name": "endpoints.api.repository.RepositoryList", "x-tag": "repository", "x-path": "/api/v1/repository", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "Whether to include the repository's popularity metric.", "required": false, "type": "boolean", "name": "popularity", "in": "query" }, { "description": "Whether to include when the repository was last modified.", "required": false, "type": "boolean", "name": "last_modified", "in": "query" }, { "description": "Adds any repositories visible to the user by virtue of being public", "required": false, "type": "boolean", "name": "public", "in": "query" }, { "description": "Filters the repositories returned to those starred by the user", "required": false, "type": "boolean", "name": "starred", "in": "query" }, { "description": "Filters the repositories returned to this namespace", "required": false, "type": "string", "name": "namespace", "in": "query" }, { "description": "Limit on the number of results (int)", "required": false, "type": "integer", "name": "limit", "in": "query" }, { "description": "Offset page number. (int)", "required": false, "type": "integer", "name": "page", "in": "query" }], "tags": ["repository"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "listRepos", "description": "Fetch the list of repositories visible to the current user under a variety of situations." } }, "/api/v1/repository/{repository}/changevisibility": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/ChangeVisibility" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["repository"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "changeRepoVisibility", "description": "Change the visibility of a repository." }, "x-name": "endpoints.api.repository.RepositoryVisibility", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "repository", "x-path": "/api/v1/repository/{repository}/changevisibility" }, "/api/v1/repository/{repository}": { "x-name": "endpoints.api.repository.Repository", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repository"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getRepo", "description": "Fetch the specified repository." }, "x-path": "/api/v1/repository/{repository}", "x-tag": "repository", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/RepoUpdate" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["repository"], "security": [{ "oauth2_implicit": ["repo:write"] }], "operationId": "updateRepo", "description": "Update the description in the specified repository." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repository"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "deleteRepository", "description": "Delete a repository." } }, "/api/v1/repository/{repository}/notification/": { "x-name": "endpoints.api.repositorynotification.RepositoryNotificationList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repositorynotification"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "listRepoNotifications", "description": "List the notifications for the specified repository." }, "x-path": "/api/v1/repository/{repository}/notification/", "x-tag": "repositorynotification", "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/NotificationCreateRequest" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["repositorynotification"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "createRepoNotification", "description": "Create a new notification for the specified repository." } }, "/api/v1/repository/{repository}/notification/{uuid}/test": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The UUID of the notification", "required": true, "type": "string", "name": "uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repositorynotification"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "testRepoNotification", "description": "Queues a test notification for this repository." }, "x-name": "endpoints.api.repositorynotification.TestRepositoryNotification", "parameters": [{ "description": "The UUID of the notification", "required": true, "type": "string", "name": "uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "repositorynotification", "x-path": "/api/v1/repository/{repository}/notification/{uuid}/test" }, "/api/v1/repository/{repository}/notification/{uuid}": { "x-name": "endpoints.api.repositorynotification.RepositoryNotification", "parameters": [{ "description": "The UUID of the notification", "required": true, "type": "string", "name": "uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The UUID of the notification", "required": true, "type": "string", "name": "uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repositorynotification"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "getRepoNotification", "description": "Get information for the specified notification." }, "x-path": "/api/v1/repository/{repository}/notification/{uuid}", "x-tag": "repositorynotification", "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The UUID of the notification", "required": true, "type": "string", "name": "uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repositorynotification"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "deleteRepoNotification", "description": "Deletes the specified notification." } }, "/api/v1/repository/{repository}/tokens/": { "x-name": "endpoints.api.repotoken.RepositoryTokenList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repotoken"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "listRepoTokens", "description": "List the tokens for the specified repository." }, "x-path": "/api/v1/repository/{repository}/tokens/", "x-tag": "repotoken", "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/NewToken" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["repotoken"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "createToken", "description": "Create a new repository token." } }, "/api/v1/repository/{repository}/tokens/{code}": { "x-name": "endpoints.api.repotoken.RepositoryToken", "parameters": [{ "description": "The token code", "required": true, "type": "string", "name": "code", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The token code", "required": true, "type": "string", "name": "code", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repotoken"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "getTokens", "description": "Fetch the specified repository token information." }, "x-path": "/api/v1/repository/{repository}/tokens/{code}", "x-tag": "repotoken", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The token code", "required": true, "type": "string", "name": "code", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/TokenPermission" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["repotoken"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "changeToken", "description": "Update the permissions for the specified repository token." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The token code", "required": true, "type": "string", "name": "code", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["repotoken"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "deleteToken", "description": "Delete the repository token." } }, "/api/v1/user/robots/{robot_shortname}": { "x-name": "endpoints.api.robot.UserRobot", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "tags": ["robot"], "description": "Returns the user's robot with the specified name.", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "operationId": "getUserRobot" }, "x-path": "/api/v1/user/robots/{robot_shortname}", "x-tag": "robot", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "tags": ["robot"], "description": "Create a new user robot with the specified name.", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "operationId": "createUserRobot" }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "tags": ["robot"], "description": "Delete an existing robot.", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "operationId": "deleteUserRobot" } }, "/api/v1/user/robots": { "x-name": "endpoints.api.robot.UserRobotList", "x-tag": "robot", "x-path": "/api/v1/user/robots", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "tags": ["robot"], "description": "List the available robots for the user.", "parameters": [{ "description": "Whether to include repostories and teams in which the robots have permission.", "required": false, "type": "boolean", "name": "permissions", "in": "query" }], "operationId": "getUserRobots" } }, "/api/v1/organization/{orgname}/robots/{robot_shortname}/permissions": { "x-name": "endpoints.api.robot.OrgRobotPermissions", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "x-tag": "robot", "x-path": "/api/v1/organization/{orgname}/robots/{robot_shortname}/permissions", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "tags": ["robot"], "description": "Returns the list of repository permissions for the org's robot.", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "operationId": "getOrgRobotPermissions" } }, "/api/v1/organization/{orgname}/robots/{robot_shortname}/regenerate": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "tags": ["robot"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "regenerateOrgRobotToken", "description": "Regenerates the token for an organization robot." }, "x-name": "endpoints.api.robot.RegenerateOrgRobot", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "x-tag": "robot", "x-path": "/api/v1/organization/{orgname}/robots/{robot_shortname}/regenerate" }, "/api/v1/organization/{orgname}/robots": { "x-name": "endpoints.api.robot.OrgRobotList", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }], "x-tag": "robot", "x-path": "/api/v1/organization/{orgname}/robots", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "Whether to include repostories and teams in which the robots have permission.", "required": false, "type": "boolean", "name": "permissions", "in": "query" }], "tags": ["robot"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrgRobots", "description": "List the organization's robots." } }, "/api/v1/user/robots/{robot_shortname}/permissions": { "x-name": "endpoints.api.robot.UserRobotPermissions", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "x-tag": "robot", "x-path": "/api/v1/user/robots/{robot_shortname}/permissions", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "tags": ["robot"], "description": "Returns the list of repository permissions for the user's robot.", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "operationId": "getUserRobotPermissions" } }, "/api/v1/user/robots/{robot_shortname}/regenerate": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "tags": ["robot"], "description": "Regenerates the token for a user's robot.", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "operationId": "regenerateUserRobotToken" }, "x-name": "endpoints.api.robot.RegenerateUserRobot", "parameters": [{ "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "x-tag": "robot", "x-path": "/api/v1/user/robots/{robot_shortname}/regenerate" }, "/api/v1/organization/{orgname}/robots/{robot_shortname}": { "x-name": "endpoints.api.robot.OrgRobot", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "tags": ["robot"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrgRobot", "description": "Returns the organization's robot with the specified name." }, "x-path": "/api/v1/organization/{orgname}/robots/{robot_shortname}", "x-tag": "robot", "put": { "responses": { "201": { "description": "Succesfully created", "schema": { "$ref": "#/definitions/Robot" } }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "$ref": "#/parameters/OrgName" }, { "$ref": "#/parameters/RobotShortName" }], "tags": ["robot"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "createOrgRobot", "description": "Create a new robot in the organization." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path" }], "tags": ["robot"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "deleteOrgRobot", "description": "Delete an existing organization robot." } }, "/api/v1/find/all": { "x-name": "endpoints.api.search.ConductSearch", "x-tag": "search", "x-path": "/api/v1/find/all", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The search query.", "required": false, "type": "string", "name": "query", "in": "query" }], "tags": ["search"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "conductSearch", "description": "Get a list of entities and resources that match the specified query." } }, "/api/v1/entities/{prefix}": { "x-name": "endpoints.api.search.EntitySearch", "x-tag": "search", "x-path": "/api/v1/entities/{prefix}", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "tags": ["search"], "description": "Get a list of entities that match the specified prefix.", "parameters": [{ "description": "", "required": true, "type": "string", "name": "prefix", "in": "path" }, { "description": "Whether to include orgs names.", "required": false, "type": "boolean", "name": "includeOrgs", "in": "query" }, { "description": "Whether to include team names.", "required": false, "type": "boolean", "name": "includeTeams", "in": "query" }, { "description": "Namespace to use when querying for org entities.", "required": false, "type": "string", "name": "namespace", "in": "query" }], "operationId": "getMatchingEntities" } }, "/api/v1/repository/{repository}/image/{imageid}/packages": { "x-name": "endpoints.api.secscan.RepositoryImagePackages", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The image ID", "required": true, "type": "string", "name": "imageid", "in": "path" }], "x-tag": "secscan", "x-path": "/api/v1/repository/{repository}/image/{imageid}/packages", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The image ID", "required": true, "type": "string", "name": "imageid", "in": "path" }], "tags": ["secscan"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getRepoImagePackages", "description": "Fetches the packages added/removed in the given repo image." } }, "/api/v1/repository/{repository}/tag/{tag}/vulnerabilities": { "x-name": "endpoints.api.secscan.RepositoryTagVulnerabilities", "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "secscan", "x-path": "/api/v1/repository/{repository}/tag/{tag}/vulnerabilities", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "Minimum vulnerability priority", "required": false, "type": "string", "name": "minimumPriority", "in": "query" }], "tags": ["secscan"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "getRepoTagVulnerabilities", "description": "Fetches the vulnerabilities (if any) for a repository tag." } }, "/api/v1/repository/{repository}/tag/{tag}/revert": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/RevertTag" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["tag"], "security": [{ "oauth2_implicit": ["repo:write"] }], "operationId": "revertTag", "description": "Reverts a repository tag back to a previous image in the repository." }, "x-name": "endpoints.api.tag.RevertTag", "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "tag", "x-path": "/api/v1/repository/{repository}/tag/{tag}/revert" }, "/api/v1/repository/{repository}/tag/{tag}/images": { "x-name": "endpoints.api.tag.RepositoryTagImages", "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "tag", "x-path": "/api/v1/repository/{repository}/tag/{tag}/images", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "If specified, only images wholely owned by this tag are returned.", "required": false, "type": "boolean", "name": "owned", "in": "query" }], "tags": ["tag"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "listTagImages", "description": "List the images for the specified repository tag." } }, "/api/v1/repository/{repository}/tag/{tag}": { "x-name": "endpoints.api.tag.RepositoryTag", "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-path": "/api/v1/repository/{repository}/tag/{tag}", "x-tag": "tag", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/MoveTag" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["tag"], "security": [{ "oauth2_implicit": ["repo:write"] }], "operationId": "changeTagImage", "description": "Change which image a tag points to or create a new tag." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the tag", "required": true, "type": "string", "name": "tag", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["tag"], "security": [{ "oauth2_implicit": ["repo:write"] }], "operationId": "deleteFullTag", "description": "Delete the specified repository tag." } }, "/api/v1/repository/{repository}/tag/": { "x-name": "endpoints.api.tag.ListRepositoryTags", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "tag", "x-path": "/api/v1/repository/{repository}/tag/", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "Page index for the results. Default 1.", "required": false, "type": "integer", "name": "page", "in": "query" }, { "description": "Limit to the number of results to return per page. Max 100.", "required": false, "type": "integer", "name": "limit", "in": "query" }, { "description": "Filters the tags to the specific tag.", "required": false, "type": "string", "name": "specificTag", "in": "query" }], "tags": ["tag"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "listRepoTags", "description": "" } }, "/api/v1/organization/{orgname}/team/{teamname}/members": { "x-name": "endpoints.api.team.TeamMemberList", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }], "x-tag": "team", "x-path": "/api/v1/organization/{orgname}/team/{teamname}/members", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }, { "description": "Whether to include pending members", "required": false, "type": "boolean", "name": "includePending", "in": "query" }], "tags": ["team"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "getOrganizationTeamMembers", "description": "Retrieve the list of members for the specified team." } }, "/api/v1/organization/{orgname}/team/{teamname}/invite/{email}": { "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "", "required": true, "type": "string", "name": "email", "in": "path" }, { "description": "", "required": true, "type": "string", "name": "teamname", "in": "path" }], "tags": ["team"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "inviteTeamMemberEmail", "description": "Invites an email address to an existing team." }, "x-name": "endpoints.api.team.InviteTeamMember", "x-tag": "team", "x-path": "/api/v1/organization/{orgname}/team/{teamname}/invite/{email}", "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "", "required": true, "type": "string", "name": "email", "in": "path" }, { "description": "", "required": true, "type": "string", "name": "teamname", "in": "path" }], "tags": ["team"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "deleteTeamMemberEmailInvite", "description": "Delete an invite of an email address to join a team." } }, "/api/v1/organization/{orgname}/team/{teamname}": { "x-name": "endpoints.api.team.OrganizationTeam", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }], "x-path": "/api/v1/organization/{orgname}/team/{teamname}", "x-tag": "team", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }, { "schema": { "$ref": "#/definitions/TeamDescription" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["team"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "updateOrganizationTeam", "description": "Update the org-wide permission for the specified team." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }], "tags": ["team"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "deleteOrganizationTeam", "description": "Delete the specified team." } }, "/api/v1/organization/{orgname}/team/{teamname}/members/{membername}": { "x-name": "endpoints.api.team.TeamMember", "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The username of the team member", "required": true, "type": "string", "name": "membername", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }], "x-path": "/api/v1/organization/{orgname}/team/{teamname}/members/{membername}", "x-tag": "team", "put": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The username of the team member", "required": true, "type": "string", "name": "membername", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }], "tags": ["team"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "updateOrganizationTeamMember", "description": "Adds or invites a member to an existing team." }, "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path" }, { "description": "The username of the team member", "required": true, "type": "string", "name": "membername", "in": "path" }, { "description": "The name of the team", "required": true, "type": "string", "name": "teamname", "in": "path" }], "tags": ["team"], "security": [{ "oauth2_implicit": ["org:admin"] }], "operationId": "deleteOrganizationTeamMember", "description": "Delete a member of a team. If the user is merely invited to join\n the team, then the invite is removed instead." } }, "/api/v1/repository/{repository}/trigger/": { "x-name": "endpoints.api.trigger.BuildTriggerList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "trigger", "x-path": "/api/v1/repository/{repository}/trigger/", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["trigger"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "listBuildTriggers", "description": "List the triggers for the specified repository." } }, "/api/v1/repository/{repository}/trigger/{trigger_uuid}/activate": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/BuildTriggerActivateRequest" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["trigger"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "activateBuildTrigger", "description": "Activate the specified build trigger." }, "x-name": "endpoints.api.trigger.BuildTriggerActivate", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }], "x-tag": "trigger", "x-path": "/api/v1/repository/{repository}/trigger/{trigger_uuid}/activate" }, "/api/v1/repository/{repository}/trigger/{trigger_uuid}/start": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "schema": { "$ref": "#/definitions/RunParameters" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["trigger"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "manuallyStartBuildTrigger", "description": "Manually start a build from the specified trigger." }, "x-name": "endpoints.api.trigger.ActivateBuildTrigger", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }], "x-tag": "trigger", "x-path": "/api/v1/repository/{repository}/trigger/{trigger_uuid}/start" }, "/api/v1/repository/{repository}/trigger/{trigger_uuid}/builds": { "x-name": "endpoints.api.trigger.TriggerBuildList", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }], "x-tag": "trigger", "x-path": "/api/v1/repository/{repository}/trigger/{trigger_uuid}/builds", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The maximum number of builds to return", "required": false, "type": "integer", "name": "limit", "in": "query" }], "tags": ["trigger"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "listTriggerRecentBuilds", "description": "List the builds started by the specified trigger." } }, "/api/v1/repository/{repository}/trigger/{trigger_uuid}": { "x-name": "endpoints.api.trigger.BuildTrigger", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }, { "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }], "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["trigger"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "getBuildTrigger", "description": "Get information for the specified build trigger." }, "x-path": "/api/v1/repository/{repository}/trigger/{trigger_uuid}", "x-tag": "trigger", "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "description": "The UUID of the build trigger", "required": true, "type": "string", "name": "trigger_uuid", "in": "path" }, { "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "tags": ["trigger"], "security": [{ "oauth2_implicit": ["repo:admin"] }], "operationId": "deleteBuildTrigger", "description": "Delete the specified build trigger." } }, "/api/v1/user/": { "x-name": "endpoints.api.user.User", "x-tag": "user", "x-path": "/api/v1/user/", "get": { "responses": { "200": { "description": "Successful invocation", "schema": { "$ref": "#/definitions/UserView" } }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [], "tags": ["user"], "security": [{ "oauth2_implicit": ["user:read"] }], "operationId": "getLoggedInUser", "description": "Get user information for the authenticated user." } }, "/api/v1/users/{username}": { "x-name": "endpoints.api.user.Users", "x-tag": "user", "x-path": "/api/v1/users/{username}", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "tags": ["user"], "description": "Get user information for the specified user.", "parameters": [{ "description": "", "required": true, "type": "string", "name": "username", "in": "path" }], "operationId": "getUserInformation" } }, "/api/v1/user/starred": { "post": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "parameters": [{ "schema": { "$ref": "#/definitions/NewStarredRepository" }, "description": "Request body contents.", "required": true, "name": "body", "in": "body" }], "tags": ["user"], "security": [{ "oauth2_implicit": ["repo:read"] }], "operationId": "createStar", "description": "Star a repository." }, "x-name": "endpoints.api.user.StarredRepositoryList", "x-tag": "user", "x-path": "/api/v1/user/starred", "get": { "responses": { "200": { "description": "Successful invocation" }, "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "tags": ["user"], "description": "List all starred repositories.", "parameters": [{ "description": "Limit on the number of results (int)", "required": false, "type": "integer", "name": "limit", "in": "query" }, { "description": "Offset page number. (int)", "required": false, "type": "integer", "name": "page", "in": "query" }], "operationId": "listStarredRepos" } }, "/api/v1/user/starred/{repository}": { "x-name": "endpoints.api.user.StarredRepository", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "x-tag": "user", "x-path": "/api/v1/user/starred/{repository}", "delete": { "responses": { "404": { "description": "Not found" }, "403": { "description": "Unauthorized access" }, "204": { "description": "Deleted" }, "401": { "description": "Session required" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/GeneralError" } } }, "tags": ["user"], "description": "Removes a star from a repository.", "parameters": [{ "description": "The full path of the repository. e.g. namespace/name", "required": true, "type": "string", "name": "repository", "in": "path" }], "operationId": "deleteStar" } } }, "host": "quay.io", "schemes": ["https"], "tags": [{ "name": "billing", "description": "Billing information, subscriptions, and plan information." }, { "name": "build", "description": "Create, list, cancel and get status/logs of repository builds." }, { "name": "discovery", "description": "API discovery information." }, { "name": "image", "description": "List and lookup repository images, and download image diffs." }, { "name": "logs", "description": "Access usage logs for organizations or repositories." }, { "name": "organization", "description": "Manage organizations, members and OAuth applications." }, { "name": "permission", "description": "Manage repository permissions." }, { "name": "prototype", "description": "Manage default permissions added to repositories." }, { "name": "repository", "description": "List, create and manage repositories." }, { "name": "repositorynotification", "description": "List, create and manage repository events/notifications." }, { "name": "repotoken", "description": "Manage repository access tokens (DEPRECATED)." }, { "name": "robot", "description": "Manage user and organization robot accounts." }, { "name": "search", "description": "Conduct searches against all registry context." }, { "name": "secscan", "description": "List and manage repository vulnerabilities and other sec information." }, { "name": "tag", "description": "Manage the tags of a repository." }, { "name": "team", "description": "Create, list and manage an organization's teams." }, { "name": "trigger", "description": "Create, list and manage build triggers." }, { "name": "user", "description": "Manage the current user." }], "definitions": { "Robot": { "type": "object", "description": "A robot account", "properties": { "token": { "type": "string" }, "name": { "type": "string" } } }, "RepositoryBuildRequest": { "type": "object", "description": "Description of a new repository build.", "properties": { "docker_tags": { "minItems": 1, "items": { "type": "string" }, "uniqueItems": true, "type": "array", "description": "The tags to which the built images will be pushed. If none specified, \"latest\" is used." }, "pull_robot": { "type": "string", "description": "Username of a Quay robot account to use as pull credentials" }, "subdirectory": { "type": "string", "description": "Subdirectory in which the Dockerfile can be found" }, "file_id": { "type": "string", "description": "The file id that was generated when the build spec was uploaded" }, "archive_url": { "type": "string", "description": "The URL of the .tar.gz to build. Must start with \"http\" or \"https\"." } } }, "NotificationCreateRequest": { "required": ["event", "method", "config"], "type": "object", "description": "Information for creating a notification on a repository", "properties": { "eventConfig": { "type": "object", "description": "JSON config information for the specific event of notification" }, "title": { "type": "string", "description": "The human-readable title of the notification" }, "config": { "type": "object", "description": "JSON config information for the specific method of notification" }, "event": { "type": "string", "description": "The event on which the notification will respond" }, "method": { "type": "string", "description": "The method of notification (such as email or web callback)" } } }, "UserPermission": { "required": ["role"], "type": "object", "description": "Description of a user permission.", "properties": { "role": { "enum": ["read", "write", "admin"], "type": "string", "description": "Role to use for the user" } } }, "NewStarredRepository": { "required": ["namespace", "repository"], "type": "object", "properties": { "namespace": { "type": "string", "description": "Namespace in which the repository belongs" }, "repository": { "type": "string", "description": "Repository name" } } }, "MoveTag": { "required": ["image"], "type": "object", "description": "Description of to which image a new or existing tag should point", "properties": { "image": { "type": "string", "description": "Image identifier to which the tag should point" } } }, "UpdateUser": { "type": "object", "description": "Fields which can be updated in a user.", "properties": { "username": { "type": "string", "description": "The user's username" }, "invoice_email": { "type": "boolean", "description": "Whether the user desires to receive an invoice email." }, "password": { "type": "string", "description": "The user's password" }, "email": { "type": "string", "description": "The user's email address" }, "tag_expiration": { "minimum": 0, "type": "integer", "maximum": 2592000 } } }, "BuildTriggerActivateRequest": { "required": ["config"], "type": "object", "properties": { "pull_robot": { "type": "string", "description": "The name of the robot that will be used to pull images." }, "config": { "type": "object", "description": "Arbitrary json." } } }, "UpdateApp": { "required": ["name", "redirect_uri", "application_uri"], "type": "object", "description": "Description of an updated application.", "properties": { "redirect_uri": { "type": "string", "description": "The URI for the application's OAuth redirect" }, "avatar_email": { "type": "string", "description": "The e-mail address of the avatar to use for the application" }, "name": { "type": "string", "description": "The name of the application" }, "application_uri": { "type": "string", "description": "The URI for the application's homepage" }, "description": { "type": "string", "description": "The human-readable description for the application" } } }, "ChangeVisibility": { "required": ["visibility"], "type": "object", "description": "Change the visibility for the repository.", "properties": { "visibility": { "enum": ["public", "private"], "type": "string", "description": "Visibility which the repository will start with" } } }, "TeamDescription": { "required": ["role"], "type": "object", "description": "Description of a team", "properties": { "role": { "enum": ["member", "creator", "admin"], "type": "string", "description": "Org wide permissions that should apply to the team" }, "description": { "type": "string", "description": "Markdown description for the team" } } }, "NewPrototype": { "required": ["role", "delegate"], "type": "object", "description": "Description of a new prototype", "properties": { "activating_user": { "required": ["name"], "type": "object", "description": "Repository creating user to whom the rule should apply", "properties": { "name": { "type": "string", "description": "The username for the activating_user" } } }, "role": { "enum": ["read", "write", "admin"], "type": "string", "description": "Role that should be applied to the delegate" }, "delegate": { "required": ["name", "kind"], "type": "object", "description": "Information about the user or team to which the rule grants access", "properties": { "kind": { "enum": ["user", "team"], "type": "string", "description": "Whether the delegate is a user or a team" }, "name": { "type": "string", "description": "The name for the delegate team or user" } } } } }, "TokenPermission": { "required": ["role"], "type": "object", "description": "Description of a token permission", "properties": { "role": { "enum": ["read", "write", "admin"], "type": "string", "description": "Role to use for the token" } } }, "RunParameters": { "additionalProperties": false, "type": "object", "description": "Optional run parameters for activating the build trigger", "properties": { "branch_name": { "type": "string", "description": "(SCM only) If specified, the name of the branch to build." }, "refs": { "type": "object", "description": "(SCM Only) If specified, the ref to build." }, "commit_sha": { "type": "string", "description": "(Custom Only) If specified, the ref/SHA1 used to checkout a git repository." } } }, "NewRepo": { "required": ["repository", "visibility", "description"], "type": "object", "description": "Description of a new repository", "properties": { "namespace": { "type": "string", "description": "Namespace in which the repository should be created. If omitted, the username of the caller is used" }, "visibility": { "enum": ["public", "private"], "type": "string", "description": "Visibility which the repository will start with" }, "repository": { "type": "string", "description": "Repository name" }, "description": { "type": "string", "description": "Markdown encoded description for the repository" } } }, "RevertTag": { "required": ["image"], "type": "object", "description": "Reverts a tag to a specific image", "properties": { "image": { "type": "string", "description": "Image identifier to which the tag should point" } } }, "UserView": { "required": ["verified", "anonymous", "avatar"], "type": "object", "description": "Describes a user", "properties": { "organizations": { "items": { "type": "object" }, "type": "array", "description": "Information about the organizations in which the user is a member" }, "verified": { "type": "boolean", "description": "Whether the user's email address has been verified" }, "avatar": { "type": "object", "description": "Avatar data representing the user's icon" }, "anonymous": { "type": "boolean", "description": "true if this user data represents a guest user" }, "logins": { "items": { "type": "object" }, "type": "array", "description": "The list of external login providers against which the user has authenticated" }, "can_create_repo": { "type": "boolean", "description": "Whether the user has permission to create repositories" }, "preferred_namespace": { "type": "boolean", "description": "If true, the user's namespace is the preferred namespace to display" }, "email": { "type": "string", "description": "The user's email address" } } }, "NewApp": { "required": ["name"], "type": "object", "description": "Description of a new organization application.", "properties": { "redirect_uri": { "type": "string", "description": "The URI for the application's OAuth redirect" }, "avatar_email": { "type": "string", "description": "The e-mail address of the avatar to use for the application" }, "name": { "type": "string", "description": "The name of the application" }, "application_uri": { "type": "string", "description": "The URI for the application's homepage" }, "description": { "type": "string", "description": "The human-readable description for the application" } } }, "UpdateOrg": { "type": "object", "description": "Description of updates for an existing organization", "properties": { "invoice_email": { "type": "boolean", "description": "Whether the organization desires to receive emails for invoices" }, "email": { "type": "string", "description": "Organization contact email" }, "tag_expiration": { "minimum": 0, "type": "integer", "maximum": 2592000 } } }, "NewToken": { "required": ["friendlyName"], "type": "object", "description": "Description of a new token.", "properties": { "friendlyName": { "type": "string", "description": "Friendly name to help identify the token" } } }, "NewUser": { "required": ["username", "password", "email"], "type": "object", "description": "Fields which must be specified for a new user.", "properties": { "username": { "type": "string", "description": "The user's username" }, "password": { "type": "string", "description": "The user's password" }, "email": { "type": "string", "description": "The user's email address" }, "invite_code": { "type": "string", "description": "The optional invite code" } } }, "RepoUpdate": { "required": ["description"], "type": "object", "description": "Fields which can be updated in a repository.", "properties": { "description": { "type": "string", "description": "Markdown encoded description for the repository" } } }, "PrototypeUpdate": { "required": ["role"], "type": "object", "description": "Description of a the new prototype role", "properties": { "role": { "enum": ["read", "write", "admin"], "type": "string", "description": "Role that should be applied to the permission" } } }, "TeamPermission": { "required": ["role"], "type": "object", "description": "Description of a team permission.", "properties": { "role": { "enum": ["read", "write", "admin"], "type": "string", "description": "Role to use for the team" } } }, "GeneralError": { "type": "object", "properties": { "message": { "type": "string" } } } }, "parameters": { "OrgName": { "description": "The name of the organization", "required": true, "type": "string", "name": "orgname", "in": "path", "minLength": 4, "maxLength": 30, "pattern": "[a-z0-9_]+" }, "RobotShortName": { "description": "The short name for the robot, without any user or organization prefix", "required": true, "type": "string", "name": "robot_shortname", "in": "path", "minLength": 4, "maxLength": 30, "pattern": "[a-z0-9_]+" } }, "basePath": "/", "swagger": "2.0", "securityDefinitions": { "oauth2_implicit": { "flow": "implicit", "type": "oauth2", "authorizationUrl": "https://quay.io/oauth/authorize", "scopes": { "repo:write": "This application will be able to view, push and pull to all repositories to which the granting user or robot account has write access", "repo:read": "This application will be able to view and pull all repositories visible to the granting user or robot account", "repo:create": "This application will be able to create repositories in to any namespaces that the granting user or robot account is allowed to create repositories", "repo:admin": "This application will have administrator access to all repositories to which the granting user or robot account has access", "org:admin": "This application will be able to administer your organizations including creating robots, creating teams, adjusting team membership, and changing billing settings. You should have absolute trust in the requesting application before granting this permission.", "user:read": "This application will be able to read user information such as username and email address." } } } } validate-0.24.0/fixtures/go-swagger/expansion/000077500000000000000000000000001457312750000213115ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/expansion/all-the-things.json000066400000000000000000000131171457312750000250270ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Swagger Petstore", "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "Wordnik API Team" }, "license": { "name": "MIT" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/api", "schemes": [ "http" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": { "idParam": { "name": "id", "in": "path", "description": "ID of pet to fetch", "required": true, "type": "integer", "format": "int64" }, "tag": { "type": "string", "in": "query", "required": false }, "query": { "$ref": "#/parameters/tag" } }, "responses": { "petResponse": { "description": "pet response", "schema": { "$ref": "#/definitions/pet" } }, "stringResponse": { "descripion": "string response", "schema": { "type": "string" } }, "anotherPet": { "$ref": "#/responses/petResponse" } }, "paths": { "/": { "get": { "operationId": "indexStuff", "responses": { "default": { "$ref": "#/responses/stringResponse" }, "200": { "$ref": "#/responses/anotherPet" } } } }, "/pets": { "get": { "description": "Returns all pets from the system that the user has access to", "operationId": "findPets", "produces": [ "application/json", "application/xml", "text/xml", "text/html" ], "parameters": [ { "name": "tags", "in": "query", "description": "tags to filter by", "required": false, "type": "array", "items": { "type": "string" }, "collectionFormat": "csv" }, { "name": "limit", "in": "query", "description": "maximum number of results to return", "required": false, "type": "integer", "format": "int32" } ], "responses": { "200": { "description": "pet response", "schema": { "type": "array", "items": { "$ref": "#/definitions/pet" } } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } }, "post": { "description": "Creates a new pet in the store. Duplicates are allowed", "operationId": "addPet", "produces": [ "application/json" ], "parameters": [ { "name": "pet", "in": "body", "description": "Pet to add to the store", "required": true, "schema": { "$ref": "#/definitions/petInput" } } ], "responses": { "200": { "$ref": "#/responses/petResponse" }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } } }, "/pets/{id}": { "get": { "description": "Returns a user based on a single ID, if the user does not have access to the pet", "operationId": "findPetById", "produces": [ "application/json", "application/xml", "text/xml", "text/html" ], "parameters": [ { "$ref": "#/parameters/idParam" } ], "responses": { "200": { "$ref": "#/responses/petResponse" }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } }, "delete": { "description": "deletes a single pet based on the ID supplied", "operationId": "deletePet", "parameters": [ { "$ref": "#/parameters/idParam" } ], "responses": { "204": { "description": "pet deleted" }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } } } }, "definitions": { "pet": { "required": [ "id", "name" ], "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "tag": { "type": "string" } } }, "petInput": { "allOf": [ { "$ref": "#/definitions/pet" }, { "required": [ "name" ], "properties": { "id": { "type": "integer", "format": "int64" } } } ] }, "errorModel": { "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } } } }validate-0.24.0/fixtures/go-swagger/expansion/circularRefs.json000066400000000000000000000020051457312750000246250ustar00rootroot00000000000000{ "definitions": { "brand": { "type": "object", "properties": { "name": { "type": "string" } } }, "category": { "type": "object", "properties": { "children": { "type": "array", "items": { "$ref": "#/definitions/category" } } } }, "car": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "make": { "type": "string" }, "similar": { "items": { "$ref": "#/definitions/car" } }, "notSimilar": { "additionalProperties": { "$ref": "#/definitions/car" } }, "oneCar": { "$ref": "#/definitions/car" }, "category": { "$ref": "#/definitions/category" }, "brand": { "$ref": "#/definitions/brand" } } } } } validate-0.24.0/fixtures/go-swagger/expansion/circularSpec.json000066400000000000000000000020351457312750000246230ustar00rootroot00000000000000{"swagger":"2.0","info":{"title":"Swagger Sample","description":"Sample API Playground.","version":"1.0.0"},"basePath":"/v1","schemes":["http"],"consumes":["application/vdn.sample.v1+json"],"produces":["application/vdn.sample.v1+json"],"paths":{"/books":{"get":{"summary":"List all books","operationId":"listBooks","tags":["books"],"responses":{"200":{"headers":{"Link":{"type":"string"}},"description":"An array of books","schema":{"type":"array","items":{"$ref":"#/definitions/Book"}}},"default":{"description":"generic error response","schema":{"$ref":"#/definitions/Error"}}}}}},"definitions":{"Book":{"type":"object","required":["title","summary"],"properties":{"title":{"type":"string","example":"Winnie the Pooh"},"summary":{"type":"string","example":"Famous children's book"},"related_books":{"type":"array","items":{"$ref":"#/definitions/Book"}}}},"Error":{"type":"object","readOnly":true,"properties":{"code":{"type":"integer","format":"int64","example":400},"message":{"type":"string","example":"Unexpected error"}},"required":["message"]}}} validate-0.24.0/fixtures/go-swagger/expansion/circularSpec.yaml000066400000000000000000000023621457312750000246170ustar00rootroot00000000000000--- swagger: "2.0" info: title: Swagger Sample description: Sample API Playground. version: 1.0.0 basePath: /v1 schemes: - http consumes: - application/vdn.sample.v1+json produces: - application/vdn.sample.v1+json paths: /books: get: summary: List all books operationId: listBooks tags: - books responses: 200: headers: Link: type: string description: An array of books schema: type: array items: $ref: "#/definitions/Book" default: description: generic error response schema: $ref: "#/definitions/Error" definitions: Book: type: object required: - title - summary properties: title: type: string example: Winnie the Pooh summary: type: string example: Famous children's book related_books: type: array items: $ref: "#/definitions/Book" Error: type: object readOnly: true properties: code: type: integer format: int64 example: 400 message: type: string example: Unexpected error required: - message validate-0.24.0/fixtures/go-swagger/expansion/clickmeter.json000066400000000000000000004032511457312750000243330ustar00rootroot00000000000000{"swagger":"2.0","schemes":["http","https"],"host":"apiv2.clickmeter.com:80","info":{"contact":{"email":"api@clickmeter.com","name":"Api Support","url":"http://www.clickmeter.com/api"},"description":"Api dashboard for ClickMeter API","title":"ClickMeter","version":"v2","x-logo":{"url":"https://s3.amazonaws.com/clickmeter.com/Web/static/cmlogo.svg"},"x-origin":{"format":"swagger","url":"http://api.v2.clickmeter.com.s3.amazonaws.com/docs/api-docs-v2.json","version":"2.0"},"x-providerName":"clickmeter.com"},"securityDefinitions":{"api_key":{"description":"API Key Authentication","in":"header","name":"X-Clickmeter-AuthKey","type":"apiKey"}},"security":[{"api_key":[]}],"paths":{"/account":{"get":{"consumes":[],"deprecated":false,"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.User"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve current account data","tags":["Account"]},"post":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.User"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.User"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Update current account data","tags":["Account"]}},"/account/domainwhitelist":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Offset where to start from","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"description":"Limit results to this number","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Accounting.DomainWhitelistEntry]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve list of a domains allowed to redirect in DDU mode","tags":["Account"]},"post":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"The entry to add","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.DomainWhitelistEntry"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.DomainWhitelistEntry"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Create an domain entry","tags":["Account"]}},"/account/domainwhitelist/{whitelistId}":{"delete":{"consumes":[],"deprecated":false,"parameters":[{"description":"The id of the domain to delete","in":"path","name":"whitelistId","required":true,"type":"string"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.DomainWhitelistEntry"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Delete an domain entry","tags":["Account"]}},"/account/guests":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Offset where to start from","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"description":"Limit results to this number","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Field to sort by","in":"query","name":"sortBy","required":false,"type":"string"},{"description":"Direction of sort \"asc\" or \"desc\"","enum":["asc","desc"],"in":"query","name":"sortDirection","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve list of a guest","tags":["Account"]},"post":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"Guest object to create","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.Guest"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.Guest"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Create a guest","tags":["Account"]}},"/account/guests/count":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.CountResponce"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve count of guests","tags":["Account"]}},"/account/guests/{guestId}":{"delete":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the guest","format":"int64","in":"path","name":"guestId","required":true,"type":"integer"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Delete a guest","tags":["Account"]},"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the guest","format":"int64","in":"path","name":"guestId","required":true,"type":"integer"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.Guest"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve a guest","tags":["Account"]},"post":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"Id of the guest","format":"int64","in":"path","name":"guestId","required":true,"type":"integer"},{"description":"Guest object with field updated","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.Guest"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.Guest"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Update a guest","tags":["Account"]}},"/account/guests/{guestId}/permissions":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the guest","format":"int64","in":"path","name":"guestId","required":true,"type":"integer"},{"description":"Can be \"datapoint\" or \"group\"","enum":["datapoint","group"],"in":"query","name":"entityType","required":false,"type":"string"},{"description":"Offset where to start from","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"description":"Limit results to this number","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Can be \"w\" or \"r\"","enum":["r","w"],"in":"query","name":"type","required":false,"type":"string"},{"description":"Optional id of the datapoint/group entity to filter by","format":"int64","in":"query","name":"entityId","required":false,"type":"integer"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Grants.Grant]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve permissions for a guest","tags":["Account"]}},"/account/guests/{guestId}/permissions/count":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the guest","format":"int64","in":"path","name":"guestId","required":true,"type":"integer"},{"description":"Can be \"datapoint\" or \"group\"","enum":["datapoint","group"],"in":"query","name":"entityType","required":false,"type":"string"},{"description":"Can be \"w\" or \"r\"","enum":["r","w"],"in":"query","name":"type","required":false,"type":"string"},{"description":"Optional id of the datapoint/group entity to filter by","format":"int64","in":"query","name":"entityId","required":false,"type":"integer"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.CountResponce"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve count of the permissions for a guest","tags":["Account"]}},"/account/guests/{guestId}/{type}/permissions/patch":{"post":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"Id of the guest","format":"int64","in":"path","name":"guestId","required":true,"type":"integer"},{"description":"Can be \"datapoint\" or \"group\"","enum":["datapoint","group"],"in":"path","name":"type","required":true,"type":"string"},{"description":"The patch permission request","in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/Api.Core.Requests.PermissionPatchRequest"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Change the permission on a shared object","tags":["Account"]},"put":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"Id of the guest","format":"int64","in":"path","name":"guestId","required":true,"type":"integer"},{"description":"Can be \"datapoint\" or \"group\"","enum":["datapoint","group"],"in":"path","name":"type","required":true,"type":"string"},{"description":"The patch permission request","in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/Api.Core.Requests.PermissionPatchRequest"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Change the permission on a shared object","tags":["Account"]}},"/account/ipblacklist":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Offset where to start from","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"description":"Limit results to this number","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Accounting.IpBlacklistEntry]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve list of a ip to exclude from event tracking","tags":["Account"]},"post":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"The entry to add","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.IpBlacklistEntry"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.IpBlacklistEntry"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Create an ip blacklist entry","tags":["Account"]}},"/account/ipblacklist/{blacklistId}":{"delete":{"consumes":[],"deprecated":false,"parameters":[{"description":"The id of the ip to delete","in":"path","name":"blacklistId","required":true,"type":"string"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.IpBlacklistEntry"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Delete an ip blacklist entry","tags":["Account"]}},"/account/plan":{"get":{"consumes":[],"deprecated":false,"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.Plan"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve current account plan","tags":["Account"]}},"/aggregated":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"If using \"yesterday\" or \"today\" timeframe you can ask for the hourly detail","in":"query","name":"hourly","required":false,"type":"boolean"},{"description":"","in":"query","name":"onlyFavorites","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Aggregated.AggregatedResult"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about this customer for a timeframe","tags":["Aggregated"]}},"/aggregated/list":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"The temporal entity you want to group by (\"week\"/\"month\"). If unspecified is \"day\".","enum":["week","month"],"in":"query","name":"groupBy","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about this customer for a timeframe grouped by some temporal entity (day/week/month)","tags":["Aggregated"]}},"/aggregated/summary/conversions":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"Status of conversion (\"deleted\"/\"active\")","enum":["deleted","active"],"in":"query","name":"status","required":false,"type":"string"},{"description":"Field to sort by","in":"query","name":"sortBy","required":false,"type":"string"},{"description":"Direction of sort \"asc\" or \"desc\"","enum":["asc","desc"],"in":"query","name":"sortDirection","required":false,"type":"string"},{"description":"Offset where to start from","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"description":"Limit results to this number","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Aggregated.AggregatedSummaryResult"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about a subset of conversions for a timeframe with conversions data","tags":["Aggregated"]}},"/aggregated/summary/datapoints":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"Type of datapoint (\"tl\"/\"tp\")","enum":["tp","tl"],"in":"query","name":"type","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"Status of datapoint (\"deleted\"/\"active\"/\"paused\"/\"spam\")","enum":["deleted","active","paused","spam"],"in":"query","name":"status","required":false,"type":"string"},{"description":"A comma separated list of tags you want to filter with.","in":"query","name":"tag","required":false,"type":"string"},{"description":"Is the datapoint marked as favourite","in":"query","name":"favourite","required":false,"type":"boolean"},{"description":"Field to sort by","in":"query","name":"sortBy","required":false,"type":"string"},{"description":"Direction of sort \"asc\" or \"desc\"","enum":["asc","desc"],"in":"query","name":"sortDirection","required":false,"type":"string"},{"description":"Offset where to start from","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"description":"Limit results to this number","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Filter by this group id","format":"int64","in":"query","name":"groupId","required":false,"type":"integer"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Aggregated.AggregatedSummaryResult"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about a subset of datapoints for a timeframe with datapoints data","tags":["Aggregated"]}},"/aggregated/summary/groups":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"Status of group (\"deleted\"/\"active\")","enum":["deleted","active"],"in":"query","name":"status","required":false,"type":"string"},{"description":"A comma separated list of tags you want to filter with.","in":"query","name":"tag","required":false,"type":"string"},{"description":"Is the group marked as favourite","in":"query","name":"favourite","required":false,"type":"boolean"},{"description":"Field to sort by","in":"query","name":"sortBy","required":false,"type":"string"},{"description":"Direction of sort \"asc\" or \"desc\"","enum":["asc","desc"],"in":"query","name":"sortDirection","required":false,"type":"string"},{"description":"Offset where to start from","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"description":"Limit results to this number","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Aggregated.AggregatedSummaryResult"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about a subset of groups for a timeframe with groups data","tags":["Aggregated"]}},"/clickstream":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Filter by this group id (mutually exclusive with \"datapoint\" and \"conversion\")","format":"int64","in":"query","name":"group","required":false,"type":"integer"},{"description":"Filter by this datapoint id (mutually exclusive with \"group\" and \"conversion\")","format":"int64","in":"query","name":"datapoint","required":false,"type":"integer"},{"description":"Filter by this conversion id (mutually exclusive with \"datapoint\" and \"group\")","format":"int64","in":"query","name":"conversion","required":false,"type":"integer"},{"default":50,"description":"Limit results to this number","format":"int32","in":"query","name":"pageSize","required":false,"type":"integer"},{"description":"Filter event type (\"spiders\"/\"uniques\"/\"nonuniques\"/\"conversions\")","enum":["","spiders","uniques","nonuniques","conversions"],"in":"query","name":"filter","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.ClickStream.Hit]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve the latest list of events of this account. Limited to last 100.","tags":["ClickStream"]}},"/conversions":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Offset where to start from","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"description":"Limit results to this number","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Status of conversion (\"deleted\"/\"active\")","enum":["deleted","active"],"in":"query","name":"status","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Exclude conversions created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude conversions created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve a list of conversions","tags":["Conversions"]},"post":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"The body of the conversion","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Conversions.Conversion"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Create a conversion","tags":["Conversions"]}},"/conversions/aggregated/list":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"Status of conversion (\"deleted\"/\"active\")","enum":["deleted","active"],"in":"query","name":"status","required":false,"type":"string"},{"description":"The temporal entity you want to group by (\"week\"/\"month\"). If unspecified is \"day\".","enum":["week","month"],"in":"query","name":"groupBy","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about this customer for a timeframe related to a subset of conversions grouped by some temporal entity (day/week/month)","tags":["Conversions"]}},"/conversions/count":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Status of conversion (\"deleted\"/\"active\")","enum":["deleted","active"],"in":"query","name":"status","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Exclude conversions created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude conversions created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.CountResponce"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve a count of conversions","tags":["Conversions"]}},"/conversions/{conversionId}":{"delete":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the conversion","format":"int64","in":"path","name":"conversionId","required":true,"type":"integer"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Delete conversion specified by id","tags":["Conversions"]},"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the conversion","format":"int64","in":"path","name":"conversionId","required":true,"type":"integer"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Conversions.Conversion"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve conversion specified by id","tags":["Conversions"]},"post":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"Id of the conversion","format":"int64","in":"path","name":"conversionId","required":true,"type":"integer"},{"description":"Updated body of the conversion","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Conversions.Conversion"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Update conversion specified by id","tags":["Conversions"]}},"/conversions/{conversionId}/aggregated":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the conversion","format":"int64","in":"path","name":"conversionId","required":true,"type":"integer"},{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"Filter by this tag name","in":"query","name":"tag","required":false,"type":"string"},{"description":"Is the datapoint marked as favourite","in":"query","name":"favourite","required":false,"type":"boolean"},{"description":"If using \"yesterday\" or \"today\" timeframe you can ask for the hourly detail","in":"query","name":"hourly","required":false,"type":"boolean"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Aggregated.AggregatedResult"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about this conversion for a timeframe","tags":["Conversions"]}},"/conversions/{conversionId}/aggregated/list":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the conversion","format":"int64","in":"path","name":"conversionId","required":true,"type":"integer"},{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"The temporal entity you want to group by (\"week\"/\"month\"). If unspecified is \"day\".","enum":["week","month"],"in":"query","name":"groupBy","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about this conversion for a timeframe grouped by some temporal entity (day/week/month)","tags":["Conversions"]}},"/conversions/{conversionId}/datapoints":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the conversion","format":"int64","in":"path","name":"conversionId","required":true,"type":"integer"},{"description":"Offset where to start from","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"description":"Limit results to this number","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Type of datapoint (\"tl\"/\"tp\")","enum":["tp","tl"],"in":"query","name":"type","required":false,"type":"string"},{"description":"Status of datapoint (\"deleted\"/\"active\"/\"paused\"/\"spam\")","enum":["deleted","active","paused","spam"],"in":"query","name":"status","required":false,"type":"string"},{"description":"Filter by this tag name","in":"query","name":"tags","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Exclude datapoints created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude datapoints created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve a list of datapoints connected to this conversion","tags":["Conversions"]}},"/conversions/{conversionId}/datapoints/batch/patch":{"put":{"consumes":["application/json","text/json","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"Id of the conversion","format":"int64","in":"path","name":"conversionId","required":true,"type":"integer"},{"description":"Patch requests","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/Api.Core.Requests.PatchBodyBatch"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Modify the association between a conversion and multiple datapoints","tags":["Conversions"]}},"/conversions/{conversionId}/datapoints/count":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the conversion","format":"int64","in":"path","name":"conversionId","required":true,"type":"integer"},{"description":"Type of datapoint (\"tl\"/\"tp\")","in":"query","name":"type","required":false,"type":"string"},{"description":"Status of datapoint (\"deleted\"/\"active\"/\"paused\"/\"spam\")","in":"query","name":"status","required":false,"type":"string"},{"description":"Filter by this tag name","in":"query","name":"tags","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Exclude datapoints created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude datapoints created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.CountResponce"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve a count of datapoints connected to this conversion","tags":["Conversions"]}},"/conversions/{conversionId}/datapoints/patch":{"put":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"Id of the conversion","format":"int64","in":"path","name":"conversionId","required":true,"type":"integer"},{"description":"Patch request","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/Api.Core.Requests.ConversionPatchBody"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Modify the association between a conversion and a datapoint","tags":["Conversions"]}},"/conversions/{conversionId}/hits":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the conversion","format":"int64","in":"path","name":"conversionId","required":true,"type":"integer"},{"description":"Timeframe of the request. See list at $timeframeList","enum":["yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","custom"],"in":"query","name":"timeframe","required":true,"type":"string"},{"description":"Limit results to this number","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Offset where to start from (it's the lastKey field in the response object)","in":"query","name":"offset","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"Filter event type (\"spiders\"/\"uniques\"/\"nonuniques\"/\"conversions\")","enum":["spiders","uniques","nonuniques","conversions"],"in":"query","name":"filter","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.HitListPage"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve the list of events related to this conversion.","tags":["Conversions"]}},"/conversions/{conversionId}/notes":{"put":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"Id of the conversion","format":"int64","in":"path","name":"conversionId","required":true,"type":"integer"},{"description":"Patch requests","in":"body","name":"note","required":true,"schema":{"$ref":"#/definitions/Api.Core.Requests.GenericTextPatch"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Fast patch the \"notes\" field of a conversion","tags":["Conversions"]}},"/conversions/{conversionId}/reports":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the conversion","format":"int64","in":"path","name":"conversionId","required":true,"type":"integer"},{"description":"Type of the report.","enum":["datapoints","groups","browsers","browsersfamilies","platforms","cities","countries","keywords","referrers","convparameters","destinations","languages","params"],"in":"query","name":"type","required":true,"type":"string"},{"description":"Timeframe of the request. See list at $timeframeList","enum":["yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","beginning","custom"],"in":"query","name":"timeframe","required":true,"type":"string"},{"description":"Type of the event you want to filter this report with. By default no filter is applied.","enum":["clicks","views"],"in":"query","name":"hittype","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Tops.Top"}},"401":{"description":"Forbidden"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve a top report connected to this conversion","tags":["Conversions"]}},"/datapoints":{"get":{"consumes":[],"deprecated":false,"parameters":[{"default":0,"description":"Where to start when retrieving elements. Default is 0 if not specified.","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"default":20,"description":"Maximum elements to retrieve. Default to 20 if not specified.","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Type of the datapoint (\"tp\"/\"tl\")","enum":["tp","tl"],"in":"query","name":"type","required":false,"type":"string"},{"description":"Status of the datapoint","enum":["deleted","active","paused","spam"],"in":"query","name":"status","required":false,"type":"string"},{"description":"A comma separated list of tags you want to filter with.","in":"query","name":"tags","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Filter fields by favourite status","in":"query","name":"onlyFavorites","required":false,"type":"boolean"},{"description":"Field to sort by","in":"query","name":"sortBy","required":false,"type":"string"},{"description":"Direction of sort \"asc\" or \"desc\"","enum":["asc","desc"],"in":"query","name":"sortDirection","required":false,"type":"string"},{"description":"Exclude datapoints created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude datapoints created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"List of all the datapoints associated to the user","tags":["DataPoints"]},"post":{"consumes":["application/json","text/json","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"The body of the datapoint","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.Datapoint"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Create a datapoint","tags":["DataPoints"]}},"/datapoints/aggregated":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"Type of datapoint (\"tl\"/\"tp\")","enum":["tp","tl"],"in":"query","name":"type","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"If using \"yesterday\" or \"today\" timeframe you can ask for the hourly detail","in":"query","name":"hourly","required":false,"type":"boolean"},{"description":"Status of datapoint (\"deleted\"/\"active\"/\"paused\"/\"spam\")","enum":["deleted","active","paused","spam"],"in":"query","name":"status","required":false,"type":"string"},{"description":"A comma separated list of tags you want to filter with.","in":"query","name":"tag","required":false,"type":"string"},{"description":"Is the datapoint is marked as favourite","in":"query","name":"favourite","required":false,"type":"boolean"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Aggregated.AggregatedResult"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about this customer for a timeframe by groups","tags":["DataPoints"]}},"/datapoints/aggregated/list":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Type of datapoint (\"tl\"/\"tp\")","enum":["tp","tl"],"in":"query","name":"type","required":true,"type":"string"},{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"Status of datapoint (\"deleted\"/\"active\"/\"paused\"/\"spam\")","enum":["deleted","active","paused","spam"],"in":"query","name":"status","required":false,"type":"string"},{"description":"A comma separated list of tags you want to filter with.","in":"query","name":"tag","required":false,"type":"string"},{"description":"Is the datapoint is marked as favourite","in":"query","name":"favourite","required":false,"type":"boolean"},{"description":"The temporal entity you want to group by (\"week\"/\"month\"). If unspecified is \"day\".","enum":["week","month"],"in":"query","name":"groupBy","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about all datapoints of this customer for a timeframe grouped by some temporal entity (day/week/month)","tags":["DataPoints"]}},"/datapoints/batch":{"delete":{"consumes":["application/json","text/json","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"A json containing the datapoints to delete.","in":"body","name":"batch","required":true,"schema":{"$ref":"#/definitions/Api.Core.Requests.DeleteBatch"}}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.ModifyBatchItemResponce[Api.Core.Dto.Datapoints.Datapoint,System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Delete multiple datapoints","tags":["DataPoints"]},"post":{"consumes":["application/json","text/json","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"A json containing the datapoints to update.","in":"body","name":"batch","required":true,"schema":{"$ref":"#/definitions/Api.Core.Requests.DatapointsBatch"}}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.ModifyBatchItemResponce[Api.Core.Dto.Datapoints.Datapoint,System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Update multiple datapoints","tags":["DataPoints"]},"put":{"consumes":["application/json","text/json","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"A json containing the datapoints to create.","in":"body","name":"batch","required":true,"schema":{"$ref":"#/definitions/Api.Core.Requests.DatapointsBatch"}}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.ModifyBatchItemResponce[Api.Core.Dto.Datapoints.Datapoint,System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Create multiple datapoints","tags":["DataPoints"]}},"/datapoints/count":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Type of the datapoint (\"tp\"/\"tl\")","enum":["tp","tl"],"in":"query","name":"type","required":false,"type":"string"},{"description":"Status of the datapoint","enum":["deleted","active","paused","spam"],"in":"query","name":"status","required":false,"type":"string"},{"description":"A comma separated list of tags you want to filter with.","in":"query","name":"tags","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Filter fields by favourite status","in":"query","name":"onlyFavorites","required":false,"type":"boolean"},{"description":"Exclude datapoints created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude datapoints created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.CountResponce"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Count the datapoints associated to the user","tags":["DataPoints"]}},"/datapoints/{id}":{"delete":{"consumes":[],"deprecated":false,"parameters":[{"description":"The id of the datapoint","format":"int64","in":"path","name":"id","required":true,"type":"integer"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Delete a datapoint","tags":["DataPoints"]},"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"The id of the datapoint","format":"int64","in":"path","name":"id","required":true,"type":"integer"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.Datapoint"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Get a datapoint","tags":["DataPoints"]},"post":{"consumes":["application/json","text/json","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"The id of the datapoint","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"The body of the datapoint","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.Datapoint"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Update a datapoint","tags":["DataPoints"]}},"/datapoints/{id}/aggregated":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the datapoint","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"If using \"yesterday\" or \"today\" timeframe you can ask for the hourly detail","in":"query","name":"hourly","required":false,"type":"boolean"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Aggregated.AggregatedResult"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about this datapoint for a timeframe","tags":["DataPoints"]}},"/datapoints/{id}/aggregated/list":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the datapoint","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"The temporal entity you want to group by (\"week\"/\"month\"). If unspecified is \"day\".","enum":["week","month"],"in":"query","name":"groupBy","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about this datapoint for a timeframe grouped by some temporal entity (day/week/month)","tags":["DataPoints"]}},"/datapoints/{id}/favourite":{"put":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the datapoint","format":"int64","in":"path","name":"id","required":true,"type":"integer"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Fast switch the \"favourite\" field of a datapoint","tags":["DataPoints"]}},"/datapoints/{id}/hits":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the datapoint","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"Timeframe of the request. See list at $timeframeList","enum":["yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","custom"],"in":"query","name":"timeframe","required":true,"type":"string"},{"description":"Limit results to this number","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Offset where to start from (it's the lastKey field in the response object)","in":"query","name":"offset","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"Filter event type (\"spiders\"/\"uniques\"/\"nonuniques\"/\"conversions\")","enum":["spiders","uniques","nonuniques","conversions"],"in":"query","name":"filter","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.HitListPage"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve the list of events related to this datapoint.","tags":["DataPoints"]}},"/datapoints/{id}/notes":{"put":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"Id of the datapoint","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"Patch requests","in":"body","name":"note","required":true,"schema":{"$ref":"#/definitions/Api.Core.Requests.GenericTextPatch"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Fast patch the \"notes\" field of a datapoint","tags":["DataPoints"]}},"/datapoints/{id}/reports":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the datapoint","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"Type of the report.","enum":["browsers","browsersfamilies","platforms","cities","countries","isps","ips","oss","ossfamilies","keywords","referrers","destinations","languages","params"],"in":"query","name":"type","required":true,"type":"string"},{"description":"Timeframe of the request. See list at $timeframeList","enum":["yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","beginning","custom"],"in":"query","name":"timeframe","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Tops.Top"}},"401":{"description":"Forbidden"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve a top report connected to this datapoint","tags":["DataPoints"]}},"/domains":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Offset where to start from","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"description":"Limit results to this number","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"default":"system","description":"Type of domain (\"system\"/\"go\"/\"personal\"/\"dedicated\"). If not specified default is \"system\"","enum":["system","go","personal","dedicated"],"in":"query","name":"type","required":false,"type":"string"},{"description":"Filter domains with this anmen","in":"query","name":"name","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve a list of domains","tags":["Domains"]},"post":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"The domain to create","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Domains.Domain"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Create a domain","tags":["Domains"]}},"/domains/count":{"get":{"consumes":[],"deprecated":false,"parameters":[{"default":"system","description":"Type of domain (\"system\"/\"go\"/\"personal\"/\"dedicated\"). If not specified default is \"system\"","enum":["system","go","personal","dedicated"],"in":"query","name":"type","required":false,"type":"string"},{"description":"Filter domains with this anmen","in":"query","name":"name","required":false,"type":"string"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.CountResponce"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve count of domains","tags":["Domains"]}},"/domains/{id}":{"delete":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of domain","format":"int64","in":"path","name":"id","required":true,"type":"integer"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Delete a domain","tags":["Domains"]},"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of domain","format":"int64","in":"path","name":"id","required":true,"type":"integer"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Domains.Domain"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Get a domain","tags":["Domains"]},"post":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"Id of domain","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"The domain to update","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Domains.Domain"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Update a domain","tags":["Domains"]}},"/groups":{"get":{"consumes":[],"deprecated":false,"parameters":[{"default":0,"description":"Where to start when retrieving elements. Default is 0 if not specified.","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"default":20,"description":"Maximum elements to retrieve. Default to 20 if not specified.","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Status of the group","enum":["deleted","active"],"in":"query","name":"status","required":false,"type":"string"},{"description":"A comma separated list of tags you want to filter with.","in":"query","name":"tags","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Exclude groups created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude groups created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"},{"description":"Write permission","in":"query","name":"write","required":false,"type":"boolean"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"List of all the groups associated to the user.","tags":["Groups"]},"post":{"consumes":["application/json","text/json","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"The body of the group","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Groups.Group"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Create a group","tags":["Groups"]}},"/groups/aggregated":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"If using \"yesterday\" or \"today\" timeframe you can ask for the hourly detail","in":"query","name":"hourly","required":false,"type":"boolean"},{"description":"Status of group (\"deleted\"/\"active\")","enum":["deleted","active"],"in":"query","name":"status","required":false,"type":"string"},{"description":"A comma separated list of tags you want to filter with.","in":"query","name":"tag","required":false,"type":"string"},{"description":"Is the group is marked as favourite","in":"query","name":"favourite","required":false,"type":"boolean"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Aggregated.AggregatedResult"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about this customer for a timeframe by groups","tags":["Groups"]}},"/groups/aggregated/list":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"Status of group (\"deleted\"/\"active\")","in":"query","name":"status","required":false,"type":"string"},{"description":"A comma separated list of tags you want to filter with.","in":"query","name":"tag","required":false,"type":"string"},{"description":"Is the group is marked as favourite","in":"query","name":"favourite","required":false,"type":"boolean"},{"description":"The temporal entity you want to group by (\"week\"/\"month\"). If unspecified is \"day\".","enum":["deleted","active"],"in":"query","name":"groupBy","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about all groups of this customer for a timeframe grouped by some temporal entity (day/week/month)","tags":["Groups"]}},"/groups/count":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Status of the datapoint","enum":["deleted","active"],"in":"query","name":"status","required":false,"type":"string"},{"description":"A comma separated list of tags you want to filter with.","in":"query","name":"tags","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Exclude groups created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude groups created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"},{"description":"Write permission","in":"query","name":"write","required":false,"type":"boolean"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.CountResponce"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Count the groups associated to the user.","tags":["Groups"]}},"/groups/{id}":{"delete":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the group","format":"int64","in":"path","name":"id","required":true,"type":"integer"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Delete group specified by id","tags":["Groups"]},"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"The id of the group","format":"int64","in":"path","name":"id","required":true,"type":"integer"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Groups.Group"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Get a group","tags":["Groups"]},"post":{"consumes":["application/json","text/json","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"The id of the group","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"The body of the group","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Groups.Group"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Update a group","tags":["Groups"]}},"/groups/{id}/aggregated":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the group","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"If using \"yesterday\" or \"today\" timeframe you can ask for the hourly detail","in":"query","name":"hourly","required":false,"type":"boolean"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Aggregated.AggregatedResult"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about this group for a timeframe","tags":["Groups"]}},"/groups/{id}/aggregated/list":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the group","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"The temporal entity you want to group by (\"week\"/\"month\"). If unspecified is \"day\".","enum":["week","month"],"in":"query","name":"groupBy","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about this group for a timeframe grouped by some temporal entity (day/week/month)","tags":["Groups"]}},"/groups/{id}/aggregated/summary":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Filter by this group id","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"Timeframe of the request. See list at $timeframeList","enum":["today","yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","last12months","lastyear","currentyear","beginning","custom"],"in":"query","name":"timeFrame","required":true,"type":"string"},{"description":"Type of datapoint (\"tl\"/\"tp\")","enum":["tp","tl"],"in":"query","name":"type","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"Status of datapoint (\"deleted\"/\"active\"/\"paused\"/\"spam\")","enum":["deleted","active"],"in":"query","name":"status","required":false,"type":"string"},{"description":"A comma separated list of tags you want to filter with.","in":"query","name":"tag","required":false,"type":"string"},{"description":"Is the datapoint marked as favourite","in":"query","name":"favourite","required":false,"type":"boolean"},{"description":"Field to sort by","in":"query","name":"sortBy","required":false,"type":"string"},{"description":"Direction of sort \"asc\" or \"desc\"","enum":["asc","desc"],"in":"query","name":"sortDirection","required":false,"type":"string"},{"default":0,"description":"Offset where to start from","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"default":20,"description":"Limit results to this number","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Aggregated.AggregatedSummaryResult"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve statistics about a subset of datapoints for a timeframe with datapoints data","tags":["Groups"]}},"/groups/{id}/datapoints":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the group","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"default":0,"description":"Where to start when retrieving elements. Default is 0 if not specified.","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"default":20,"description":"Maximum elements to retrieve. Default to 20 if not specified.","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Type of the datapoint (\"tp\"/\"tl\")","enum":["tp","tl"],"in":"query","name":"type","required":false,"type":"string"},{"description":"Status of the datapoint","enum":["deleted","active","paused","spam"],"in":"query","name":"status","required":false,"type":"string"},{"description":"A comma separated list of tags you want to filter with.","in":"query","name":"tags","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Filter fields by favourite status","in":"query","name":"onlyFavorites","required":false,"type":"boolean"},{"description":"Field to sort by","in":"query","name":"sortBy","required":false,"type":"string"},{"description":"Direction of sort \"asc\" or \"desc\"","enum":["asc","desc"],"in":"query","name":"sortDirection","required":false,"type":"string"},{"description":"Exclude datapoints created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude datapoints created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"List of all the datapoints associated to the user in this group.","tags":["Groups"]},"post":{"consumes":["application/json","text/json","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"The id of the group","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"The body of the datapoint","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.Datapoint"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Create a datapoint in this group","tags":["Groups"]}},"/groups/{id}/datapoints/count":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the group","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"Type of the datapoint (\"tp\"/\"tl\")","enum":["tp","tl"],"in":"query","name":"type","required":false,"type":"string"},{"description":"Status of the datapoint","enum":["deleted","active","paused","spam"],"in":"query","name":"status","required":false,"type":"string"},{"description":"A comma separated list of tags you want to filter with.","in":"query","name":"tags","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Filter fields by favourite status","in":"query","name":"onlyFavorites","required":false,"type":"boolean"},{"description":"Exclude datapoints created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude datapoints created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.CountResponce"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Count the datapoints associated to the user in this group.","tags":["Groups"]}},"/groups/{id}/favourite":{"put":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the group","format":"int64","in":"path","name":"id","required":true,"type":"integer"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Fast switch the \"favourite\" field of a group","tags":["Groups"]}},"/groups/{id}/hits":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the group","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"Timeframe of the request. See list at $timeframeList","enum":["yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","custom"],"in":"query","name":"timeframe","required":true,"type":"string"},{"description":"Limit results to this number","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Offset where to start from (it's the lastKey field in the response object)","in":"query","name":"offset","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"Filter event type (\"spiders\"/\"uniques\"/\"nonuniques\"/\"conversions\")","enum":["spiders","uniques","nonuniques","conversions"],"in":"query","name":"filter","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.HitListPage"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve the list of events related to this group.","tags":["Groups"]}},"/groups/{id}/notes":{"put":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"Id of the group","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"Patch requests","in":"body","name":"note","required":true,"schema":{"$ref":"#/definitions/Api.Core.Requests.GenericTextPatch"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Fast patch the \"notes\" field of a group","tags":["Groups"]}},"/groups/{id}/reports":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the group","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"Type of the report.","enum":["browsers","browsersfamilies","platforms","cities","countries","isps","ips","oss","ossfamilies","keywords","referrers","destinations","languages","params"],"in":"query","name":"type","required":true,"type":"string"},{"description":"Timeframe of the request. See list at $timeframeList","enum":["yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","beginning","custom"],"in":"query","name":"timeframe","required":true,"type":"string"},{"description":"Type of the event you want to filter this report with. By default no filter is applied.","enum":["clicks","views"],"in":"query","name":"hittype","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Tops.Top"}},"401":{"description":"Forbidden"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve a top report connected to this group","tags":["Groups"]}},"/hits":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Timeframe of the request. See list at $timeframeList","enum":["yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","custom"],"in":"query","name":"timeframe","required":true,"type":"string"},{"description":"Limit results to this number","format":"int32","in":"query","name":"limit","required":false,"type":"integer"},{"description":"Offset where to start from (it's the lastKey field in the response object)","in":"query","name":"offset","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"},{"description":"Filter event type (\"spiders\"/\"uniques\"/\"nonuniques\"/\"conversions\")","enum":["spiders","uniques","nonuniques","conversions"],"in":"query","name":"filter","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.HitListPage"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve the list of events related to this account.","tags":["Hits"]}},"/me":{"get":{"consumes":[],"deprecated":false,"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.User"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve current account data","tags":["Me"]}},"/me/plan":{"get":{"consumes":[],"deprecated":false,"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Accounting.Plan"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve current account plan","tags":["Me"]}},"/reports":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Type of the report.","enum":["browsers","browsersfamilies","platforms","cities","countries","isps","ips","oss","ossfamilies","keywords","referrers","destinations","languages","params"],"in":"query","name":"type","required":true,"type":"string"},{"description":"Timeframe of the request. See list at $timeframeList","enum":["yesterday","last7","last30","lastmonth","currentmonth","previousmonth","last90","last120","last180","beginning","custom"],"in":"query","name":"timeframe","required":true,"type":"string"},{"description":"Type of the event you want to filter this report with. By default no filter is applied.","in":"query","name":"hittype","required":false,"type":"string"},{"description":"Filter by this group id (mutually exclusive with \"datapoint\" and \"conversion\")","format":"int64","in":"query","name":"group","required":false,"type":"integer"},{"description":"Filter by this datapoint id (mutually exclusive with \"group\" and \"conversion\")","format":"int64","in":"query","name":"datapoint","required":false,"type":"integer"},{"description":"Filter by this conversion id (mutually exclusive with \"datapoint\" and \"group\")","format":"int64","in":"query","name":"conversion","required":false,"type":"integer"},{"description":"If using a \"custom\" timeFrame you can specify the starting day (YYYYMMDD)","in":"query","name":"fromDay","required":false,"type":"string"},{"description":"If using a \"custom\" timeFrame you can specify the ending day (YYYYMMDD)","in":"query","name":"toDay","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Tops.Top"}},"401":{"description":"Forbidden"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve a top report","tags":["Reports"]}},"/retargeting":{"get":{"consumes":[],"deprecated":false,"parameters":[{"default":0,"description":"Where to start when retrieving elements. Default is 0 if not specified.","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"default":20,"description":"Maximum elements to retrieve. Default to 20 if not specified.","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"List of all the retargeting scripts associated to the user","tags":["Retargeting"]},"post":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"The body of the retargeting script","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Retargeting.RetargetingScript"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Creates a retargeting script","tags":["Retargeting"]}},"/retargeting/count":{"get":{"consumes":[],"deprecated":false,"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.CountResponce"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve count of retargeting scripts","tags":["Retargeting"]}},"/retargeting/{id}":{"delete":{"consumes":[],"deprecated":false,"parameters":[{"description":"The id of the retargeting script","format":"int64","in":"path","name":"id","required":true,"type":"integer"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Deletes a retargeting script (and remove associations)","tags":["Retargeting"]},"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"The id of the retargeting script","format":"int64","in":"path","name":"id","required":true,"type":"integer"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Retargeting.RetargetingScript"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Get a retargeting script object","tags":["Retargeting"]},"post":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"The id of the retargeting script","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"The body of the retargeting script","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Retargeting.RetargetingScript"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Updates a retargeting script","tags":["Retargeting"]}},"/retargeting/{id}/datapoints":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the retargeting script","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"default":0,"description":"Where to start when retrieving elements. Default is 0 if not specified.","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"default":20,"description":"Maximum elements to retrieve. Default to 20 if not specified.","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Status of the datapoint","enum":["deleted","active","paused","spam"],"in":"query","name":"status","required":false,"type":"string"},{"description":"A comma separated list of tags you want to filter with.","in":"query","name":"tags","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Filter fields by favourite status","in":"query","name":"onlyFavorites","required":false,"type":"boolean"},{"description":"Field to sort by","in":"query","name":"sortBy","required":false,"type":"string"},{"description":"Direction of sort \"asc\" or \"desc\"","enum":["asc","desc"],"in":"query","name":"sortDirection","required":false,"type":"string"},{"description":"Exclude datapoints created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude datapoints created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"List of all the datapoints associated to the retargeting script.","tags":["Retargeting"]}},"/retargeting/{id}/datapoints/count":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the group","format":"int64","in":"path","name":"id","required":true,"type":"integer"},{"description":"Status of the datapoint","enum":["deleted","active","paused","spam"],"in":"query","name":"status","required":false,"type":"string"},{"description":"A comma separated list of tags you want to filter with.","in":"query","name":"tags","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Filter fields by favourite status","in":"query","name":"onlyFavorites","required":false,"type":"boolean"},{"description":"Exclude datapoints created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude datapoints created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.CountResponce"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Count the datapoints associated to the retargeting script.","tags":["Retargeting"]}},"/tags":{"get":{"consumes":[],"deprecated":false,"parameters":[{"default":0,"description":"Where to start when retrieving elements. Default is 0 if not specified.","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"default":20,"description":"Maximum elements to retrieve. Default to 20 if not specified.","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Name of the tag","in":"query","name":"name","required":false,"type":"string"},{"description":"Comma separated list of datapoints id to filter by","in":"query","name":"datapoints","required":false,"type":"string"},{"description":"Comma separated list of groups id to filter by","in":"query","name":"groups","required":false,"type":"string"},{"description":"Type of entity related to the tag","enum":["tp","tl","dp","gr"],"in":"query","name":"type","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"List of all the groups associated to the user filtered by this tag.","tags":["Tags"]},"post":{"consumes":["application/json","text/json","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"The body of the tag","in":"body","name":"value","required":true,"schema":{"$ref":"#/definitions/Api.Core.Dto.Tags.Tag"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Create a tag","tags":["Tags"]}},"/tags/count":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Name of the tag","in":"query","name":"name","required":false,"type":"string"},{"description":"Comma separated list of datapoints id to filter by","in":"query","name":"datapoints","required":false,"type":"string"},{"description":"Comma separated list of groups id to filter by","in":"query","name":"groups","required":false,"type":"string"},{"description":"Type of entity related to the tag","enum":["tp","tl","dp","gr"],"in":"query","name":"type","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/System.Object"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"List of all the groups associated to the user filtered by this tag.","tags":["Tags"]}},"/tags/{tagId}":{"delete":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the tag","format":"int64","in":"path","name":"tagId","required":true,"type":"integer"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/System.Object"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Delete a tag","tags":["Tags"]},"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the tag","format":"int64","in":"path","name":"tagId","required":true,"type":"integer"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Dto.Tags.Tag"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Retrieve a tag","tags":["Tags"]}},"/tags/{tagId}/datapoints":{"delete":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the tag","format":"int64","in":"path","name":"tagId","required":true,"type":"integer"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Delete the association of this tag with all datapoints","tags":["Tags"]},"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the tag.","format":"int64","in":"path","name":"tagId","required":true,"type":"integer"},{"default":0,"description":"Where to start when retrieving elements. Default is 0 if not specified.","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"default":20,"description":"Maximum elements to retrieve. Default to 20 if not specified.","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Type of the datapoint (\"tp\"/\"tl\")","enum":["tp","tl"],"in":"query","name":"type","required":false,"type":"string"},{"description":"Status of the datapoint","enum":["deleted","active","paused","spam"],"in":"query","name":"status","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Exclude datapoints created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude datapoints created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"List of all the datapoints associated to the user filtered by this tag","tags":["Tags"]}},"/tags/{tagId}/datapoints/count":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the tag.","format":"int64","in":"path","name":"tagId","required":true,"type":"integer"},{"description":"Type of the datapoint (\"tp\"/\"tl\")","enum":["tp","tl"],"in":"query","name":"type","required":false,"type":"string"},{"description":"Status of the datapoint","enum":["deleted","active","paused","spam"],"in":"query","name":"status","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Exclude datapoints created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude datapoints created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.CountResponce"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Count the datapoints associated to the user filtered by this tag","tags":["Tags"]}},"/tags/{tagId}/datapoints/patch":{"put":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"Id of the tag","format":"int64","in":"path","name":"tagId","required":true,"type":"integer"},{"description":"The body patch","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/Api.Core.Requests.PatchBody"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Associate/Deassociate a tag with a datapoint","tags":["Tags"]}},"/tags/{tagId}/groups":{"delete":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the tag","format":"int64","in":"path","name":"tagId","required":true,"type":"integer"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Delete the association of this tag with all groups","tags":["Tags"]},"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the tag.","format":"int64","in":"path","name":"tagId","required":true,"type":"integer"},{"default":0,"description":"Where to start when retrieving elements. Default is 0 if not specified.","format":"int32","in":"query","minLength":0,"name":"offset","required":false,"type":"integer"},{"default":20,"description":"Maximum elements to retrieve. Default to 20 if not specified.","format":"int32","in":"query","maxLength":0,"minLength":0,"name":"limit","required":false,"type":"integer"},{"description":"Status of the datapoint","enum":["deleted","active"],"in":"query","name":"status","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Exclude groups created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude groups created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"}],"produces":["application/json","text/json"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"List of all the groups associated to the user filtered by this tag.","tags":["Tags"]}},"/tags/{tagId}/groups/count":{"get":{"consumes":[],"deprecated":false,"parameters":[{"description":"Id of the tag.","format":"int64","in":"path","name":"tagId","required":true,"type":"integer"},{"description":"Status of the datapoint","enum":["deleted","active"],"in":"query","name":"status","required":false,"type":"string"},{"description":"Filter fields by this pattern","in":"query","name":"textSearch","required":false,"type":"string"},{"description":"Exclude groups created before this date (YYYYMMDD)","in":"query","name":"createdAfter","required":false,"type":"string"},{"description":"Exclude groups created after this date (YYYYMMDD)","in":"query","name":"createdBefore","required":false,"type":"string"}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.CountResponce"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Count the groups associated to the user filtered by this tag","tags":["Tags"]}},"/tags/{tagId}/groups/patch":{"put":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"Id of the tag","format":"int64","in":"path","name":"tagId","required":true,"type":"integer"},{"description":"The body patch","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/Api.Core.Requests.PatchBody"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}},"summary":"Associate/Deassociate a tag with a group","tags":["Tags"]}},"/tags/{tagId}/name":{"put":{"consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"deprecated":false,"parameters":[{"description":"Id of the tag","format":"int64","in":"path","name":"tagId","required":true,"type":"integer"},{"description":"The body patch","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/Api.Core.Requests.GenericTextPatch"}}],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}},"summary":"Fast patch a tag name","tags":["Tags"]}}},"definitions":{"Api.Core.Dto.Accounting.ConversionOptions":{"properties":{"hideComCost":{"type":"boolean"},"hideCost":{"type":"boolean"},"hideCount":{"type":"boolean"},"hideParams":{"type":"boolean"},"hideValue":{"type":"boolean"},"percentCommission":{"format":"int32","type":"integer"},"percentValue":{"format":"int32","type":"integer"}},"type":"object"},"Api.Core.Dto.Accounting.DomainWhitelistEntry":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"type":"object"},"Api.Core.Dto.Accounting.ExtendedGrants":{"properties":{"allowAllGrants":{"type":"boolean"},"allowGroupCreation":{"type":"boolean"}},"type":"object"},"Api.Core.Dto.Accounting.Guest":{"properties":{"apiKey":{"type":"string"},"conversionOptions":{"$ref":"#/definitions/Api.Core.Dto.Accounting.ConversionOptions"},"creationDate":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"currentGrant":{"$ref":"#/definitions/Api.Core.Dto.Grants.Grant"},"dateFormat":{"type":"string"},"decimalSeparator":{"type":"string"},"email":{"type":"string"},"extendedGrants":{"$ref":"#/definitions/Api.Core.Dto.Accounting.ExtendedGrants"},"groupGrants":{"format":"int64","type":"integer"},"hitOptions":{"$ref":"#/definitions/Api.Core.Dto.Accounting.HitOptions"},"id":{"format":"int64","type":"integer"},"key":{"type":"string"},"language":{"type":"string"},"loginCount":{"format":"int32","type":"integer"},"name":{"type":"string"},"notes":{"type":"string"},"numberGroupSeparator":{"type":"string"},"password":{"type":"string"},"timeFormat":{"enum":["AmPm","H24"],"type":"string"},"timeZone":{"format":"int32","type":"integer"},"timeframeMinDate":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"timezonename":{"type":"string"},"tlGrants":{"format":"int64","type":"integer"},"tpGrants":{"format":"int64","type":"integer"},"userName":{"type":"string"}},"type":"object"},"Api.Core.Dto.Accounting.HitOptions":{"properties":{"hideReferrer":{"type":"boolean"}},"type":"object"},"Api.Core.Dto.Accounting.IpBlacklistEntry":{"properties":{"id":{"type":"string"},"ip":{"type":"string"}},"type":"object"},"Api.Core.Dto.Accounting.Plan":{"properties":{"allowedPersonalDomains":{"format":"int32","type":"integer"},"allowedPersonalUrls":{"format":"int32","type":"integer"},"billingPeriodEnd":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"billingPeriodStart":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"bonusMonthlyEvents":{"format":"int64","type":"integer"},"maximumDatapoints":{"format":"int64","type":"integer"},"maximumGuests":{"format":"int64","type":"integer"},"monthlyEvents":{"format":"int64","type":"integer"},"name":{"type":"string"},"price":{"format":"double","type":"number"},"profileId":{"format":"int64","type":"integer"},"recurring":{"type":"boolean"},"recurringPeriod":{"format":"int32","type":"integer"},"usedDatapoints":{"format":"int64","type":"integer"},"usedMonthlyEvents":{"format":"int64","type":"integer"}},"type":"object"},"Api.Core.Dto.Accounting.User":{"properties":{"boGoVal":{"type":"string"},"bonusClicks":{"format":"int64","type":"integer"},"companyName":{"type":"string"},"companyRole":{"type":"string"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"},"redirectOnly":{"type":"boolean"},"registrationDate":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"timeframeMinDate":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"timezone":{"format":"int32","type":"integer"},"timezonename":{"type":"string"}},"type":"object"},"Api.Core.Dto.Aggregated.AggregatedResult":{"properties":{"activityDay":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"commissionsCost":{"format":"double","type":"number"},"conversionsCost":{"format":"double","type":"number"},"conversionsValue":{"format":"double","type":"number"},"convertedClicks":{"format":"int64","type":"integer"},"entityData":{"$ref":"#/definitions/System.Object"},"entityId":{"type":"string"},"fromDay":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"hourlyBreakDown":{"additionalProperties":{"$ref":"#/definitions/Api.Core.Dto.Aggregated.AggregatedResult"},"type":"object"},"lastHitDate":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"spiderHitsCount":{"format":"int64","type":"integer"},"toDay":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"totalClicks":{"format":"int64","type":"integer"},"totalViews":{"format":"int64","type":"integer"},"uniqueClicks":{"format":"int64","type":"integer"},"uniqueConversions":{"format":"int64","type":"integer"},"uniqueViews":{"format":"int64","type":"integer"}},"type":"object"},"Api.Core.Dto.Aggregated.AggregatedSummaryResult":{"properties":{"count":{"format":"int64","type":"integer"},"limit":{"format":"int32","type":"integer"},"offset":{"format":"int64","type":"integer"},"result":{"items":{"$ref":"#/definitions/Api.Core.Dto.Aggregated.AggregatedResult"},"type":"array"}},"type":"object"},"Api.Core.Dto.ClickStream.Hit":{"properties":{"accessTime":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"browser":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.HitBrowserInfo"},"clientLanguage":{"type":"string"},"conversion1":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.HitConversionInfo"},"conversion2":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.HitConversionInfo"},"conversion3":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.HitConversionInfo"},"conversion4":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.HitConversionInfo"},"conversion5":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.HitConversionInfo"},"conversions":{"items":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.HitConversionInfo"},"type":"array"},"entity":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.HitDatapointInfo"},"ip":{"type":"string"},"isProxy":{"type":"string"},"isSpider":{"type":"string"},"isUnique":{"type":"string"},"location":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.HitLocationInfo"},"org":{"type":"string"},"os":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.HitOsInfo"},"queryParams":{"type":"string"},"realDestinationUrl":{"type":"string"},"referer":{"type":"string"},"source":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.HitSource"},"type":{"type":"string"}},"type":"object"},"Api.Core.Dto.ClickStream.HitBrowserInfo":{"properties":{"browserType":{"type":"string"},"familyId":{"format":"int64","type":"integer"},"familyName":{"type":"string"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"}},"type":"object"},"Api.Core.Dto.ClickStream.HitConversionInfo":{"properties":{"accessTime":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"comcost":{"format":"double","type":"number"},"cost":{"format":"double","type":"number"},"date":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"deleted":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"parameter":{"type":"string"},"value":{"format":"double","type":"number"}},"type":"object"},"Api.Core.Dto.ClickStream.HitDatapointInfo":{"properties":{"creationDate":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"datapointFavourite":{"type":"boolean"},"datapointId":{"format":"int64","type":"integer"},"datapointName":{"type":"string"},"datapointTitle":{"type":"string"},"datapointType":{"type":"string"},"destinationUrl":{"type":"string"},"groupId":{"format":"int64","type":"integer"},"groupName":{"type":"string"},"isABTest":{"type":"boolean"},"isPrivateShared":{"type":"boolean"},"isPublic":{"type":"boolean"},"notes":{"type":"string"},"status":{"enum":["Active","Paused","Abuse","Deleted"],"type":"string"},"tags":{"items":{"$ref":"#/definitions/Api.Core.Dto.Tags.Tag"},"type":"array"},"trackingCode":{"type":"string"}},"type":"object"},"Api.Core.Dto.ClickStream.HitListPage":{"properties":{"hits":{"items":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.Hit"},"type":"array"},"lastKey":{"type":"string"}},"type":"object"},"Api.Core.Dto.ClickStream.HitLocationInfo":{"properties":{"areacode":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"latitude":{"format":"double","type":"number"},"longitude":{"format":"double","type":"number"},"metrocode":{"type":"string"},"organization":{"type":"string"},"postalcode":{"type":"string"},"region":{"type":"string"},"regionName":{"type":"string"}},"type":"object"},"Api.Core.Dto.ClickStream.HitOsInfo":{"properties":{"familyId":{"format":"int64","type":"integer"},"familyName":{"type":"string"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"}},"type":"object"},"Api.Core.Dto.ClickStream.HitSource":{"properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"param":{"type":"string"}},"type":"object"},"Api.Core.Dto.Conversions.Conversion":{"properties":{"code":{"type":"string"},"creationDate":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"deleted":{"type":"boolean"},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"protocol":{"enum":["Http","Https"],"type":"string"},"value":{"format":"double","type":"number"}},"type":"object"},"Api.Core.Dto.Datapoints.BrowserBaseDestinationItem":{"properties":{"emailDestinationUrl":{"type":"string"},"mobileDestinationUrl":{"type":"string"},"spidersDestinationUrl":{"type":"string"}},"type":"object"},"Api.Core.Dto.Datapoints.Datapoint":{"properties":{"creationDate":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"encodeIp":{"type":"boolean"},"fifthConversionId":{"format":"int64","type":"integer"},"fifthConversionName":{"type":"string"},"firstConversionId":{"format":"int64","type":"integer"},"firstConversionName":{"type":"string"},"fourthConversionId":{"format":"int64","type":"integer"},"fourthConversionName":{"type":"string"},"groupId":{"format":"int64","type":"integer"},"groupName":{"type":"string"},"id":{"format":"int64","type":"integer"},"isPublic":{"type":"boolean"},"isSecured":{"type":"boolean"},"lightTracking":{"type":"boolean"},"name":{"type":"string"},"notes":{"type":"string"},"preferred":{"type":"boolean"},"redirectOnly":{"type":"boolean"},"secondConversionId":{"format":"int64","type":"integer"},"secondConversionName":{"type":"string"},"status":{"enum":["Active","Paused","Abuse","Deleted"],"type":"string"},"tags":{"items":{"$ref":"#/definitions/Api.Core.Dto.Tags.Tag"},"type":"array"},"thirdConversionId":{"format":"int64","type":"integer"},"thirdConversionName":{"type":"string"},"title":{"type":"string"},"trackingCode":{"type":"string"},"type":{"enum":["TrackingLink","TrackingPixel"],"type":"string"},"typeTL":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.TrackingLinkSpecifics"},"typeTP":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.TrackingPixelSpecifics"},"writePermited":{"type":"boolean"}},"type":"object"},"Api.Core.Dto.Datapoints.DatapointRetargetingInfo":{"properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"}},"type":"object"},"Api.Core.Dto.Datapoints.MultipleDestinationItem":{"properties":{"url":{"type":"string"}},"type":"object"},"Api.Core.Dto.Datapoints.TrackingLinkSpecifics":{"properties":{"appendQuery":{"type":"boolean"},"browserDestinationItem":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.BrowserBaseDestinationItem"},"destinationMode":{"enum":["Simple","RandomDestination","DestinationByLanguage","SpilloverDestination","DynamicUrl","BrowserDestination","DestinationByNation","UniqueDestination","SequentialDestination","WeightedDestination"],"type":"string"},"domainId":{"format":"int32","type":"integer"},"encodeUrl":{"type":"boolean"},"expirationClicks":{"format":"int64","type":"integer"},"expirationDate":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"firstUrl":{"type":"string"},"goDomainId":{"format":"int32","type":"integer"},"hideUrl":{"type":"boolean"},"hideUrlTitle":{"type":"string"},"isABTest":{"type":"boolean"},"password":{"type":"string"},"pauseAfterClicksExpiration":{"type":"boolean"},"pauseAfterDateExpiration":{"type":"boolean"},"randomDestinationItems":{"items":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.MultipleDestinationItem"},"type":"array"},"redirectType":{"enum":["PermanentRedirect","TemporaryRedirect"],"type":"string"},"referrerClean":{"enum":["None","Clean","Myself"],"type":"string"},"scripts":{"items":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.DatapointRetargetingInfo"},"type":"array"},"sequentialDestinationItems":{"items":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.MultipleDestinationItem"},"type":"array"},"spilloverDestinationItems":{"items":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.MultipleDestinationItem"},"type":"array"},"uniqueDestinationItem":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.UniqueDestinationItem"},"url":{"type":"string"},"urlAfterClicksExpiration":{"type":"string"},"urlAfterDateExpiration":{"type":"string"},"urlsByLanguage":{"items":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.UrlByLanguageItem"},"type":"array"},"urlsByNation":{"items":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.UrlByNationItem"},"type":"array"},"weightedDestinationItems":{"items":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.WeightedDestinationItem"},"type":"array"}},"type":"object"},"Api.Core.Dto.Datapoints.TrackingPixelSpecifics":{"properties":{"parameterNote":{"type":"string"}},"type":"object"},"Api.Core.Dto.Datapoints.UniqueDestinationItem":{"properties":{"firstDestinationUrl":{"type":"string"}},"type":"object"},"Api.Core.Dto.Datapoints.UrlByLanguageItem":{"properties":{"languageCode":{"type":"string"},"url":{"type":"string"}},"type":"object"},"Api.Core.Dto.Datapoints.UrlByNationItem":{"properties":{"nation":{"type":"string"},"url":{"type":"string"}},"type":"object"},"Api.Core.Dto.Datapoints.WeightedDestinationItem":{"properties":{"url":{"type":"string"},"weight":{"format":"int32","type":"integer"}},"type":"object"},"Api.Core.Dto.Domains.Domain":{"properties":{"custom404":{"type":"string"},"customHomepage":{"type":"string"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"type":{"enum":["System","Go","Dedicated","Personal"],"type":"string"}},"type":"object"},"Api.Core.Dto.EntityUriLong":{"properties":{"id":{"format":"int64","type":"integer"},"uri":{"type":"string"}},"type":"object"},"Api.Core.Dto.Grants.Grant":{"properties":{"DatapointType":{"type":"string"},"Entity":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"},"EntityName":{"type":"string"},"EntityType":{"type":"string"},"Type":{"type":"string"}},"type":"object"},"Api.Core.Dto.Groups.Group":{"properties":{"creationDate":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"deleted":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"isPublic":{"type":"boolean"},"name":{"type":"string"},"notes":{"type":"string"},"preferred":{"type":"boolean"},"redirectOnly":{"type":"boolean"},"tags":{"items":{"$ref":"#/definitions/Api.Core.Dto.Tags.Tag"},"type":"array"},"writePermited":{"type":"boolean"}},"type":"object"},"Api.Core.Dto.Retargeting.RetargetingScript":{"properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"script":{"type":"string"}},"type":"object"},"Api.Core.Dto.Tags.Tag":{"properties":{"datapoints":{"items":{"format":"int64","type":"integer"},"type":"array"},"groups":{"items":{"format":"int64","type":"integer"},"type":"array"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"}},"type":"object"},"Api.Core.Dto.Tops.Top":{"properties":{"createdAt":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"data":{"items":{"$ref":"#/definitions/Api.Core.Dto.Tops.TopItem"},"type":"array"},"key":{"type":"string"}},"type":"object"},"Api.Core.Dto.Tops.TopItem":{"properties":{"entityData":{"$ref":"#/definitions/System.Object"},"id":{"type":"string"},"lastHitDate":{"description":" (A date in \"YmdHis\" format)","example":"20120203120530","type":"string"},"spiderClicks":{"format":"int64","type":"integer"},"spiderHits":{"format":"int64","type":"integer"},"spiderViews":{"format":"int64","type":"integer"},"totalClicks":{"format":"int64","type":"integer"},"totalCommissionsCost":{"format":"double","type":"number"},"totalConversions":{"format":"int64","type":"integer"},"totalConversionsCost":{"format":"double","type":"number"},"totalConversionsValue":{"format":"double","type":"number"},"totalHits":{"format":"int64","type":"integer"},"totalViews":{"format":"int64","type":"integer"},"uniqueClicks":{"format":"int64","type":"integer"},"uniqueHits":{"format":"int64","type":"integer"},"uniqueViews":{"format":"int64","type":"integer"}},"type":"object"},"Api.Core.Requests.ConversionPatchBody":{"properties":{"Action":{"type":"string"},"Id":{"format":"int64","type":"integer"},"ReplaceId":{"format":"int64","type":"integer"}},"type":"object"},"Api.Core.Requests.DatapointsBatch":{"properties":{"List":{"items":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.Datapoint"},"type":"array"}},"type":"object"},"Api.Core.Requests.DeleteBatch":{"properties":{"Entities":{"items":{"$ref":"#/definitions/Api.Core.Dto.EntityUriLong"},"type":"array"}},"type":"object"},"Api.Core.Requests.GenericTextPatch":{"properties":{"Text":{"type":"string"}},"type":"object"},"Api.Core.Requests.PatchBody":{"properties":{"Action":{"type":"string"},"Id":{"format":"int64","type":"integer"}},"type":"object"},"Api.Core.Requests.PatchBodyBatch":{"properties":{"PatchRequests":{"items":{"$ref":"#/definitions/Api.Core.Requests.PatchBody"},"type":"array"}},"type":"object"},"Api.Core.Requests.PermissionPatchRequest":{"properties":{"Action":{"type":"string"},"Id":{"format":"int64","type":"integer"},"Verb":{"type":"string"}},"type":"object"},"Api.Core.Responses.CountResponce":{"properties":{"count":{"format":"int64","type":"integer"}},"type":"object"},"Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Accounting.DomainWhitelistEntry]":{"properties":{"entities":{"items":{"$ref":"#/definitions/Api.Core.Dto.Accounting.DomainWhitelistEntry"},"type":"array"}},"type":"object"},"Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Accounting.IpBlacklistEntry]":{"properties":{"entities":{"items":{"$ref":"#/definitions/Api.Core.Dto.Accounting.IpBlacklistEntry"},"type":"array"}},"type":"object"},"Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]":{"properties":{"entities":{"items":{"$ref":"#/definitions/Api.Core.Dto.Aggregated.AggregatedResult"},"type":"array"}},"type":"object"},"Api.Core.Responses.EntitiesResponse[Api.Core.Dto.ClickStream.Hit]":{"properties":{"entities":{"items":{"$ref":"#/definitions/Api.Core.Dto.ClickStream.Hit"},"type":"array"}},"type":"object"},"Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Grants.Grant]":{"properties":{"entities":{"items":{"$ref":"#/definitions/Api.Core.Dto.Grants.Grant"},"type":"array"}},"type":"object"},"Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]":{"properties":{"entities":{"items":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"},"type":"array"}},"type":"object"},"Api.Core.Responses.EntityUri[System.Int64]":{"properties":{"id":{"format":"int64","type":"integer"},"uri":{"type":"string"}},"type":"object"},"Api.Core.Responses.ModifyBatchItemResponce[Api.Core.Dto.Datapoints.Datapoint,System.Int64]":{"properties":{"entityData":{"$ref":"#/definitions/Api.Core.Dto.Datapoints.Datapoint"},"errors":{"items":{"$ref":"#/definitions/ClickMeter.Infrastructure.Validation.ValidationFailure"},"type":"array"},"result":{"$ref":"#/definitions/Api.Core.Responses.EntityUri[System.Int64]"},"status":{"type":"string"}},"type":"object"},"ClickMeter.Infrastructure.Validation.ValidationFailure":{"properties":{"code":{"$ref":"#/definitions/System.Object"},"errorMessage":{"type":"string"},"errorValue":{"$ref":"#/definitions/System.Object"},"property":{"type":"string"}},"type":"object"},"System.Object":{"properties":{},"type":"object"}}} validate-0.24.0/fixtures/go-swagger/expansion/clickmeter.yaml000066400000000000000000005257321457312750000243350ustar00rootroot00000000000000swagger: '2.0' schemes: - http - https host: 'apiv2.clickmeter.com:80' info: contact: email: api@clickmeter.com name: Api Support url: 'http://www.clickmeter.com/api' description: Api dashboard for ClickMeter API title: ClickMeter version: v2 x-logo: url: 'https://s3.amazonaws.com/clickmeter.com/Web/static/cmlogo.svg' x-origin: format: swagger url: 'http://api.v2.clickmeter.com.s3.amazonaws.com/docs/api-docs-v2.json' version: '2.0' x-providerName: clickmeter.com securityDefinitions: api_key: description: API Key Authentication in: header name: X-Clickmeter-AuthKey type: apiKey security: - api_key: [] paths: /account: get: consumes: [] deprecated: false produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Accounting.User' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve current account data tags: - Account post: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Accounting.User' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Accounting.User' '401': description: Unauthorized '500': description: Internal Server Error summary: Update current account data tags: - Account /account/domainwhitelist: get: consumes: [] deprecated: false parameters: - description: Offset where to start from format: int32 in: query minLength: 0 name: offset required: false type: integer - description: Limit results to this number format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Accounting.DomainWhitelistEntry]' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve list of a domains allowed to redirect in DDU mode tags: - Account post: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: The entry to add in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Accounting.DomainWhitelistEntry' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Accounting.DomainWhitelistEntry' '401': description: Unauthorized '500': description: Internal Server Error summary: Create an domain entry tags: - Account '/account/domainwhitelist/{whitelistId}': delete: consumes: [] deprecated: false parameters: - description: The id of the domain to delete in: path name: whitelistId required: true type: string produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Accounting.DomainWhitelistEntry' '401': description: Unauthorized '500': description: Internal Server Error summary: Delete an domain entry tags: - Account /account/guests: get: consumes: [] deprecated: false parameters: - description: Offset where to start from format: int32 in: query minLength: 0 name: offset required: false type: integer - description: Limit results to this number format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: Field to sort by in: query name: sortBy required: false type: string - description: 'Direction of sort "asc" or "desc"' enum: - asc - desc in: query name: sortDirection required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve list of a guest tags: - Account post: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: Guest object to create in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Accounting.Guest' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Accounting.Guest' '401': description: Unauthorized '500': description: Internal Server Error summary: Create a guest tags: - Account /account/guests/count: get: consumes: [] deprecated: false parameters: - description: Filter fields by this pattern in: query name: textSearch required: false type: string produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.CountResponce' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve count of guests tags: - Account '/account/guests/{guestId}': delete: consumes: [] deprecated: false parameters: - description: Id of the guest format: int64 in: path name: guestId required: true type: integer produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '500': description: Internal Server Error summary: Delete a guest tags: - Account get: consumes: [] deprecated: false parameters: - description: Id of the guest format: int64 in: path name: guestId required: true type: integer produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Accounting.Guest' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve a guest tags: - Account post: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: Id of the guest format: int64 in: path name: guestId required: true type: integer - description: Guest object with field updated in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Accounting.Guest' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Accounting.Guest' '401': description: Unauthorized '500': description: Internal Server Error summary: Update a guest tags: - Account '/account/guests/{guestId}/permissions': get: consumes: [] deprecated: false parameters: - description: Id of the guest format: int64 in: path name: guestId required: true type: integer - description: 'Can be "datapoint" or "group"' enum: - datapoint - group in: query name: entityType required: false type: string - description: Offset where to start from format: int32 in: query minLength: 0 name: offset required: false type: integer - description: Limit results to this number format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: 'Can be "w" or "r"' enum: - r - w in: query name: type required: false type: string - description: Optional id of the datapoint/group entity to filter by format: int64 in: query name: entityId required: false type: integer produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Grants.Grant]' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve permissions for a guest tags: - Account '/account/guests/{guestId}/permissions/count': get: consumes: [] deprecated: false parameters: - description: Id of the guest format: int64 in: path name: guestId required: true type: integer - description: 'Can be "datapoint" or "group"' enum: - datapoint - group in: query name: entityType required: false type: string - description: 'Can be "w" or "r"' enum: - r - w in: query name: type required: false type: string - description: Optional id of the datapoint/group entity to filter by format: int64 in: query name: entityId required: false type: integer produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.CountResponce' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve count of the permissions for a guest tags: - Account '/account/guests/{guestId}/{type}/permissions/patch': post: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: Id of the guest format: int64 in: path name: guestId required: true type: integer - description: 'Can be "datapoint" or "group"' enum: - datapoint - group in: path name: type required: true type: string - description: The patch permission request in: body name: body required: true schema: $ref: '#/definitions/Api.Core.Requests.PermissionPatchRequest' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '500': description: Internal Server Error summary: Change the permission on a shared object tags: - Account put: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: Id of the guest format: int64 in: path name: guestId required: true type: integer - description: 'Can be "datapoint" or "group"' enum: - datapoint - group in: path name: type required: true type: string - description: The patch permission request in: body name: body required: true schema: $ref: '#/definitions/Api.Core.Requests.PermissionPatchRequest' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '500': description: Internal Server Error summary: Change the permission on a shared object tags: - Account /account/ipblacklist: get: consumes: [] deprecated: false parameters: - description: Offset where to start from format: int32 in: query minLength: 0 name: offset required: false type: integer - description: Limit results to this number format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Accounting.IpBlacklistEntry]' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve list of a ip to exclude from event tracking tags: - Account post: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: The entry to add in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Accounting.IpBlacklistEntry' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Accounting.IpBlacklistEntry' '401': description: Unauthorized '500': description: Internal Server Error summary: Create an ip blacklist entry tags: - Account '/account/ipblacklist/{blacklistId}': delete: consumes: [] deprecated: false parameters: - description: The id of the ip to delete in: path name: blacklistId required: true type: string produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Accounting.IpBlacklistEntry' '401': description: Unauthorized '500': description: Internal Server Error summary: Delete an ip blacklist entry tags: - Account /account/plan: get: consumes: [] deprecated: false produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Accounting.Plan' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve current account plan tags: - Account /aggregated: get: consumes: [] deprecated: false parameters: - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'If using "yesterday" or "today" timeframe you can ask for the hourly detail' in: query name: hourly required: false type: boolean - description: '' in: query name: onlyFavorites required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Aggregated.AggregatedResult' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about this customer for a timeframe tags: - Aggregated /aggregated/list: get: consumes: [] deprecated: false parameters: - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'The temporal entity you want to group by ("week"/"month"). If unspecified is "day".' enum: - week - month in: query name: groupBy required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about this customer for a timeframe grouped by some temporal entity (day/week/month) tags: - Aggregated /aggregated/summary/conversions: get: consumes: [] deprecated: false parameters: - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'Status of conversion ("deleted"/"active")' enum: - deleted - active in: query name: status required: false type: string - description: Field to sort by in: query name: sortBy required: false type: string - description: 'Direction of sort "asc" or "desc"' enum: - asc - desc in: query name: sortDirection required: false type: string - description: Offset where to start from format: int32 in: query minLength: 0 name: offset required: false type: integer - description: Limit results to this number format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: Filter fields by this pattern in: query name: textSearch required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Aggregated.AggregatedSummaryResult' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about a subset of conversions for a timeframe with conversions data tags: - Aggregated /aggregated/summary/datapoints: get: consumes: [] deprecated: false parameters: - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'Type of datapoint ("tl"/"tp")' enum: - tp - tl in: query name: type required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'Status of datapoint ("deleted"/"active"/"paused"/"spam")' enum: - deleted - active - paused - spam in: query name: status required: false type: string - description: A comma separated list of tags you want to filter with. in: query name: tag required: false type: string - description: Is the datapoint marked as favourite in: query name: favourite required: false type: boolean - description: Field to sort by in: query name: sortBy required: false type: string - description: 'Direction of sort "asc" or "desc"' enum: - asc - desc in: query name: sortDirection required: false type: string - description: Offset where to start from format: int32 in: query minLength: 0 name: offset required: false type: integer - description: Limit results to this number format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: Filter by this group id format: int64 in: query name: groupId required: false type: integer - description: Filter fields by this pattern in: query name: textSearch required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Aggregated.AggregatedSummaryResult' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about a subset of datapoints for a timeframe with datapoints data tags: - Aggregated /aggregated/summary/groups: get: consumes: [] deprecated: false parameters: - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'Status of group ("deleted"/"active")' enum: - deleted - active in: query name: status required: false type: string - description: A comma separated list of tags you want to filter with. in: query name: tag required: false type: string - description: Is the group marked as favourite in: query name: favourite required: false type: boolean - description: Field to sort by in: query name: sortBy required: false type: string - description: 'Direction of sort "asc" or "desc"' enum: - asc - desc in: query name: sortDirection required: false type: string - description: Offset where to start from format: int32 in: query minLength: 0 name: offset required: false type: integer - description: Limit results to this number format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: Filter fields by this pattern in: query name: textSearch required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Aggregated.AggregatedSummaryResult' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about a subset of groups for a timeframe with groups data tags: - Aggregated /clickstream: get: consumes: [] deprecated: false parameters: - description: 'Filter by this group id (mutually exclusive with "datapoint" and "conversion")' format: int64 in: query name: group required: false type: integer - description: 'Filter by this datapoint id (mutually exclusive with "group" and "conversion")' format: int64 in: query name: datapoint required: false type: integer - description: 'Filter by this conversion id (mutually exclusive with "datapoint" and "group")' format: int64 in: query name: conversion required: false type: integer - default: 50 description: Limit results to this number format: int32 in: query name: pageSize required: false type: integer - description: 'Filter event type ("spiders"/"uniques"/"nonuniques"/"conversions")' enum: - '' - spiders - uniques - nonuniques - conversions in: query name: filter required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.ClickStream.Hit]' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve the latest list of events of this account. Limited to last 100. tags: - ClickStream /conversions: get: consumes: [] deprecated: false parameters: - description: Offset where to start from format: int32 in: query minLength: 0 name: offset required: false type: integer - description: Limit results to this number format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: 'Status of conversion ("deleted"/"active")' enum: - deleted - active in: query name: status required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Exclude conversions created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude conversions created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve a list of conversions tags: - Conversions post: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: The body of the conversion in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Conversions.Conversion' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Create a conversion tags: - Conversions /conversions/aggregated/list: get: consumes: [] deprecated: false parameters: - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'Status of conversion ("deleted"/"active")' enum: - deleted - active in: query name: status required: false type: string - description: 'The temporal entity you want to group by ("week"/"month"). If unspecified is "day".' enum: - week - month in: query name: groupBy required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about this customer for a timeframe related to a subset of conversions grouped by some temporal entity (day/week/month) tags: - Conversions /conversions/count: get: consumes: [] deprecated: false parameters: - description: 'Status of conversion ("deleted"/"active")' enum: - deleted - active in: query name: status required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Exclude conversions created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude conversions created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.CountResponce' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve a count of conversions tags: - Conversions '/conversions/{conversionId}': delete: consumes: [] deprecated: false parameters: - description: Id of the conversion format: int64 in: path name: conversionId required: true type: integer produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Delete conversion specified by id tags: - Conversions get: consumes: [] deprecated: false parameters: - description: Id of the conversion format: int64 in: path name: conversionId required: true type: integer produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Conversions.Conversion' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Retrieve conversion specified by id tags: - Conversions post: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: Id of the conversion format: int64 in: path name: conversionId required: true type: integer - description: Updated body of the conversion in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Conversions.Conversion' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Update conversion specified by id tags: - Conversions '/conversions/{conversionId}/aggregated': get: consumes: [] deprecated: false parameters: - description: Id of the conversion format: int64 in: path name: conversionId required: true type: integer - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: Filter by this tag name in: query name: tag required: false type: string - description: Is the datapoint marked as favourite in: query name: favourite required: false type: boolean - description: 'If using "yesterday" or "today" timeframe you can ask for the hourly detail' in: query name: hourly required: false type: boolean produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Aggregated.AggregatedResult' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about this conversion for a timeframe tags: - Conversions '/conversions/{conversionId}/aggregated/list': get: consumes: [] deprecated: false parameters: - description: Id of the conversion format: int64 in: path name: conversionId required: true type: integer - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'The temporal entity you want to group by ("week"/"month"). If unspecified is "day".' enum: - week - month in: query name: groupBy required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about this conversion for a timeframe grouped by some temporal entity (day/week/month) tags: - Conversions '/conversions/{conversionId}/datapoints': get: consumes: [] deprecated: false parameters: - description: Id of the conversion format: int64 in: path name: conversionId required: true type: integer - description: Offset where to start from format: int32 in: query minLength: 0 name: offset required: false type: integer - description: Limit results to this number format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: 'Type of datapoint ("tl"/"tp")' enum: - tp - tl in: query name: type required: false type: string - description: 'Status of datapoint ("deleted"/"active"/"paused"/"spam")' enum: - deleted - active - paused - spam in: query name: status required: false type: string - description: Filter by this tag name in: query name: tags required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Exclude datapoints created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude datapoints created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve a list of datapoints connected to this conversion tags: - Conversions '/conversions/{conversionId}/datapoints/batch/patch': put: consumes: - application/json - text/json - application/x-www-form-urlencoded deprecated: false parameters: - description: Id of the conversion format: int64 in: path name: conversionId required: true type: integer - description: Patch requests in: body name: data required: true schema: $ref: '#/definitions/Api.Core.Requests.PatchBodyBatch' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Modify the association between a conversion and multiple datapoints tags: - Conversions '/conversions/{conversionId}/datapoints/count': get: consumes: [] deprecated: false parameters: - description: Id of the conversion format: int64 in: path name: conversionId required: true type: integer - description: 'Type of datapoint ("tl"/"tp")' in: query name: type required: false type: string - description: 'Status of datapoint ("deleted"/"active"/"paused"/"spam")' in: query name: status required: false type: string - description: Filter by this tag name in: query name: tags required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Exclude datapoints created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude datapoints created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.CountResponce' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve a count of datapoints connected to this conversion tags: - Conversions '/conversions/{conversionId}/datapoints/patch': put: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: Id of the conversion format: int64 in: path name: conversionId required: true type: integer - description: Patch request in: body name: data required: true schema: $ref: '#/definitions/Api.Core.Requests.ConversionPatchBody' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Modify the association between a conversion and a datapoint tags: - Conversions '/conversions/{conversionId}/hits': get: consumes: [] deprecated: false parameters: - description: Id of the conversion format: int64 in: path name: conversionId required: true type: integer - description: Timeframe of the request. See list at $timeframeList enum: - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - custom in: query name: timeframe required: true type: string - description: Limit results to this number format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: "Offset where to start from (it's the lastKey field in the response object)" in: query name: offset required: false type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'Filter event type ("spiders"/"uniques"/"nonuniques"/"conversions")' enum: - spiders - uniques - nonuniques - conversions in: query name: filter required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.ClickStream.HitListPage' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve the list of events related to this conversion. tags: - Conversions '/conversions/{conversionId}/notes': put: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: Id of the conversion format: int64 in: path name: conversionId required: true type: integer - description: Patch requests in: body name: note required: true schema: $ref: '#/definitions/Api.Core.Requests.GenericTextPatch' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '403': description: Forbidden '404': description: Not found '500': description: Internal Server Error summary: 'Fast patch the "notes" field of a conversion' tags: - Conversions '/conversions/{conversionId}/reports': get: consumes: [] deprecated: false parameters: - description: Id of the conversion format: int64 in: path name: conversionId required: true type: integer - description: Type of the report. enum: - datapoints - groups - browsers - browsersfamilies - platforms - cities - countries - keywords - referrers - convparameters - destinations - languages - params in: query name: type required: true type: string - description: Timeframe of the request. See list at $timeframeList enum: - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - beginning - custom in: query name: timeframe required: true type: string - description: Type of the event you want to filter this report with. By default no filter is applied. enum: - clicks - views in: query name: hittype required: false type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Tops.Top' '401': description: Forbidden '404': description: Not found '500': description: Internal Server Error summary: Retrieve a top report connected to this conversion tags: - Conversions /datapoints: get: consumes: [] deprecated: false parameters: - default: 0 description: Where to start when retrieving elements. Default is 0 if not specified. format: int32 in: query minLength: 0 name: offset required: false type: integer - default: 20 description: Maximum elements to retrieve. Default to 20 if not specified. format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: 'Type of the datapoint ("tp"/"tl")' enum: - tp - tl in: query name: type required: false type: string - description: Status of the datapoint enum: - deleted - active - paused - spam in: query name: status required: false type: string - description: A comma separated list of tags you want to filter with. in: query name: tags required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Filter fields by favourite status in: query name: onlyFavorites required: false type: boolean - description: Field to sort by in: query name: sortBy required: false type: string - description: 'Direction of sort "asc" or "desc"' enum: - asc - desc in: query name: sortDirection required: false type: string - description: Exclude datapoints created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude datapoints created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: List of all the datapoints associated to the user tags: - DataPoints post: consumes: - application/json - text/json - application/x-www-form-urlencoded deprecated: false parameters: - description: The body of the datapoint in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Datapoints.Datapoint' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Create a datapoint tags: - DataPoints /datapoints/aggregated: get: consumes: [] deprecated: false parameters: - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'Type of datapoint ("tl"/"tp")' enum: - tp - tl in: query name: type required: false type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'If using "yesterday" or "today" timeframe you can ask for the hourly detail' in: query name: hourly required: false type: boolean - description: 'Status of datapoint ("deleted"/"active"/"paused"/"spam")' enum: - deleted - active - paused - spam in: query name: status required: false type: string - description: A comma separated list of tags you want to filter with. in: query name: tag required: false type: string - description: Is the datapoint is marked as favourite in: query name: favourite required: false type: boolean produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Aggregated.AggregatedResult' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about this customer for a timeframe by groups tags: - DataPoints /datapoints/aggregated/list: get: consumes: [] deprecated: false parameters: - description: 'Type of datapoint ("tl"/"tp")' enum: - tp - tl in: query name: type required: true type: string - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'Status of datapoint ("deleted"/"active"/"paused"/"spam")' enum: - deleted - active - paused - spam in: query name: status required: false type: string - description: A comma separated list of tags you want to filter with. in: query name: tag required: false type: string - description: Is the datapoint is marked as favourite in: query name: favourite required: false type: boolean - description: 'The temporal entity you want to group by ("week"/"month"). If unspecified is "day".' enum: - week - month in: query name: groupBy required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about all datapoints of this customer for a timeframe grouped by some temporal entity (day/week/month) tags: - DataPoints /datapoints/batch: delete: consumes: - application/json - text/json - application/x-www-form-urlencoded deprecated: false parameters: - description: A json containing the datapoints to delete. in: body name: batch required: true schema: $ref: '#/definitions/Api.Core.Requests.DeleteBatch' produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.ModifyBatchItemResponce[Api.Core.Dto.Datapoints.Datapoint,System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Delete multiple datapoints tags: - DataPoints post: consumes: - application/json - text/json - application/x-www-form-urlencoded deprecated: false parameters: - description: A json containing the datapoints to update. in: body name: batch required: true schema: $ref: '#/definitions/Api.Core.Requests.DatapointsBatch' produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.ModifyBatchItemResponce[Api.Core.Dto.Datapoints.Datapoint,System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Update multiple datapoints tags: - DataPoints put: consumes: - application/json - text/json - application/x-www-form-urlencoded deprecated: false parameters: - description: A json containing the datapoints to create. in: body name: batch required: true schema: $ref: '#/definitions/Api.Core.Requests.DatapointsBatch' produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.ModifyBatchItemResponce[Api.Core.Dto.Datapoints.Datapoint,System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Create multiple datapoints tags: - DataPoints /datapoints/count: get: consumes: [] deprecated: false parameters: - description: 'Type of the datapoint ("tp"/"tl")' enum: - tp - tl in: query name: type required: false type: string - description: Status of the datapoint enum: - deleted - active - paused - spam in: query name: status required: false type: string - description: A comma separated list of tags you want to filter with. in: query name: tags required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Filter fields by favourite status in: query name: onlyFavorites required: false type: boolean - description: Exclude datapoints created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude datapoints created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.CountResponce' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Count the datapoints associated to the user tags: - DataPoints '/datapoints/{id}': delete: consumes: [] deprecated: false parameters: - description: The id of the datapoint format: int64 in: path name: id required: true type: integer produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Delete a datapoint tags: - DataPoints get: consumes: [] deprecated: false parameters: - description: The id of the datapoint format: int64 in: path name: id required: true type: integer produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Datapoints.Datapoint' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Get a datapoint tags: - DataPoints post: consumes: - application/json - text/json - application/x-www-form-urlencoded deprecated: false parameters: - description: The id of the datapoint format: int64 in: path name: id required: true type: integer - description: The body of the datapoint in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Datapoints.Datapoint' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Update a datapoint tags: - DataPoints '/datapoints/{id}/aggregated': get: consumes: [] deprecated: false parameters: - description: Id of the datapoint format: int64 in: path name: id required: true type: integer - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'If using "yesterday" or "today" timeframe you can ask for the hourly detail' in: query name: hourly required: false type: boolean produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Aggregated.AggregatedResult' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about this datapoint for a timeframe tags: - DataPoints '/datapoints/{id}/aggregated/list': get: consumes: [] deprecated: false parameters: - description: Id of the datapoint format: int64 in: path name: id required: true type: integer - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'The temporal entity you want to group by ("week"/"month"). If unspecified is "day".' enum: - week - month in: query name: groupBy required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about this datapoint for a timeframe grouped by some temporal entity (day/week/month) tags: - DataPoints '/datapoints/{id}/favourite': put: consumes: [] deprecated: false parameters: - description: Id of the datapoint format: int64 in: path name: id required: true type: integer produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '403': description: Forbidden '404': description: Not found '500': description: Internal Server Error summary: 'Fast switch the "favourite" field of a datapoint' tags: - DataPoints '/datapoints/{id}/hits': get: consumes: [] deprecated: false parameters: - description: Id of the datapoint format: int64 in: path name: id required: true type: integer - description: Timeframe of the request. See list at $timeframeList enum: - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - custom in: query name: timeframe required: true type: string - description: Limit results to this number format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: "Offset where to start from (it's the lastKey field in the response object)" in: query name: offset required: false type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'Filter event type ("spiders"/"uniques"/"nonuniques"/"conversions")' enum: - spiders - uniques - nonuniques - conversions in: query name: filter required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.ClickStream.HitListPage' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve the list of events related to this datapoint. tags: - DataPoints '/datapoints/{id}/notes': put: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: Id of the datapoint format: int64 in: path name: id required: true type: integer - description: Patch requests in: body name: note required: true schema: $ref: '#/definitions/Api.Core.Requests.GenericTextPatch' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '403': description: Forbidden '404': description: Not found '500': description: Internal Server Error summary: 'Fast patch the "notes" field of a datapoint' tags: - DataPoints '/datapoints/{id}/reports': get: consumes: [] deprecated: false parameters: - description: Id of the datapoint format: int64 in: path name: id required: true type: integer - description: Type of the report. enum: - browsers - browsersfamilies - platforms - cities - countries - isps - ips - oss - ossfamilies - keywords - referrers - destinations - languages - params in: query name: type required: true type: string - description: Timeframe of the request. See list at $timeframeList enum: - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - beginning - custom in: query name: timeframe required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Tops.Top' '401': description: Forbidden '404': description: Not found '500': description: Internal Server Error summary: Retrieve a top report connected to this datapoint tags: - DataPoints /domains: get: consumes: [] deprecated: false parameters: - description: Offset where to start from format: int32 in: query minLength: 0 name: offset required: false type: integer - description: Limit results to this number format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - default: system description: 'Type of domain ("system"/"go"/"personal"/"dedicated"). If not specified default is "system"' enum: - system - go - personal - dedicated in: query name: type required: false type: string - description: Filter domains with this anmen in: query name: name required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve a list of domains tags: - Domains post: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: The domain to create in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Domains.Domain' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '500': description: Internal Server Error summary: Create a domain tags: - Domains /domains/count: get: consumes: [] deprecated: false parameters: - default: system description: 'Type of domain ("system"/"go"/"personal"/"dedicated"). If not specified default is "system"' enum: - system - go - personal - dedicated in: query name: type required: false type: string - description: Filter domains with this anmen in: query name: name required: false type: string produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.CountResponce' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve count of domains tags: - Domains '/domains/{id}': delete: consumes: [] deprecated: false parameters: - description: Id of domain format: int64 in: path name: id required: true type: integer produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '500': description: Internal Server Error summary: Delete a domain tags: - Domains get: consumes: [] deprecated: false parameters: - description: Id of domain format: int64 in: path name: id required: true type: integer produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Domains.Domain' '401': description: Unauthorized '500': description: Internal Server Error summary: Get a domain tags: - Domains post: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: Id of domain format: int64 in: path name: id required: true type: integer - description: The domain to update in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Domains.Domain' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '500': description: Internal Server Error summary: Update a domain tags: - Domains /groups: get: consumes: [] deprecated: false parameters: - default: 0 description: Where to start when retrieving elements. Default is 0 if not specified. format: int32 in: query minLength: 0 name: offset required: false type: integer - default: 20 description: Maximum elements to retrieve. Default to 20 if not specified. format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: Status of the group enum: - deleted - active in: query name: status required: false type: string - description: A comma separated list of tags you want to filter with. in: query name: tags required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Exclude groups created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude groups created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string - description: Write permission in: query name: write required: false type: boolean produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: List of all the groups associated to the user. tags: - Groups post: consumes: - application/json - text/json - application/x-www-form-urlencoded deprecated: false parameters: - description: The body of the group in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Groups.Group' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Create a group tags: - Groups /groups/aggregated: get: consumes: [] deprecated: false parameters: - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'If using "yesterday" or "today" timeframe you can ask for the hourly detail' in: query name: hourly required: false type: boolean - description: 'Status of group ("deleted"/"active")' enum: - deleted - active in: query name: status required: false type: string - description: A comma separated list of tags you want to filter with. in: query name: tag required: false type: string - description: Is the group is marked as favourite in: query name: favourite required: false type: boolean produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Aggregated.AggregatedResult' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about this customer for a timeframe by groups tags: - Groups /groups/aggregated/list: get: consumes: [] deprecated: false parameters: - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'Status of group ("deleted"/"active")' in: query name: status required: false type: string - description: A comma separated list of tags you want to filter with. in: query name: tag required: false type: string - description: Is the group is marked as favourite in: query name: favourite required: false type: boolean - description: 'The temporal entity you want to group by ("week"/"month"). If unspecified is "day".' enum: - deleted - active in: query name: groupBy required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about all groups of this customer for a timeframe grouped by some temporal entity (day/week/month) tags: - Groups /groups/count: get: consumes: [] deprecated: false parameters: - description: Status of the datapoint enum: - deleted - active in: query name: status required: false type: string - description: A comma separated list of tags you want to filter with. in: query name: tags required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Exclude groups created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude groups created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string - description: Write permission in: query name: write required: false type: boolean produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.CountResponce' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Count the groups associated to the user. tags: - Groups '/groups/{id}': delete: consumes: [] deprecated: false parameters: - description: Id of the group format: int64 in: path name: id required: true type: integer produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Delete group specified by id tags: - Groups get: consumes: [] deprecated: false parameters: - description: The id of the group format: int64 in: path name: id required: true type: integer produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Groups.Group' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Get a group tags: - Groups post: consumes: - application/json - text/json - application/x-www-form-urlencoded deprecated: false parameters: - description: The id of the group format: int64 in: path name: id required: true type: integer - description: The body of the group in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Groups.Group' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Update a group tags: - Groups '/groups/{id}/aggregated': get: consumes: [] deprecated: false parameters: - description: Id of the group format: int64 in: path name: id required: true type: integer - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'If using "yesterday" or "today" timeframe you can ask for the hourly detail' in: query name: hourly required: false type: boolean produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Aggregated.AggregatedResult' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about this group for a timeframe tags: - Groups '/groups/{id}/aggregated/list': get: consumes: [] deprecated: false parameters: - description: Id of the group format: int64 in: path name: id required: true type: integer - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'The temporal entity you want to group by ("week"/"month"). If unspecified is "day".' enum: - week - month in: query name: groupBy required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about this group for a timeframe grouped by some temporal entity (day/week/month) tags: - Groups '/groups/{id}/aggregated/summary': get: consumes: [] deprecated: false parameters: - description: Filter by this group id format: int64 in: path name: id required: true type: integer - description: Timeframe of the request. See list at $timeframeList enum: - today - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - last12months - lastyear - currentyear - beginning - custom in: query name: timeFrame required: true type: string - description: 'Type of datapoint ("tl"/"tp")' enum: - tp - tl in: query name: type required: false type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'Status of datapoint ("deleted"/"active"/"paused"/"spam")' enum: - deleted - active in: query name: status required: false type: string - description: A comma separated list of tags you want to filter with. in: query name: tag required: false type: string - description: Is the datapoint marked as favourite in: query name: favourite required: false type: boolean - description: Field to sort by in: query name: sortBy required: false type: string - description: 'Direction of sort "asc" or "desc"' enum: - asc - desc in: query name: sortDirection required: false type: string - default: 0 description: Offset where to start from format: int32 in: query minLength: 0 name: offset required: false type: integer - default: 20 description: Limit results to this number format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: Filter fields by this pattern in: query name: textSearch required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Aggregated.AggregatedSummaryResult' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve statistics about a subset of datapoints for a timeframe with datapoints data tags: - Groups '/groups/{id}/datapoints': get: consumes: [] deprecated: false parameters: - description: Id of the group format: int64 in: path name: id required: true type: integer - default: 0 description: Where to start when retrieving elements. Default is 0 if not specified. format: int32 in: query minLength: 0 name: offset required: false type: integer - default: 20 description: Maximum elements to retrieve. Default to 20 if not specified. format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: 'Type of the datapoint ("tp"/"tl")' enum: - tp - tl in: query name: type required: false type: string - description: Status of the datapoint enum: - deleted - active - paused - spam in: query name: status required: false type: string - description: A comma separated list of tags you want to filter with. in: query name: tags required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Filter fields by favourite status in: query name: onlyFavorites required: false type: boolean - description: Field to sort by in: query name: sortBy required: false type: string - description: 'Direction of sort "asc" or "desc"' enum: - asc - desc in: query name: sortDirection required: false type: string - description: Exclude datapoints created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude datapoints created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: List of all the datapoints associated to the user in this group. tags: - Groups post: consumes: - application/json - text/json - application/x-www-form-urlencoded deprecated: false parameters: - description: The id of the group format: int64 in: path name: id required: true type: integer - description: The body of the datapoint in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Datapoints.Datapoint' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Create a datapoint in this group tags: - Groups '/groups/{id}/datapoints/count': get: consumes: [] deprecated: false parameters: - description: Id of the group format: int64 in: path name: id required: true type: integer - description: 'Type of the datapoint ("tp"/"tl")' enum: - tp - tl in: query name: type required: false type: string - description: Status of the datapoint enum: - deleted - active - paused - spam in: query name: status required: false type: string - description: A comma separated list of tags you want to filter with. in: query name: tags required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Filter fields by favourite status in: query name: onlyFavorites required: false type: boolean - description: Exclude datapoints created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude datapoints created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.CountResponce' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Count the datapoints associated to the user in this group. tags: - Groups '/groups/{id}/favourite': put: consumes: [] deprecated: false parameters: - description: Id of the group format: int64 in: path name: id required: true type: integer produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '403': description: Forbidden '404': description: Not found '500': description: Internal Server Error summary: 'Fast switch the "favourite" field of a group' tags: - Groups '/groups/{id}/hits': get: consumes: [] deprecated: false parameters: - description: Id of the group format: int64 in: path name: id required: true type: integer - description: Timeframe of the request. See list at $timeframeList enum: - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - custom in: query name: timeframe required: true type: string - description: Limit results to this number format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: "Offset where to start from (it's the lastKey field in the response object)" in: query name: offset required: false type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'Filter event type ("spiders"/"uniques"/"nonuniques"/"conversions")' enum: - spiders - uniques - nonuniques - conversions in: query name: filter required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.ClickStream.HitListPage' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve the list of events related to this group. tags: - Groups '/groups/{id}/notes': put: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: Id of the group format: int64 in: path name: id required: true type: integer - description: Patch requests in: body name: note required: true schema: $ref: '#/definitions/Api.Core.Requests.GenericTextPatch' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '403': description: Forbidden '404': description: Not found '500': description: Internal Server Error summary: 'Fast patch the "notes" field of a group' tags: - Groups '/groups/{id}/reports': get: consumes: [] deprecated: false parameters: - description: Id of the group format: int64 in: path name: id required: true type: integer - description: Type of the report. enum: - browsers - browsersfamilies - platforms - cities - countries - isps - ips - oss - ossfamilies - keywords - referrers - destinations - languages - params in: query name: type required: true type: string - description: Timeframe of the request. See list at $timeframeList enum: - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - beginning - custom in: query name: timeframe required: true type: string - description: Type of the event you want to filter this report with. By default no filter is applied. enum: - clicks - views in: query name: hittype required: false type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Tops.Top' '401': description: Forbidden '404': description: Not found '500': description: Internal Server Error summary: Retrieve a top report connected to this group tags: - Groups /hits: get: consumes: [] deprecated: false parameters: - description: Timeframe of the request. See list at $timeframeList enum: - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - custom in: query name: timeframe required: true type: string - description: Limit results to this number format: int32 in: query name: limit required: false type: integer - description: "Offset where to start from (it's the lastKey field in the response object)" in: query name: offset required: false type: string - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string - description: 'Filter event type ("spiders"/"uniques"/"nonuniques"/"conversions")' enum: - spiders - uniques - nonuniques - conversions in: query name: filter required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.ClickStream.HitListPage' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve the list of events related to this account. tags: - Hits /me: get: consumes: [] deprecated: false produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Accounting.User' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve current account data tags: - Me /me/plan: get: consumes: [] deprecated: false produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Accounting.Plan' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve current account plan tags: - Me /reports: get: consumes: [] deprecated: false parameters: - description: Type of the report. enum: - browsers - browsersfamilies - platforms - cities - countries - isps - ips - oss - ossfamilies - keywords - referrers - destinations - languages - params in: query name: type required: true type: string - description: Timeframe of the request. See list at $timeframeList enum: - yesterday - last7 - last30 - lastmonth - currentmonth - previousmonth - last90 - last120 - last180 - beginning - custom in: query name: timeframe required: true type: string - description: Type of the event you want to filter this report with. By default no filter is applied. in: query name: hittype required: false type: string - description: 'Filter by this group id (mutually exclusive with "datapoint" and "conversion")' format: int64 in: query name: group required: false type: integer - description: 'Filter by this datapoint id (mutually exclusive with "group" and "conversion")' format: int64 in: query name: datapoint required: false type: integer - description: 'Filter by this conversion id (mutually exclusive with "datapoint" and "group")' format: int64 in: query name: conversion required: false type: integer - description: 'If using a "custom" timeFrame you can specify the starting day (YYYYMMDD)' in: query name: fromDay required: false type: string - description: 'If using a "custom" timeFrame you can specify the ending day (YYYYMMDD)' in: query name: toDay required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Tops.Top' '401': description: Forbidden '404': description: Not found '500': description: Internal Server Error summary: Retrieve a top report tags: - Reports /retargeting: get: consumes: [] deprecated: false parameters: - default: 0 description: Where to start when retrieving elements. Default is 0 if not specified. format: int32 in: query minLength: 0 name: offset required: false type: integer - default: 20 description: Maximum elements to retrieve. Default to 20 if not specified. format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: List of all the retargeting scripts associated to the user tags: - Retargeting post: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: The body of the retargeting script in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Retargeting.RetargetingScript' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Creates a retargeting script tags: - Retargeting /retargeting/count: get: consumes: [] deprecated: false produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.CountResponce' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve count of retargeting scripts tags: - Retargeting '/retargeting/{id}': delete: consumes: [] deprecated: false parameters: - description: The id of the retargeting script format: int64 in: path name: id required: true type: integer produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Deletes a retargeting script (and remove associations) tags: - Retargeting get: consumes: [] deprecated: false parameters: - description: The id of the retargeting script format: int64 in: path name: id required: true type: integer produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Retargeting.RetargetingScript' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Get a retargeting script object tags: - Retargeting post: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: The id of the retargeting script format: int64 in: path name: id required: true type: integer - description: The body of the retargeting script in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Retargeting.RetargetingScript' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Updates a retargeting script tags: - Retargeting '/retargeting/{id}/datapoints': get: consumes: [] deprecated: false parameters: - description: Id of the retargeting script format: int64 in: path name: id required: true type: integer - default: 0 description: Where to start when retrieving elements. Default is 0 if not specified. format: int32 in: query minLength: 0 name: offset required: false type: integer - default: 20 description: Maximum elements to retrieve. Default to 20 if not specified. format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: Status of the datapoint enum: - deleted - active - paused - spam in: query name: status required: false type: string - description: A comma separated list of tags you want to filter with. in: query name: tags required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Filter fields by favourite status in: query name: onlyFavorites required: false type: boolean - description: Field to sort by in: query name: sortBy required: false type: string - description: 'Direction of sort "asc" or "desc"' enum: - asc - desc in: query name: sortDirection required: false type: string - description: Exclude datapoints created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude datapoints created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: List of all the datapoints associated to the retargeting script. tags: - Retargeting '/retargeting/{id}/datapoints/count': get: consumes: [] deprecated: false parameters: - description: Id of the group format: int64 in: path name: id required: true type: integer - description: Status of the datapoint enum: - deleted - active - paused - spam in: query name: status required: false type: string - description: A comma separated list of tags you want to filter with. in: query name: tags required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Filter fields by favourite status in: query name: onlyFavorites required: false type: boolean - description: Exclude datapoints created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude datapoints created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.CountResponce' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Count the datapoints associated to the retargeting script. tags: - Retargeting /tags: get: consumes: [] deprecated: false parameters: - default: 0 description: Where to start when retrieving elements. Default is 0 if not specified. format: int32 in: query minLength: 0 name: offset required: false type: integer - default: 20 description: Maximum elements to retrieve. Default to 20 if not specified. format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: Name of the tag in: query name: name required: false type: string - description: Comma separated list of datapoints id to filter by in: query name: datapoints required: false type: string - description: Comma separated list of groups id to filter by in: query name: groups required: false type: string - description: Type of entity related to the tag enum: - tp - tl - dp - gr in: query name: type required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: List of all the groups associated to the user filtered by this tag. tags: - Tags post: consumes: - application/json - text/json - application/x-www-form-urlencoded deprecated: false parameters: - description: The body of the tag in: body name: value required: true schema: $ref: '#/definitions/Api.Core.Dto.Tags.Tag' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Create a tag tags: - Tags /tags/count: get: consumes: [] deprecated: false parameters: - description: Name of the tag in: query name: name required: false type: string - description: Comma separated list of datapoints id to filter by in: query name: datapoints required: false type: string - description: Comma separated list of groups id to filter by in: query name: groups required: false type: string - description: Type of entity related to the tag enum: - tp - tl - dp - gr in: query name: type required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/System.Object' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: List of all the groups associated to the user filtered by this tag. tags: - Tags '/tags/{tagId}': delete: consumes: [] deprecated: false parameters: - description: Id of the tag format: int64 in: path name: tagId required: true type: integer produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/System.Object' '401': description: Unauthorized '500': description: Internal Server Error summary: Delete a tag tags: - Tags get: consumes: [] deprecated: false parameters: - description: Id of the tag format: int64 in: path name: tagId required: true type: integer produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Dto.Tags.Tag' '401': description: Unauthorized '500': description: Internal Server Error summary: Retrieve a tag tags: - Tags '/tags/{tagId}/datapoints': delete: consumes: [] deprecated: false parameters: - description: Id of the tag format: int64 in: path name: tagId required: true type: integer produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '500': description: Internal Server Error summary: Delete the association of this tag with all datapoints tags: - Tags get: consumes: [] deprecated: false parameters: - description: Id of the tag. format: int64 in: path name: tagId required: true type: integer - default: 0 description: Where to start when retrieving elements. Default is 0 if not specified. format: int32 in: query minLength: 0 name: offset required: false type: integer - default: 20 description: Maximum elements to retrieve. Default to 20 if not specified. format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: 'Type of the datapoint ("tp"/"tl")' enum: - tp - tl in: query name: type required: false type: string - description: Status of the datapoint enum: - deleted - active - paused - spam in: query name: status required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Exclude datapoints created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude datapoints created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: List of all the datapoints associated to the user filtered by this tag tags: - Tags '/tags/{tagId}/datapoints/count': get: consumes: [] deprecated: false parameters: - description: Id of the tag. format: int64 in: path name: tagId required: true type: integer - description: 'Type of the datapoint ("tp"/"tl")' enum: - tp - tl in: query name: type required: false type: string - description: Status of the datapoint enum: - deleted - active - paused - spam in: query name: status required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Exclude datapoints created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude datapoints created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.CountResponce' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Count the datapoints associated to the user filtered by this tag tags: - Tags '/tags/{tagId}/datapoints/patch': put: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: Id of the tag format: int64 in: path name: tagId required: true type: integer - description: The body patch in: body name: data required: true schema: $ref: '#/definitions/Api.Core.Requests.PatchBody' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Associate/Deassociate a tag with a datapoint tags: - Tags '/tags/{tagId}/groups': delete: consumes: [] deprecated: false parameters: - description: Id of the tag format: int64 in: path name: tagId required: true type: integer produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '500': description: Internal Server Error summary: Delete the association of this tag with all groups tags: - Tags get: consumes: [] deprecated: false parameters: - description: Id of the tag. format: int64 in: path name: tagId required: true type: integer - default: 0 description: Where to start when retrieving elements. Default is 0 if not specified. format: int32 in: query minLength: 0 name: offset required: false type: integer - default: 20 description: Maximum elements to retrieve. Default to 20 if not specified. format: int32 in: query maxLength: 0 minLength: 0 name: limit required: false type: integer - description: Status of the datapoint enum: - deleted - active in: query name: status required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Exclude groups created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude groups created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string produces: - application/json - text/json responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: List of all the groups associated to the user filtered by this tag. tags: - Tags '/tags/{tagId}/groups/count': get: consumes: [] deprecated: false parameters: - description: Id of the tag. format: int64 in: path name: tagId required: true type: integer - description: Status of the datapoint enum: - deleted - active in: query name: status required: false type: string - description: Filter fields by this pattern in: query name: textSearch required: false type: string - description: Exclude groups created before this date (YYYYMMDD) in: query name: createdAfter required: false type: string - description: Exclude groups created after this date (YYYYMMDD) in: query name: createdBefore required: false type: string produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.CountResponce' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Count the groups associated to the user filtered by this tag tags: - Tags '/tags/{tagId}/groups/patch': put: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: Id of the tag format: int64 in: path name: tagId required: true type: integer - description: The body patch in: body name: data required: true schema: $ref: '#/definitions/Api.Core.Requests.PatchBody' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '404': description: Not found '500': description: Internal Server Error summary: Associate/Deassociate a tag with a group tags: - Tags '/tags/{tagId}/name': put: consumes: - application/json - text/json - application/xml - text/xml - application/x-www-form-urlencoded deprecated: false parameters: - description: Id of the tag format: int64 in: path name: tagId required: true type: integer - description: The body patch in: body name: data required: true schema: $ref: '#/definitions/Api.Core.Requests.GenericTextPatch' produces: - application/json - text/json - application/xml - text/xml responses: '200': description: '' schema: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' '401': description: Unauthorized '500': description: Internal Server Error summary: Fast patch a tag name tags: - Tags definitions: Api.Core.Dto.Accounting.ConversionOptions: properties: hideComCost: type: boolean hideCost: type: boolean hideCount: type: boolean hideParams: type: boolean hideValue: type: boolean percentCommission: format: int32 type: integer percentValue: format: int32 type: integer type: object Api.Core.Dto.Accounting.DomainWhitelistEntry: properties: id: type: string name: type: string type: object Api.Core.Dto.Accounting.ExtendedGrants: properties: allowAllGrants: type: boolean allowGroupCreation: type: boolean type: object Api.Core.Dto.Accounting.Guest: properties: apiKey: type: string conversionOptions: $ref: '#/definitions/Api.Core.Dto.Accounting.ConversionOptions' creationDate: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string currentGrant: $ref: '#/definitions/Api.Core.Dto.Grants.Grant' dateFormat: type: string decimalSeparator: type: string email: type: string extendedGrants: $ref: '#/definitions/Api.Core.Dto.Accounting.ExtendedGrants' groupGrants: format: int64 type: integer hitOptions: $ref: '#/definitions/Api.Core.Dto.Accounting.HitOptions' id: format: int64 type: integer key: type: string language: type: string loginCount: format: int32 type: integer name: type: string notes: type: string numberGroupSeparator: type: string password: type: string timeFormat: enum: - AmPm - H24 type: string timeZone: format: int32 type: integer timeframeMinDate: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string timezonename: type: string tlGrants: format: int64 type: integer tpGrants: format: int64 type: integer userName: type: string type: object Api.Core.Dto.Accounting.HitOptions: properties: hideReferrer: type: boolean type: object Api.Core.Dto.Accounting.IpBlacklistEntry: properties: id: type: string ip: type: string type: object Api.Core.Dto.Accounting.Plan: properties: allowedPersonalDomains: format: int32 type: integer allowedPersonalUrls: format: int32 type: integer billingPeriodEnd: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string billingPeriodStart: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string bonusMonthlyEvents: format: int64 type: integer maximumDatapoints: format: int64 type: integer maximumGuests: format: int64 type: integer monthlyEvents: format: int64 type: integer name: type: string price: format: double type: number profileId: format: int64 type: integer recurring: type: boolean recurringPeriod: format: int32 type: integer usedDatapoints: format: int64 type: integer usedMonthlyEvents: format: int64 type: integer type: object Api.Core.Dto.Accounting.User: properties: boGoVal: type: string bonusClicks: format: int64 type: integer companyName: type: string companyRole: type: string email: type: string firstName: type: string lastName: type: string phone: type: string redirectOnly: type: boolean registrationDate: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string timeframeMinDate: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string timezone: format: int32 type: integer timezonename: type: string type: object Api.Core.Dto.Aggregated.AggregatedResult: properties: activityDay: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string commissionsCost: format: double type: number conversionsCost: format: double type: number conversionsValue: format: double type: number convertedClicks: format: int64 type: integer entityData: $ref: '#/definitions/System.Object' entityId: type: string fromDay: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string hourlyBreakDown: additionalProperties: $ref: '#/definitions/Api.Core.Dto.Aggregated.AggregatedResult' type: object lastHitDate: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string spiderHitsCount: format: int64 type: integer toDay: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string totalClicks: format: int64 type: integer totalViews: format: int64 type: integer uniqueClicks: format: int64 type: integer uniqueConversions: format: int64 type: integer uniqueViews: format: int64 type: integer type: object Api.Core.Dto.Aggregated.AggregatedSummaryResult: properties: count: format: int64 type: integer limit: format: int32 type: integer offset: format: int64 type: integer result: items: $ref: '#/definitions/Api.Core.Dto.Aggregated.AggregatedResult' type: array type: object Api.Core.Dto.ClickStream.Hit: properties: accessTime: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string browser: $ref: '#/definitions/Api.Core.Dto.ClickStream.HitBrowserInfo' clientLanguage: type: string conversion1: $ref: '#/definitions/Api.Core.Dto.ClickStream.HitConversionInfo' conversion2: $ref: '#/definitions/Api.Core.Dto.ClickStream.HitConversionInfo' conversion3: $ref: '#/definitions/Api.Core.Dto.ClickStream.HitConversionInfo' conversion4: $ref: '#/definitions/Api.Core.Dto.ClickStream.HitConversionInfo' conversion5: $ref: '#/definitions/Api.Core.Dto.ClickStream.HitConversionInfo' conversions: items: $ref: '#/definitions/Api.Core.Dto.ClickStream.HitConversionInfo' type: array entity: $ref: '#/definitions/Api.Core.Dto.ClickStream.HitDatapointInfo' ip: type: string isProxy: type: string isSpider: type: string isUnique: type: string location: $ref: '#/definitions/Api.Core.Dto.ClickStream.HitLocationInfo' org: type: string os: $ref: '#/definitions/Api.Core.Dto.ClickStream.HitOsInfo' queryParams: type: string realDestinationUrl: type: string referer: type: string source: $ref: '#/definitions/Api.Core.Dto.ClickStream.HitSource' type: type: string type: object Api.Core.Dto.ClickStream.HitBrowserInfo: properties: browserType: type: string familyId: format: int64 type: integer familyName: type: string id: format: int64 type: integer name: type: string type: object Api.Core.Dto.ClickStream.HitConversionInfo: properties: accessTime: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string comcost: format: double type: number cost: format: double type: number date: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string deleted: type: boolean id: format: int64 type: integer name: type: string parameter: type: string value: format: double type: number type: object Api.Core.Dto.ClickStream.HitDatapointInfo: properties: creationDate: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string datapointFavourite: type: boolean datapointId: format: int64 type: integer datapointName: type: string datapointTitle: type: string datapointType: type: string destinationUrl: type: string groupId: format: int64 type: integer groupName: type: string isABTest: type: boolean isPrivateShared: type: boolean isPublic: type: boolean notes: type: string status: enum: - Active - Paused - Abuse - Deleted type: string tags: items: $ref: '#/definitions/Api.Core.Dto.Tags.Tag' type: array trackingCode: type: string type: object Api.Core.Dto.ClickStream.HitListPage: properties: hits: items: $ref: '#/definitions/Api.Core.Dto.ClickStream.Hit' type: array lastKey: type: string type: object Api.Core.Dto.ClickStream.HitLocationInfo: properties: areacode: type: string city: type: string country: type: string latitude: format: double type: number longitude: format: double type: number metrocode: type: string organization: type: string postalcode: type: string region: type: string regionName: type: string type: object Api.Core.Dto.ClickStream.HitOsInfo: properties: familyId: format: int64 type: integer familyName: type: string id: format: int64 type: integer name: type: string type: object Api.Core.Dto.ClickStream.HitSource: properties: id: format: int64 type: integer name: type: string param: type: string type: object Api.Core.Dto.Conversions.Conversion: properties: code: type: string creationDate: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string deleted: type: boolean description: type: string id: format: int64 type: integer name: type: string protocol: enum: - Http - Https type: string value: format: double type: number type: object Api.Core.Dto.Datapoints.BrowserBaseDestinationItem: properties: emailDestinationUrl: type: string mobileDestinationUrl: type: string spidersDestinationUrl: type: string type: object Api.Core.Dto.Datapoints.Datapoint: properties: creationDate: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string encodeIp: type: boolean fifthConversionId: format: int64 type: integer fifthConversionName: type: string firstConversionId: format: int64 type: integer firstConversionName: type: string fourthConversionId: format: int64 type: integer fourthConversionName: type: string groupId: format: int64 type: integer groupName: type: string id: format: int64 type: integer isPublic: type: boolean isSecured: type: boolean lightTracking: type: boolean name: type: string notes: type: string preferred: type: boolean redirectOnly: type: boolean secondConversionId: format: int64 type: integer secondConversionName: type: string status: enum: - Active - Paused - Abuse - Deleted type: string tags: items: $ref: '#/definitions/Api.Core.Dto.Tags.Tag' type: array thirdConversionId: format: int64 type: integer thirdConversionName: type: string title: type: string trackingCode: type: string type: enum: - TrackingLink - TrackingPixel type: string typeTL: $ref: '#/definitions/Api.Core.Dto.Datapoints.TrackingLinkSpecifics' typeTP: $ref: '#/definitions/Api.Core.Dto.Datapoints.TrackingPixelSpecifics' writePermited: type: boolean type: object Api.Core.Dto.Datapoints.DatapointRetargetingInfo: properties: id: format: int64 type: integer name: type: string type: object Api.Core.Dto.Datapoints.MultipleDestinationItem: properties: url: type: string type: object Api.Core.Dto.Datapoints.TrackingLinkSpecifics: properties: appendQuery: type: boolean browserDestinationItem: $ref: '#/definitions/Api.Core.Dto.Datapoints.BrowserBaseDestinationItem' destinationMode: enum: - Simple - RandomDestination - DestinationByLanguage - SpilloverDestination - DynamicUrl - BrowserDestination - DestinationByNation - UniqueDestination - SequentialDestination - WeightedDestination type: string domainId: format: int32 type: integer encodeUrl: type: boolean expirationClicks: format: int64 type: integer expirationDate: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string firstUrl: type: string goDomainId: format: int32 type: integer hideUrl: type: boolean hideUrlTitle: type: string isABTest: type: boolean password: type: string pauseAfterClicksExpiration: type: boolean pauseAfterDateExpiration: type: boolean randomDestinationItems: items: $ref: '#/definitions/Api.Core.Dto.Datapoints.MultipleDestinationItem' type: array redirectType: enum: - PermanentRedirect - TemporaryRedirect type: string referrerClean: enum: - None - Clean - Myself type: string scripts: items: $ref: '#/definitions/Api.Core.Dto.Datapoints.DatapointRetargetingInfo' type: array sequentialDestinationItems: items: $ref: '#/definitions/Api.Core.Dto.Datapoints.MultipleDestinationItem' type: array spilloverDestinationItems: items: $ref: '#/definitions/Api.Core.Dto.Datapoints.MultipleDestinationItem' type: array uniqueDestinationItem: $ref: '#/definitions/Api.Core.Dto.Datapoints.UniqueDestinationItem' url: type: string urlAfterClicksExpiration: type: string urlAfterDateExpiration: type: string urlsByLanguage: items: $ref: '#/definitions/Api.Core.Dto.Datapoints.UrlByLanguageItem' type: array urlsByNation: items: $ref: '#/definitions/Api.Core.Dto.Datapoints.UrlByNationItem' type: array weightedDestinationItems: items: $ref: '#/definitions/Api.Core.Dto.Datapoints.WeightedDestinationItem' type: array type: object Api.Core.Dto.Datapoints.TrackingPixelSpecifics: properties: parameterNote: type: string type: object Api.Core.Dto.Datapoints.UniqueDestinationItem: properties: firstDestinationUrl: type: string type: object Api.Core.Dto.Datapoints.UrlByLanguageItem: properties: languageCode: type: string url: type: string type: object Api.Core.Dto.Datapoints.UrlByNationItem: properties: nation: type: string url: type: string type: object Api.Core.Dto.Datapoints.WeightedDestinationItem: properties: url: type: string weight: format: int32 type: integer type: object Api.Core.Dto.Domains.Domain: properties: custom404: type: string customHomepage: type: string id: format: int64 type: integer name: type: string type: enum: - System - Go - Dedicated - Personal type: string type: object Api.Core.Dto.EntityUriLong: properties: id: format: int64 type: integer uri: type: string type: object Api.Core.Dto.Grants.Grant: properties: DatapointType: type: string Entity: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' EntityName: type: string EntityType: type: string Type: type: string type: object Api.Core.Dto.Groups.Group: properties: creationDate: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string deleted: type: boolean id: format: int64 type: integer isPublic: type: boolean name: type: string notes: type: string preferred: type: boolean redirectOnly: type: boolean tags: items: $ref: '#/definitions/Api.Core.Dto.Tags.Tag' type: array writePermited: type: boolean type: object Api.Core.Dto.Retargeting.RetargetingScript: properties: id: format: int64 type: integer name: type: string script: type: string type: object Api.Core.Dto.Tags.Tag: properties: datapoints: items: format: int64 type: integer type: array groups: items: format: int64 type: integer type: array id: format: int64 type: integer name: type: string type: object Api.Core.Dto.Tops.Top: properties: createdAt: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string data: items: $ref: '#/definitions/Api.Core.Dto.Tops.TopItem' type: array key: type: string type: object Api.Core.Dto.Tops.TopItem: properties: entityData: $ref: '#/definitions/System.Object' id: type: string lastHitDate: description: ' (A date in "YmdHis" format)' example: '20120203120530' type: string spiderClicks: format: int64 type: integer spiderHits: format: int64 type: integer spiderViews: format: int64 type: integer totalClicks: format: int64 type: integer totalCommissionsCost: format: double type: number totalConversions: format: int64 type: integer totalConversionsCost: format: double type: number totalConversionsValue: format: double type: number totalHits: format: int64 type: integer totalViews: format: int64 type: integer uniqueClicks: format: int64 type: integer uniqueHits: format: int64 type: integer uniqueViews: format: int64 type: integer type: object Api.Core.Requests.ConversionPatchBody: properties: Action: type: string Id: format: int64 type: integer ReplaceId: format: int64 type: integer type: object Api.Core.Requests.DatapointsBatch: properties: List: items: $ref: '#/definitions/Api.Core.Dto.Datapoints.Datapoint' type: array type: object Api.Core.Requests.DeleteBatch: properties: Entities: items: $ref: '#/definitions/Api.Core.Dto.EntityUriLong' type: array type: object Api.Core.Requests.GenericTextPatch: properties: Text: type: string type: object Api.Core.Requests.PatchBody: properties: Action: type: string Id: format: int64 type: integer type: object Api.Core.Requests.PatchBodyBatch: properties: PatchRequests: items: $ref: '#/definitions/Api.Core.Requests.PatchBody' type: array type: object Api.Core.Requests.PermissionPatchRequest: properties: Action: type: string Id: format: int64 type: integer Verb: type: string type: object Api.Core.Responses.CountResponce: properties: count: format: int64 type: integer type: object 'Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Accounting.DomainWhitelistEntry]': properties: entities: items: $ref: '#/definitions/Api.Core.Dto.Accounting.DomainWhitelistEntry' type: array type: object 'Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Accounting.IpBlacklistEntry]': properties: entities: items: $ref: '#/definitions/Api.Core.Dto.Accounting.IpBlacklistEntry' type: array type: object 'Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Aggregated.AggregatedResult]': properties: entities: items: $ref: '#/definitions/Api.Core.Dto.Aggregated.AggregatedResult' type: array type: object 'Api.Core.Responses.EntitiesResponse[Api.Core.Dto.ClickStream.Hit]': properties: entities: items: $ref: '#/definitions/Api.Core.Dto.ClickStream.Hit' type: array type: object 'Api.Core.Responses.EntitiesResponse[Api.Core.Dto.Grants.Grant]': properties: entities: items: $ref: '#/definitions/Api.Core.Dto.Grants.Grant' type: array type: object 'Api.Core.Responses.EntitiesResponse[Api.Core.Responses.EntityUri[System.Int64]]': properties: entities: items: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' type: array type: object 'Api.Core.Responses.EntityUri[System.Int64]': properties: id: format: int64 type: integer uri: type: string type: object 'Api.Core.Responses.ModifyBatchItemResponce[Api.Core.Dto.Datapoints.Datapoint,System.Int64]': properties: entityData: $ref: '#/definitions/Api.Core.Dto.Datapoints.Datapoint' errors: items: $ref: '#/definitions/ClickMeter.Infrastructure.Validation.ValidationFailure' type: array result: $ref: '#/definitions/Api.Core.Responses.EntityUri[System.Int64]' status: type: string type: object ClickMeter.Infrastructure.Validation.ValidationFailure: properties: code: $ref: '#/definitions/System.Object' errorMessage: type: string errorValue: $ref: '#/definitions/System.Object' property: type: string type: object System.Object: properties: {} type: object validate-0.24.0/fixtures/go-swagger/expansion/invalid-refs.json000066400000000000000000000032351457312750000245720ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Swagger Petstore", "contact": { "name": "wordnik api team", "url": "http://developer.wordnik.com" }, "license": { "name": "Creative Commons 4.0 International", "url": "http://creativecommons.org/licenses/by/4.0/" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/api", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": [ "Pet Operations" ], "summary": "finds pets in the system", "responses": { "200": { "description": "pet response", "schema": { "type": "array", "items": { "$ref": "NotCorrectRef" } }, "headers": { "x-expires": { "type": "string" } } }, "default": { "description": "unexpected error", "schema": { "$ref": "NotCorrectRef" } } } } } }, "definitions": { "Pet": { "required": [ "id", "name" ], "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "tag": { "type": "string" } } }, "Error": { "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } } } } validate-0.24.0/fixtures/go-swagger/expansion/params.json000066400000000000000000000006071457312750000234720ustar00rootroot00000000000000{ "parameters": { "id": { "type": "integer", "format": "int64", "in": "path", "required": true }, "tag": { "type": "string", "in": "query", "required": false }, "query": { "$ref": "#/parameters/tag" } }, "paths": { "/cars/{id}": { "parameters": [ { "$ref": "#/parameters/id"} ] } } }validate-0.24.0/fixtures/go-swagger/expansion/schemas1.json000066400000000000000000000042771457312750000237220ustar00rootroot00000000000000{ "definitions": { "car": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "make": { "type": "string" }, "brand": { "$ref": "#/definitions/brand" } } }, "tag": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "value": { "type": "string" } } }, "brand": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "truck": { "$ref": "#/definitions/car" }, "batch": { "items": { "$ref": "#/definitions/brand" } }, "batch2": { "items": [ { "$ref": "#/definitions/brand" }, { "$ref": "#/definitions/tag" } ] }, "allofBoth": { "allOf": [ { "$ref": "#/definitions/brand" }, { "$ref": "#/definitions/tag" } ] }, "anyofBoth": { "anyOf": [ { "$ref": "#/definitions/brand" }, { "$ref": "#/definitions/tag" } ] }, "oneofBoth": { "oneOf": [ { "$ref": "#/definitions/brand" }, { "$ref": "#/definitions/tag" } ] }, "notSomething": { "not": { "$ref": "#/definitions/tag" } }, "withAdditional": { "additionalProperties": { "$ref": "#/definitions/tag" } }, "withPattern": { "patternProperties": { "^x-ab": { "$ref": "#/definitions/tag" } } }, "withAdditionalItems": { "additionalItems": { "$ref": "#/definitions/tag" } }, "deps": { "dependencies": { "something": { "$ref": "#/definitions/tag" } } }, "defined": { "definitions": { "something": { "$ref": "#/definitions/tag" } } } } }validate-0.24.0/fixtures/go-swagger/expansion/schemas2.json000066400000000000000000000053731457312750000237210ustar00rootroot00000000000000{ "definitions": { "car": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "make": { "type": "string" }, "brand": { "items": { "$ref": "#/definitions/brand" } } } }, "tag": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "value": { "type": "string" } } }, "brand": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "truck": { "items": { "$ref": "#/definitions/car" } }, "batch": { "items": { "items": { "$ref": "#/definitions/brand" } } }, "batch2": { "items": [ { "items": { "$ref": "#/definitions/brand" } }, { "items": { "$ref": "#/definitions/tag" } } ] }, "allofBoth": { "allOf": [ { "items": { "$ref": "#/definitions/brand" } }, { "items": { "$ref": "#/definitions/tag" } } ] }, "anyofBoth": { "anyOf": [ { "items": { "$ref": "#/definitions/brand" } }, { "items": { "$ref": "#/definitions/tag" } } ] }, "oneofBoth": { "oneOf": [ { "items": { "$ref": "#/definitions/brand" } }, { "items": { "$ref": "#/definitions/tag" } } ] }, "notSomething": { "not": { "items": { "$ref": "#/definitions/tag" } } }, "withAdditional": { "additionalProperties": { "items": { "$ref": "#/definitions/tag" } } }, "withPattern": { "patternProperties": { "^x-ab": { "items": { "$ref": "#/definitions/tag" } } } }, "withAdditionalItems": { "additionalItems": { "items": { "$ref": "#/definitions/tag" } } }, "deps": { "dependencies": { "something": { "items": { "$ref": "#/definitions/tag" } } } }, "defined": { "definitions": { "something": { "items": { "$ref": "#/definitions/tag" } } } } } } validate-0.24.0/fixtures/go-swagger/petstores/000077500000000000000000000000001457312750000213355ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/petstores/petstore-expanded.json000066400000000000000000000123631457312750000256700ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Swagger Petstore", "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "Wordnik API Team", "email": "foo@example.com", "url": "http://madskristensen.net" }, "license": { "name": "MIT", "url": "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/api", "schemes": [ "http" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/pets": { "get": { "description": "Returns all pets from the system that the user has access to", "operationId": "findPets", "produces": [ "application/json", "application/xml", "text/xml", "text/html" ], "parameters": [ { "name": "tags", "in": "query", "description": "tags to filter by", "required": false, "type": "array", "items": { "type": "string" }, "collectionFormat": "csv" }, { "name": "limit", "in": "query", "description": "maximum number of results to return", "required": false, "type": "integer", "format": "int32" } ], "responses": { "200": { "description": "pet response", "schema": { "type": "array", "items": { "$ref": "#/definitions/pet" } } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } }, "post": { "description": "Creates a new pet in the store. Duplicates are allowed", "operationId": "addPet", "produces": [ "application/json" ], "parameters": [ { "name": "pet", "in": "body", "description": "Pet to add to the store", "required": true, "schema": { "$ref": "#/definitions/newPet" } } ], "responses": { "200": { "description": "pet response", "schema": { "$ref": "#/definitions/pet" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } } }, "/pets/{id}": { "get": { "description": "Returns a user based on a single ID, if the user does not have access to the pet", "operationId": "findPetById", "produces": [ "application/json", "application/xml", "text/xml", "text/html" ], "parameters": [ { "name": "id", "in": "path", "description": "ID of pet to fetch", "required": true, "type": "integer", "format": "int64" } ], "responses": { "200": { "description": "pet response", "schema": { "$ref": "#/definitions/pet" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } }, "delete": { "description": "deletes a single pet based on the ID supplied", "operationId": "deletePet", "parameters": [ { "name": "id", "in": "path", "description": "ID of pet to delete", "required": true, "type": "integer", "format": "int64" } ], "responses": { "204": { "description": "pet deleted" }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } } } }, "definitions": { "pet": { "required": [ "id", "name" ], "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "tag": { "type": "string" } } }, "newPet": { "allOf": [ { "$ref": "pet" }, { "required": [ "name" ], "properties": { "id": { "type": "integer", "format": "int64" } } } ] }, "errorModel": { "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } } } } validate-0.24.0/fixtures/go-swagger/petstores/petstore-simple.json000066400000000000000000000121421457312750000253640ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Swagger Petstore", "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "Wordnik API Team" }, "license": { "name": "MIT" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/api", "schemes": [ "http" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/pets": { "get": { "description": "Returns all pets from the system that the user has access to", "operationId": "findPets", "produces": [ "application/json", "application/xml", "text/xml", "text/html" ], "parameters": [ { "name": "tags", "in": "query", "description": "tags to filter by", "required": false, "type": "array", "items": { "type": "string" }, "collectionFormat": "csv" }, { "name": "limit", "in": "query", "description": "maximum number of results to return", "required": false, "type": "integer", "format": "int32" } ], "responses": { "200": { "description": "pet response", "schema": { "type": "array", "items": { "$ref": "#/definitions/pet" } } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } }, "post": { "description": "Creates a new pet in the store. Duplicates are allowed", "operationId": "addPet", "produces": [ "application/json" ], "parameters": [ { "name": "pet", "in": "body", "description": "Pet to add to the store", "required": true, "schema": { "$ref": "#/definitions/petInput" } } ], "responses": { "200": { "description": "pet response", "schema": { "$ref": "#/definitions/pet" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } } }, "/pets/{id}": { "get": { "description": "Returns a user based on a single ID, if the user does not have access to the pet", "operationId": "findPetById", "produces": [ "application/json", "application/xml", "text/xml", "text/html" ], "parameters": [ { "name": "id", "in": "path", "description": "ID of pet to fetch", "required": true, "type": "integer", "format": "int64" } ], "responses": { "200": { "description": "pet response", "schema": { "$ref": "#/definitions/pet" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } }, "delete": { "description": "deletes a single pet based on the ID supplied", "operationId": "deletePet", "parameters": [ { "name": "id", "in": "path", "description": "ID of pet to delete", "required": true, "type": "integer", "format": "int64" } ], "responses": { "204": { "description": "pet deleted" }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } } } }, "definitions": { "pet": { "required": [ "id", "name" ], "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "tag": { "type": "string" } } }, "petInput": { "allOf": [ { "$ref": "pet" }, { "required": [ "name" ], "properties": { "id": { "type": "integer", "format": "int64" } } } ] }, "errorModel": { "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } } } }validate-0.24.0/fixtures/go-swagger/petstores/petstore-with-external-docs.json000066400000000000000000000131451457312750000276200ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Swagger Petstore", "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "Wordnik API Team", "email": "foo@example.com", "url": "http://madskristensen.net" }, "license": { "name": "MIT", "url": "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT" } }, "externalDocs": { "description": "find more info here", "url": "https://helloreverb.com/about" }, "host": "petstore.swagger.wordnik.com", "basePath": "/api", "schemes": [ "http" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/pets": { "get": { "description": "Returns all pets from the system that the user has access to", "operationId": "findPets", "externalDocs": { "description": "find more info here", "url": "https://helloreverb.com/about" }, "produces": [ "application/json", "application/xml", "text/xml", "text/html" ], "parameters": [ { "name": "tags", "in": "query", "description": "tags to filter by", "required": false, "type": "array", "items": { "type": "string" }, "collectionFormat": "csv" }, { "name": "limit", "in": "query", "description": "maximum number of results to return", "required": false, "type": "integer", "format": "int32" } ], "responses": { "200": { "description": "pet response", "schema": { "type": "array", "items": { "$ref": "#/definitions/pet" } } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } }, "post": { "description": "Creates a new pet in the store. Duplicates are allowed", "operationId": "addPet", "produces": [ "application/json" ], "parameters": [ { "name": "pet", "in": "body", "description": "Pet to add to the store", "required": true, "schema": { "$ref": "#/definitions/newPet" } } ], "responses": { "200": { "description": "pet response", "schema": { "$ref": "#/definitions/pet" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } } }, "/pets/{id}": { "get": { "description": "Returns a user based on a single ID, if the user does not have access to the pet", "operationId": "findPetById", "produces": [ "application/json", "application/xml", "text/xml", "text/html" ], "parameters": [ { "name": "id", "in": "path", "description": "ID of pet to fetch", "required": true, "type": "integer", "format": "int64" } ], "responses": { "200": { "description": "pet response", "schema": { "$ref": "#/definitions/pet" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } }, "delete": { "description": "deletes a single pet based on the ID supplied", "operationId": "deletePet", "parameters": [ { "name": "id", "in": "path", "description": "ID of pet to delete", "required": true, "type": "integer", "format": "int64" } ], "responses": { "204": { "description": "pet deleted" }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } } } }, "definitions": { "pet": { "required": [ "id", "name" ], "externalDocs": { "description": "find more info here", "url": "https://helloreverb.com/about" }, "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "tag": { "type": "string" } } }, "newPet": { "allOf": [ { "$ref": "pet" }, { "required": [ "name" ], "properties": { "id": { "type": "integer", "format": "int64" } } } ] }, "errorModel": { "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } } } } validate-0.24.0/fixtures/go-swagger/petstores/petstore.json000066400000000000000000000032471457312750000241030ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Swagger Petstore", "contact": { "name": "wordnik api team", "url": "http://developer.wordnik.com" }, "license": { "name": "Creative Commons 4.0 International", "url": "http://creativecommons.org/licenses/by/4.0/" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/api", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": [ "Pet Operations" ], "summary": "finds pets in the system", "responses": { "200": { "description": "pet response", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } }, "headers": { "x-expires": { "type": "string" } } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } } }, "definitions": { "Pet": { "required": [ "id", "name" ], "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "tag": { "type": "string" } } }, "Error": { "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } } } } validate-0.24.0/fixtures/go-swagger/remotes/000077500000000000000000000000001457312750000207635ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/remotes/folder/000077500000000000000000000000001457312750000222365ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/remotes/folder/folderInteger.json000066400000000000000000000000311457312750000257140ustar00rootroot00000000000000{ "type": "integer" }validate-0.24.0/fixtures/go-swagger/remotes/integer.json000066400000000000000000000000311457312750000233050ustar00rootroot00000000000000{ "type": "integer" }validate-0.24.0/fixtures/go-swagger/remotes/subSchemas.json000066400000000000000000000001561457312750000237550ustar00rootroot00000000000000{ "integer": { "type": "integer" }, "refToInteger": { "$ref": "#/integer" } }validate-0.24.0/fixtures/go-swagger/specs/000077500000000000000000000000001457312750000204225ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/specs/deeper/000077500000000000000000000000001457312750000216665ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/specs/deeper/arrayProp.json000066400000000000000000000000731457312750000245400ustar00rootroot00000000000000{ "type":"array", "items": { "type": "string" } }validate-0.24.0/fixtures/go-swagger/specs/deeper/stringProp.json000066400000000000000000000000261457312750000247260ustar00rootroot00000000000000{ "type": "string" }validate-0.24.0/fixtures/go-swagger/specs/refed.json000066400000000000000000000117451457312750000224120ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Swagger Petstore", "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "Wordnik API Team" }, "license": { "name": "MIT" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/api", "schemes": [ "http" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": { "idParam": { "name": "id", "in": "path", "description": "ID of pet to fetch", "required": true, "type": "integer", "format": "int64" } }, "responses": { "petResponse": { "description": "pet response", "schema": { "$ref": "#/definitions/pet" } } }, "paths": { "/pets": { "get": { "description": "Returns all pets from the system that the user has access to", "operationId": "findPets", "produces": [ "application/json", "application/xml", "text/xml", "text/html" ], "parameters": [ { "name": "tags", "in": "query", "description": "tags to filter by", "required": false, "type": "array", "items": { "type": "string" }, "collectionFormat": "csv" }, { "name": "limit", "in": "query", "description": "maximum number of results to return", "required": false, "type": "integer", "format": "int32" } ], "responses": { "200": { "description": "pet response", "schema": { "type": "array", "items": { "$ref": "#/definitions/pet" } } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } }, "post": { "description": "Creates a new pet in the store. Duplicates are allowed", "operationId": "addPet", "produces": [ "application/json" ], "parameters": [ { "name": "pet", "in": "body", "description": "Pet to add to the store", "required": true, "schema": { "$ref": "#/definitions/petInput" } } ], "responses": { "200": { "$ref": "#/responses/petResponse" }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } } }, "/pets/{id}": { "get": { "description": "Returns a user based on a single ID, if the user does not have access to the pet", "operationId": "findPetById", "produces": [ "application/json", "application/xml", "text/xml", "text/html" ], "parameters": [ { "$ref": "#/parameters/idParam" } ], "responses": { "200": { "$ref": "#/responses/petResponse" }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } }, "delete": { "description": "deletes a single pet based on the ID supplied", "operationId": "deletePet", "parameters": [ { "$ref": "#/parameters/idParam" } ], "responses": { "204": { "description": "pet deleted" }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } } } }, "definitions": { "pet": { "required": [ "id", "name" ], "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "tag": { "type": "string" } } }, "petInput": { "allOf": [ { "$ref": "pet" }, { "required": [ "name" ], "properties": { "id": { "type": "integer", "format": "int64" } } } ] }, "errorModel": { "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } } } }validate-0.24.0/fixtures/go-swagger/specs/resolution.json000066400000000000000000000003111457312750000235130ustar00rootroot00000000000000{ "id": "http://localhost:1234", "items": { "id": "deeper/", "items": { "$ref": "stringProp.json" } }, "definitions": { "bool": { "$ref": "boolProp.json" } } }validate-0.24.0/fixtures/go-swagger/specs/resolution2.json000066400000000000000000000002051457312750000235770ustar00rootroot00000000000000{ "id": "http://localhost:1234", "items": { "id": "deeper/", "items": { "$ref": "arrayProp.json#/items" } } }validate-0.24.0/fixtures/go-swagger/specs/response_name.json000066400000000000000000000012171457312750000241540ustar00rootroot00000000000000{ "consumes": [ "application/json", "application/x-www-form-urlencoded" ], "paths": { "/testing": { "put": { "operationId": "putTesting", "responses": { "200": { "description": "Success message", "x-go-name": "AlternateName" } } } } }, "produces": [ "application/json", "application/json; charset=utf-8" ], "swagger": "2.0", "info": { "title": "test formats for form params", "version": "0.0.0" } } validate-0.24.0/fixtures/go-swagger/templates/000077500000000000000000000000001457312750000213035ustar00rootroot00000000000000validate-0.24.0/fixtures/go-swagger/templates/swagger_json_embed.gotmpl000066400000000000000000000000341457312750000263500ustar00rootroot00000000000000./swagger_json_embed.gotmpl validate-0.24.0/fixtures/jsonschema_suite/000077500000000000000000000000001457312750000206065ustar00rootroot00000000000000validate-0.24.0/fixtures/jsonschema_suite/additionalItems.json000066400000000000000000000046111457312750000246150ustar00rootroot00000000000000[ { "description": "additionalItems as schema", "schema": { "items": [{}], "additionalItems": {"type": "integer"} }, "tests": [ { "description": "additional items match schema", "data": [ null, 2, 3, 4 ], "valid": true }, { "description": "additional items do not match schema", "data": [ null, 2, 3, "foo" ], "valid": false } ] }, { "description": "items is schema, no additionalItems", "schema": { "items": {}, "additionalItems": false }, "tests": [ { "description": "all items match schema", "data": [ 1, 2, 3, 4, 5 ], "valid": true } ] }, { "description": "array of items with no additionalItems", "schema": { "items": [{}, {}, {}], "additionalItems": false }, "tests": [ { "description": "fewer number of items present", "data": [ 1, 2 ], "valid": true }, { "description": "equal number of items present", "data": [ 1, 2, 3 ], "valid": true }, { "description": "additional items are not permitted", "data": [ 1, 2, 3, 4 ], "valid": false } ] }, { "description": "additionalItems as false without items", "schema": {"additionalItems": false}, "tests": [ { "description": "items defaults to empty schema so everything is valid", "data": [ 1, 2, 3, 4, 5 ], "valid": true }, { "description": "ignores non-arrays", "data": {"foo" : "bar"}, "valid": true } ] }, { "description": "additionalItems are allowed by default", "schema": {"items": [{"type": "integer"}]}, "tests": [ { "description": "only the first item is validated", "data": [1, "foo", false], "valid": true } ] } ] validate-0.24.0/fixtures/jsonschema_suite/additionalProperties.json000066400000000000000000000057311457312750000256740ustar00rootroot00000000000000[ { "description": "additionalProperties being false does not allow other properties", "schema": { "properties": {"foo": {}, "bar": {}}, "patternProperties": { "^v": {} }, "additionalProperties": false }, "tests": [ { "description": "no additional properties is valid", "data": {"foo": 1}, "valid": true }, { "description": "an additional property is invalid", "data": {"foo" : 1, "bar" : 2, "quux" : "boom"}, "valid": false }, { "description": "ignores arrays", "data": [1, 2, 3], "valid": true }, { "description": "ignores strings", "data": "foobarbaz", "valid": true }, { "description": "ignores other non-objects", "data": 12, "valid": true }, { "description": "patternProperties are not additional properties", "data": {"foo":1, "vroom": 2}, "valid": true } ] }, { "description": "additionalProperties allows a schema which should validate", "schema": { "properties": {"foo": {}, "bar": {}}, "additionalProperties": {"type": "boolean"} }, "tests": [ { "description": "no additional properties is valid", "data": {"foo": 1}, "valid": true }, { "description": "an additional valid property is valid", "data": {"foo" : 1, "bar" : 2, "quux" : true}, "valid": true }, { "description": "an additional invalid property is invalid", "data": {"foo" : 1, "bar" : 2, "quux" : 12}, "valid": false } ] }, { "description": "additionalProperties can exist by itself", "schema": { "additionalProperties": {"type": "boolean"} }, "tests": [ { "description": "an additional valid property is valid", "data": {"foo" : true}, "valid": true }, { "description": "an additional invalid property is invalid", "data": {"foo" : 1}, "valid": false } ] }, { "description": "additionalProperties are allowed by default", "schema": {"properties": {"foo": {}, "bar": {}}}, "tests": [ { "description": "additional properties are allowed", "data": {"foo": 1, "bar": 2, "quux": true}, "valid": true } ] } ] validate-0.24.0/fixtures/jsonschema_suite/allOf.json000066400000000000000000000057211457312750000225430ustar00rootroot00000000000000[ { "description": "allOf", "schema": { "allOf": [ { "properties": { "bar": {"type": "integer"} }, "required": ["bar"] }, { "properties": { "foo": {"type": "string"} }, "required": ["foo"] } ] }, "tests": [ { "description": "allOf", "data": {"foo": "baz", "bar": 2}, "valid": true }, { "description": "mismatch second", "data": {"foo": "baz"}, "valid": false }, { "description": "mismatch first", "data": {"bar": 2}, "valid": false }, { "description": "wrong type", "data": {"foo": "baz", "bar": "quux"}, "valid": false } ] }, { "description": "allOf with base schema", "schema": { "properties": {"bar": {"type": "integer"}}, "required": ["bar"], "allOf" : [ { "properties": { "foo": {"type": "string"} }, "required": ["foo"] }, { "properties": { "baz": {"type": "null"} }, "required": ["baz"] } ] }, "tests": [ { "description": "valid", "data": {"foo": "quux", "bar": 2, "baz": null}, "valid": true }, { "description": "mismatch base schema", "data": {"foo": "quux", "baz": null}, "valid": false }, { "description": "mismatch first allOf", "data": {"bar": 2, "baz": null}, "valid": false }, { "description": "mismatch second allOf", "data": {"foo": "quux", "bar": 2}, "valid": false }, { "description": "mismatch both", "data": {"bar": 2}, "valid": false } ] }, { "description": "allOf simple types", "schema": { "allOf": [ {"maximum": 30}, {"minimum": 20} ] }, "tests": [ { "description": "valid", "data": 25, "valid": true }, { "description": "mismatch one", "data": 35, "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/anyOf.json000066400000000000000000000031101457312750000225500ustar00rootroot00000000000000[ { "description": "anyOf", "schema": { "anyOf": [ { "type": "integer" }, { "minimum": 2 } ] }, "tests": [ { "description": "first anyOf valid", "data": 1, "valid": true }, { "description": "second anyOf valid", "data": 2.5, "valid": true }, { "description": "both anyOf valid", "data": 3, "valid": true }, { "description": "neither anyOf valid", "data": 1.5, "valid": false } ] }, { "description": "anyOf with base schema", "schema": { "type": "string", "anyOf" : [ { "maxLength": 2 }, { "minLength": 4 } ] }, "tests": [ { "description": "mismatch base schema", "data": 3, "valid": false }, { "description": "one anyOf valid", "data": "foobar", "valid": true }, { "description": "both anyOf invalid", "data": "foo", "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/default.json000066400000000000000000000023711457312750000231300ustar00rootroot00000000000000[ { "description": "invalid type for default", "schema": { "properties": { "foo": { "type": "integer", "default": [] } } }, "tests": [ { "description": "valid when property is specified", "data": {"foo": 13}, "valid": true }, { "description": "still valid when the invalid default is used", "data": {}, "valid": true } ] }, { "description": "invalid string value for default", "schema": { "properties": { "bar": { "type": "string", "minLength": 4, "default": "bad" } } }, "tests": [ { "description": "valid when property is specified", "data": {"bar": "good"}, "valid": true }, { "description": "still valid when the invalid default is used", "data": {}, "valid": true } ] } ] validate-0.24.0/fixtures/jsonschema_suite/definitions.json000066400000000000000000000015261457312750000240200ustar00rootroot00000000000000[ { "description": "valid definition", "schema": {"$ref": "http://json-schema.org/draft-04/schema#"}, "tests": [ { "description": "valid definition schema", "data": { "definitions": { "foo": {"type": "integer"} } }, "valid": true } ] }, { "description": "invalid definition", "schema": {"$ref": "http://json-schema.org/draft-04/schema#"}, "tests": [ { "description": "invalid definition schema", "data": { "definitions": { "foo": {"type": 1} } }, "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/dependencies.json000066400000000000000000000065421457312750000241360ustar00rootroot00000000000000[ { "description": "dependencies", "schema": { "dependencies": {"bar": ["foo"]} }, "tests": [ { "description": "neither", "data": {}, "valid": true }, { "description": "nondependant", "data": {"foo": 1}, "valid": true }, { "description": "with dependency", "data": {"foo": 1, "bar": 2}, "valid": true }, { "description": "missing dependency", "data": {"bar": 2}, "valid": false }, { "description": "ignores arrays", "data": ["bar"], "valid": true }, { "description": "ignores strings", "data": "foobar", "valid": true }, { "description": "ignores other non-objects", "data": 12, "valid": true } ] }, { "description": "multiple dependencies", "schema": { "dependencies": {"quux": ["foo", "bar"]} }, "tests": [ { "description": "neither", "data": {}, "valid": true }, { "description": "nondependants", "data": {"foo": 1, "bar": 2}, "valid": true }, { "description": "with dependencies", "data": {"foo": 1, "bar": 2, "quux": 3}, "valid": true }, { "description": "missing dependency", "data": {"foo": 1, "quux": 2}, "valid": false }, { "description": "missing other dependency", "data": {"bar": 1, "quux": 2}, "valid": false }, { "description": "missing both dependencies", "data": {"quux": 1}, "valid": false } ] }, { "description": "multiple dependencies subschema", "schema": { "dependencies": { "bar": { "properties": { "foo": {"type": "integer"}, "bar": {"type": "integer"} } } } }, "tests": [ { "description": "valid", "data": {"foo": 1, "bar": 2}, "valid": true }, { "description": "no dependency", "data": {"foo": "quux"}, "valid": true }, { "description": "wrong type", "data": {"foo": "quux", "bar": 2}, "valid": false }, { "description": "wrong type other", "data": {"foo": 2, "bar": "quux"}, "valid": false }, { "description": "wrong type both", "data": {"foo": "quux", "bar": "quux"}, "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/enum.json000066400000000000000000000036671457312750000224610ustar00rootroot00000000000000[ { "description": "simple enum validation", "schema": {"enum": [1, 2, 3]}, "tests": [ { "description": "one of the enum is valid", "data": 1, "valid": true }, { "description": "something else is invalid", "data": 4, "valid": false } ] }, { "description": "heterogeneous enum validation", "schema": {"enum": [6, "foo", [], true, {"foo": 12}]}, "tests": [ { "description": "one of the enum is valid", "data": [], "valid": true }, { "description": "something else is invalid", "data": null, "valid": false }, { "description": "objects are deep compared", "data": {"foo": false}, "valid": false } ] }, { "description": "enums in properties", "schema": { "type":"object", "properties": { "foo": {"enum":["foo"]}, "bar": {"enum":["bar"]} }, "required": ["bar"] }, "tests": [ { "description": "both properties are valid", "data": {"foo":"foo", "bar":"bar"}, "valid": true }, { "description": "missing optional property is valid", "data": {"bar":"bar"}, "valid": true }, { "description": "missing required property is invalid", "data": {"foo":"foo"}, "valid": false }, { "description": "missing all properties is invalid", "data": {}, "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/format.json000066400000000000000000000105221457312750000227710ustar00rootroot00000000000000[ { "description": "validation of date-time strings", "schema": {"format": "date-time"}, "tests": [ { "description": "a valid date-time string", "data": "1963-06-19T08:30:06.283185Z", "valid": true }, { "description": "an invalid date-time string", "data": "06/19/1963 08:30:06 PST", "valid": false }, { "description": "only RFC3339 not all of ISO 8601 are valid", "data": "2013-350T01:01:01", "valid": false } ] }, { "description": "validation of URIs", "schema": {"format": "uri"}, "tests": [ { "description": "a valid URI", "data": "http://foo.bar/?baz=qux#quux", "valid": true }, { "description": "an invalid URI", "data": "\\\\WINDOWS\\fileshare", "valid": false }, { "description": "an invalid URI though valid URI reference", "data": "abc", "valid": false } ] }, { "description": "validation of e-mail addresses", "schema": {"format": "email"}, "tests": [ { "description": "a valid e-mail address", "data": "joe.bloggs@example.com", "valid": true }, { "description": "an invalid e-mail address", "data": "2962", "valid": false } ] }, { "description": "validation of IP addresses", "schema": {"format": "ipv4"}, "tests": [ { "description": "a valid IP address", "data": "192.168.0.1", "valid": true }, { "description": "an IP address with too many components", "data": "127.0.0.0.1", "valid": false }, { "description": "an IP address with out-of-range values", "data": "256.256.256.256", "valid": false }, { "description": "an IP address without 4 components", "data": "127.0", "valid": false }, { "description": "an IP address as an integer", "data": "0x7f000001", "valid": false } ] }, { "description": "validation of IPv6 addresses", "schema": {"format": "ipv6"}, "tests": [ { "description": "a valid IPv6 address", "data": "::1", "valid": true }, { "description": "an IPv6 address with out-of-range values", "data": "12345::", "valid": false }, { "description": "an IPv6 address with too many components", "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1", "valid": false }, { "description": "an IPv6 address containing illegal characters", "data": "::laptop", "valid": false } ] }, { "description": "validation of host names", "schema": {"format": "hostname"}, "tests": [ { "description": "a valid host name", "data": "www.example.com", "valid": true }, { "description": "a host name starting with an illegal character", "data": "-a-host-name-that-starts-with--", "valid": false }, { "description": "a host name containing illegal characters", "data": "not_a_valid_host_name", "valid": false }, { "description": "a host name with a component too long", "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component", "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/items.json000066400000000000000000000040611457312750000226230ustar00rootroot00000000000000[ { "description": "a schema given for items", "schema": { "items": {"type": "integer"} }, "tests": [ { "description": "valid items", "data": [ 1, 2, 3 ], "valid": true }, { "description": "wrong type of items", "data": [1, "x"], "valid": false }, { "description": "ignores non-arrays", "data": {"foo" : "bar"}, "valid": true }, { "description": "JavaScript pseudo-array is valid", "data": { "0": "invalid", "length": 1 }, "valid": true } ] }, { "description": "an array of schemas for items", "schema": { "items": [ {"type": "integer"}, {"type": "string"} ] }, "tests": [ { "description": "correct types", "data": [ 1, "foo" ], "valid": true }, { "description": "wrong types", "data": [ "foo", 1 ], "valid": false }, { "description": "incomplete array of items", "data": [ 1 ], "valid": true }, { "description": "array with additional items", "data": [ 1, "foo", true ], "valid": true }, { "description": "empty array", "data": [ ], "valid": true }, { "description": "JavaScript pseudo-array is valid", "data": { "0": "invalid", "1": "valid", "length": 2 }, "valid": true } ] } ] validate-0.24.0/fixtures/jsonschema_suite/maxItems.json000066400000000000000000000013021457312750000232640ustar00rootroot00000000000000[ { "description": "maxItems validation", "schema": {"maxItems": 2}, "tests": [ { "description": "shorter is valid", "data": [1], "valid": true }, { "description": "exact length is valid", "data": [1, 2], "valid": true }, { "description": "too long is invalid", "data": [1, 2, 3], "valid": false }, { "description": "ignores non-arrays", "data": "foobar", "valid": true } ] } ] validate-0.24.0/fixtures/jsonschema_suite/maxLength.json000066400000000000000000000016001457312750000234250ustar00rootroot00000000000000[ { "description": "maxLength validation", "schema": {"maxLength": 2}, "tests": [ { "description": "shorter is valid", "data": "f", "valid": true }, { "description": "exact length is valid", "data": "fo", "valid": true }, { "description": "too long is invalid", "data": "foo", "valid": false }, { "description": "ignores non-strings", "data": 100, "valid": true }, { "description": "two supplementary Unicode code points is long enough", "data": "\uD83D\uDCA9\uD83D\uDCA9", "valid": true } ] } ] validate-0.24.0/fixtures/jsonschema_suite/maxProperties.json000066400000000000000000000020251457312750000243420ustar00rootroot00000000000000[ { "description": "maxProperties validation", "schema": {"maxProperties": 2}, "tests": [ { "description": "shorter is valid", "data": {"foo": 1}, "valid": true }, { "description": "exact length is valid", "data": {"foo": 1, "bar": 2}, "valid": true }, { "description": "too long is invalid", "data": {"foo": 1, "bar": 2, "baz": 3}, "valid": false }, { "description": "ignores arrays", "data": [1, 2, 3], "valid": true }, { "description": "ignores strings", "data": "foobar", "valid": true }, { "description": "ignores other non-objects", "data": 12, "valid": true } ] } ] validate-0.24.0/fixtures/jsonschema_suite/maximum.json000066400000000000000000000022711457312750000231600ustar00rootroot00000000000000[ { "description": "maximum validation", "schema": {"maximum": 3.0}, "tests": [ { "description": "below the maximum is valid", "data": 2.6, "valid": true }, { "description": "boundary point is valid", "data": 3.0, "valid": true }, { "description": "above the maximum is invalid", "data": 3.5, "valid": false }, { "description": "ignores non-numbers", "data": "x", "valid": true } ] }, { "description": "exclusiveMaximum validation", "schema": { "maximum": 3.0, "exclusiveMaximum": true }, "tests": [ { "description": "below the maximum is still valid", "data": 2.2, "valid": true }, { "description": "boundary point is invalid", "data": 3.0, "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/minItems.json000066400000000000000000000012651457312750000232720ustar00rootroot00000000000000[ { "description": "minItems validation", "schema": {"minItems": 1}, "tests": [ { "description": "longer is valid", "data": [1, 2], "valid": true }, { "description": "exact length is valid", "data": [1], "valid": true }, { "description": "too short is invalid", "data": [], "valid": false }, { "description": "ignores non-arrays", "data": "", "valid": true } ] } ] validate-0.24.0/fixtures/jsonschema_suite/minLength.json000066400000000000000000000015661457312750000234360ustar00rootroot00000000000000[ { "description": "minLength validation", "schema": {"minLength": 2}, "tests": [ { "description": "longer is valid", "data": "foo", "valid": true }, { "description": "exact length is valid", "data": "fo", "valid": true }, { "description": "too short is invalid", "data": "f", "valid": false }, { "description": "ignores non-strings", "data": 1, "valid": true }, { "description": "one supplementary Unicode code point is not long enough", "data": "\uD83D\uDCA9", "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/minProperties.json000066400000000000000000000017541457312750000243500ustar00rootroot00000000000000[ { "description": "minProperties validation", "schema": {"minProperties": 1}, "tests": [ { "description": "longer is valid", "data": {"foo": 1, "bar": 2}, "valid": true }, { "description": "exact length is valid", "data": {"foo": 1}, "valid": true }, { "description": "too short is invalid", "data": {}, "valid": false }, { "description": "ignores arrays", "data": [], "valid": true }, { "description": "ignores strings", "data": "", "valid": true }, { "description": "ignores other non-objects", "data": 12, "valid": true } ] } ] validate-0.24.0/fixtures/jsonschema_suite/minimum.json000066400000000000000000000022711457312750000231560ustar00rootroot00000000000000[ { "description": "minimum validation", "schema": {"minimum": 1.1}, "tests": [ { "description": "above the minimum is valid", "data": 2.6, "valid": true }, { "description": "boundary point is valid", "data": 1.1, "valid": true }, { "description": "below the minimum is invalid", "data": 0.6, "valid": false }, { "description": "ignores non-numbers", "data": "x", "valid": true } ] }, { "description": "exclusiveMinimum validation", "schema": { "minimum": 1.1, "exclusiveMinimum": true }, "tests": [ { "description": "above the minimum is still valid", "data": 1.2, "valid": true }, { "description": "boundary point is invalid", "data": 1.1, "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/multipleOf.json000066400000000000000000000027651457312750000236330ustar00rootroot00000000000000[ { "description": "by int", "schema": {"multipleOf": 2}, "tests": [ { "description": "int by int", "data": 10, "valid": true }, { "description": "int by int fail", "data": 7, "valid": false }, { "description": "ignores non-numbers", "data": "foo", "valid": true } ] }, { "description": "by number", "schema": {"multipleOf": 1.5}, "tests": [ { "description": "zero is multiple of anything", "data": 0, "valid": true }, { "description": "4.5 is multiple of 1.5", "data": 4.5, "valid": true }, { "description": "35 is not multiple of 1.5", "data": 35, "valid": false } ] }, { "description": "by small number", "schema": {"multipleOf": 0.0001}, "tests": [ { "description": "0.0075 is multiple of 0.0001", "data": 0.0075, "valid": true }, { "description": "0.00751 is not multiple of 0.0001", "data": 0.00751, "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/not.json000066400000000000000000000043321457312750000223030ustar00rootroot00000000000000[ { "description": "not", "schema": { "not": {"type": "integer"} }, "tests": [ { "description": "allowed", "data": "foo", "valid": true }, { "description": "disallowed", "data": 1, "valid": false } ] }, { "description": "not multiple types", "schema": { "not": {"type": ["integer", "boolean"]} }, "tests": [ { "description": "valid", "data": "foo", "valid": true }, { "description": "mismatch", "data": 1, "valid": false }, { "description": "other mismatch", "data": true, "valid": false } ] }, { "description": "not more complex schema", "schema": { "not": { "type": "object", "properties": { "foo": { "type": "string" } } } }, "tests": [ { "description": "match", "data": 1, "valid": true }, { "description": "other match", "data": {"foo": 1}, "valid": true }, { "description": "mismatch", "data": {"foo": "bar"}, "valid": false } ] }, { "description": "forbidden property", "schema": { "properties": { "foo": { "not": {} } } }, "tests": [ { "description": "property present", "data": {"foo": 1, "bar": 2}, "valid": false }, { "description": "property absent", "data": {"bar": 1, "baz": 2}, "valid": true } ] } ] validate-0.24.0/fixtures/jsonschema_suite/oneOf.json000066400000000000000000000031071457312750000225500ustar00rootroot00000000000000[ { "description": "oneOf", "schema": { "oneOf": [ { "type": "integer" }, { "minimum": 2 } ] }, "tests": [ { "description": "first oneOf valid", "data": 1, "valid": true }, { "description": "second oneOf valid", "data": 2.5, "valid": true }, { "description": "both oneOf valid", "data": 3, "valid": false }, { "description": "neither oneOf valid", "data": 1.5, "valid": false } ] }, { "description": "oneOf with base schema", "schema": { "type": "string", "oneOf" : [ { "minLength": 2 }, { "maxLength": 4 } ] }, "tests": [ { "description": "mismatch base schema", "data": 3, "valid": false }, { "description": "one oneOf valid", "data": "foobar", "valid": true }, { "description": "both oneOf valid", "data": "foo", "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/optional/000077500000000000000000000000001457312750000224335ustar00rootroot00000000000000validate-0.24.0/fixtures/jsonschema_suite/optional/bignum.json000066400000000000000000000060031457312750000246060ustar00rootroot00000000000000[ { "description": "integer", "schema": {"type": "integer"}, "tests": [ { "description": "a bignum is an integer", "data": 12345678910111213141516171819202122232425262728293031, "valid": true } ] }, { "description": "number", "schema": {"type": "number"}, "tests": [ { "description": "a bignum is a number", "data": 98249283749234923498293171823948729348710298301928331, "valid": true } ] }, { "description": "integer", "schema": {"type": "integer"}, "tests": [ { "description": "a negative bignum is an integer", "data": -12345678910111213141516171819202122232425262728293031, "valid": true } ] }, { "description": "number", "schema": {"type": "number"}, "tests": [ { "description": "a negative bignum is a number", "data": -98249283749234923498293171823948729348710298301928331, "valid": true } ] }, { "description": "string", "schema": {"type": "string"}, "tests": [ { "description": "a bignum is not a string", "data": 98249283749234923498293171823948729348710298301928331, "valid": false } ] }, { "description": "integer comparison", "schema": {"maximum": 18446744073709551615}, "tests": [ { "description": "comparison works for high numbers", "data": 18446744073709551600, "valid": true } ] }, { "description": "float comparison with high precision", "schema": { "maximum": 972783798187987123879878123.18878137, "exclusiveMaximum": true }, "tests": [ { "description": "comparison works for high numbers", "data": 972783798187987123879878123.188781371, "valid": false } ] }, { "description": "integer comparison", "schema": {"minimum": -18446744073709551615}, "tests": [ { "description": "comparison works for very negative numbers", "data": -18446744073709551600, "valid": true } ] }, { "description": "float comparison with high precision on negative numbers", "schema": { "minimum": -972783798187987123879878123.18878137, "exclusiveMinimum": true }, "tests": [ { "description": "comparison works for very negative numbers", "data": -972783798187987123879878123.188781371, "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/optional/ecmascript-regex.json000066400000000000000000000005151457312750000265710ustar00rootroot00000000000000[ { "description": "ECMA 262 regex non-compliance", "schema": { "format": "regex" }, "tests": [ { "description": "ECMA 262 has no support for \\Z anchor from .NET", "data": "^\\S(|(.|\\n)*\\S)\\Z", "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/optional/format.json000066400000000000000000000162671457312750000246320ustar00rootroot00000000000000[ { "description": "validation of date-time strings", "schema": {"format": "date-time"}, "tests": [ { "description": "a valid date-time string", "data": "1963-06-19T08:30:06.283185Z", "valid": true }, { "description": "an invalid date-time string", "data": "06/19/1963 08:30:06 PST", "valid": false }, { "description": "only RFC3339 not all of ISO 8601 are valid", "data": "2013-350T01:01:01", "valid": false } ] }, { "description": "validation of URIs", "schema": {"format": "uri"}, "tests": [ { "description": "a valid URL with anchor tag", "data": "http://foo.bar/?baz=qux#quux", "valid": true }, { "description": "a valid URL with anchor tag and parantheses", "data": "http://foo.com/blah_(wikipedia)_blah#cite-1", "valid": true }, { "description": "a valid URL with URL-encoded stuff", "data": "http://foo.bar/?q=Test%20URL-encoded%20stuff", "valid": true }, { "description": "a valid puny-coded URL ", "data": "http://xn--nw2a.xn--j6w193g/", "valid": true }, { "description": "a valid URL with many special characters", "data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com", "valid": true }, { "description": "a valid URL based on IPv4", "data": "http://223.255.255.254", "valid": true }, { "description": "a valid URL with ftp scheme", "data": "ftp://ftp.is.co.za/rfc/rfc1808.txt", "valid": true }, { "description": "a valid URL for a simple text file", "data": "http://www.ietf.org/rfc/rfc2396.txt", "valid": true }, { "description": "a valid URL ", "data": "ldap://[2001:db8::7]/c=GB?objectClass?one", "valid": true }, { "description": "a valid mailto URI", "data": "mailto:John.Doe@example.com", "valid": true }, { "description": "a valid newsgroup URI", "data": "news:comp.infosystems.www.servers.unix", "valid": true }, { "description": "a valid tel URI", "data": "tel:+1-816-555-1212", "valid": true }, { "description": "a valid URN", "data": "urn:oasis:names:specification:docbook:dtd:xml:4.1.2", "valid": true }, { "description": "an invalid protocol-relative URI Reference", "data": "//foo.bar/?baz=qux#quux", "valid": false }, { "description": "an invalid relative URI Reference", "data": "/abc", "valid": false }, { "description": "an invalid URI", "data": "\\\\WINDOWS\\fileshare", "valid": false }, { "description": "an invalid URI though valid URI reference", "data": "abc", "valid": false }, { "description": "an invalid URI with spaces", "data": "http:// shouldfail.com", "valid": false }, { "description": "an invalid URI with spaces and missing scheme", "data": ":// should fail", "valid": false } ] }, { "description": "validation of e-mail addresses", "schema": {"format": "email"}, "tests": [ { "description": "a valid e-mail address", "data": "joe.bloggs@example.com", "valid": true }, { "description": "an invalid e-mail address", "data": "2962", "valid": false } ] }, { "description": "validation of IP addresses", "schema": {"format": "ipv4"}, "tests": [ { "description": "a valid IP address", "data": "192.168.0.1", "valid": true }, { "description": "an IP address with too many components", "data": "127.0.0.0.1", "valid": false }, { "description": "an IP address with out-of-range values", "data": "256.256.256.256", "valid": false }, { "description": "an IP address without 4 components", "data": "127.0", "valid": false }, { "description": "an IP address as an integer", "data": "0x7f000001", "valid": false } ] }, { "description": "validation of IPv6 addresses", "schema": {"format": "ipv6"}, "tests": [ { "description": "a valid IPv6 address", "data": "::1", "valid": true }, { "description": "an IPv6 address with out-of-range values", "data": "12345::", "valid": false }, { "description": "an IPv6 address with too many components", "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1", "valid": false }, { "description": "an IPv6 address containing illegal characters", "data": "::laptop", "valid": false } ] }, { "description": "validation of host names", "schema": {"format": "hostname"}, "tests": [ { "description": "a valid host name", "data": "www.example.com", "valid": true }, { "description": "a host name starting with an illegal character", "data": "-a-host-name-that-starts-with--", "valid": false }, { "description": "a host name containing illegal characters", "data": "not_a_valid_host_name", "valid": false }, { "description": "a host name with a component too long", "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component", "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/optional/zeroTerminatedFloats.json000066400000000000000000000006001457312750000274670ustar00rootroot00000000000000[ { "description": "some languages do not distinguish between different types of numeric value", "schema": { "type": "integer" }, "tests": [ { "description": "a float is not an integer even without fractional part", "data": 1.0, "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/pattern.json000066400000000000000000000015311457312750000231560ustar00rootroot00000000000000[ { "description": "pattern validation", "schema": {"pattern": "^a*$"}, "tests": [ { "description": "a matching pattern is valid", "data": "aaa", "valid": true }, { "description": "a non-matching pattern is invalid", "data": "abc", "valid": false }, { "description": "ignores non-strings", "data": true, "valid": true } ] }, { "description": "pattern is not anchored", "schema": {"pattern": "a+"}, "tests": [ { "description": "matches a substring", "data": "xxaayy", "valid": true } ] } ] validate-0.24.0/fixtures/jsonschema_suite/patternProperties.json000066400000000000000000000070741457312750000252430ustar00rootroot00000000000000[ { "description": "patternProperties validates properties matching a regex", "schema": { "patternProperties": { "f.*o": {"type": "integer"} } }, "tests": [ { "description": "a single valid match is valid", "data": {"foo": 1}, "valid": true }, { "description": "multiple valid matches is valid", "data": {"foo": 1, "foooooo" : 2}, "valid": true }, { "description": "a single invalid match is invalid", "data": {"foo": "bar", "fooooo": 2}, "valid": false }, { "description": "multiple invalid matches is invalid", "data": {"foo": "bar", "foooooo" : "baz"}, "valid": false }, { "description": "ignores arrays", "data": [], "valid": true }, { "description": "ignores strings", "data": "", "valid": true }, { "description": "ignores other non-objects", "data": 12, "valid": true } ] }, { "description": "multiple simultaneous patternProperties are validated", "schema": { "patternProperties": { "a*": {"type": "integer"}, "aaa*": {"maximum": 20} } }, "tests": [ { "description": "a single valid match is valid", "data": {"a": 21}, "valid": true }, { "description": "a simultaneous match is valid", "data": {"aaaa": 18}, "valid": true }, { "description": "multiple matches is valid", "data": {"a": 21, "aaaa": 18}, "valid": true }, { "description": "an invalid due to one is invalid", "data": {"a": "bar"}, "valid": false }, { "description": "an invalid due to the other is invalid", "data": {"aaaa": 31}, "valid": false }, { "description": "an invalid due to both is invalid", "data": {"aaa": "foo", "aaaa": 31}, "valid": false } ] }, { "description": "regexes are not anchored by default and are case sensitive", "schema": { "patternProperties": { "[0-9]{2,}": { "type": "boolean" }, "X_": { "type": "string" } } }, "tests": [ { "description": "non recognized members are ignored", "data": { "answer 1": "42" }, "valid": true }, { "description": "recognized members are accounted for", "data": { "a31b": null }, "valid": false }, { "description": "regexes are case sensitive", "data": { "a_x_3": 3 }, "valid": true }, { "description": "regexes are case sensitive, 2", "data": { "a_X_3": 3 }, "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/properties.json000066400000000000000000000057171457312750000237070ustar00rootroot00000000000000[ { "description": "object properties validation", "schema": { "properties": { "foo": {"type": "integer"}, "bar": {"type": "string"} } }, "tests": [ { "description": "both properties present and valid is valid", "data": {"foo": 1, "bar": "baz"}, "valid": true }, { "description": "one property invalid is invalid", "data": {"foo": 1, "bar": {}}, "valid": false }, { "description": "both properties invalid is invalid", "data": {"foo": [], "bar": {}}, "valid": false }, { "description": "doesn't invalidate other properties", "data": {"quux": []}, "valid": true }, { "description": "ignores arrays", "data": [], "valid": true }, { "description": "ignores other non-objects", "data": 12, "valid": true } ] }, { "description": "properties, patternProperties, additionalProperties interaction", "schema": { "properties": { "foo": {"type": "array", "maxItems": 3}, "bar": {"type": "array"} }, "patternProperties": {"f.o": {"minItems": 2}}, "additionalProperties": {"type": "integer"} }, "tests": [ { "description": "property validates property", "data": {"foo": [1, 2]}, "valid": true }, { "description": "property invalidates property", "data": {"foo": [1, 2, 3, 4]}, "valid": false }, { "description": "patternProperty invalidates property", "data": {"foo": []}, "valid": false }, { "description": "patternProperty validates nonproperty", "data": {"fxo": [1, 2]}, "valid": true }, { "description": "patternProperty invalidates nonproperty", "data": {"fxo": []}, "valid": false }, { "description": "additionalProperty ignores property", "data": {"bar": []}, "valid": true }, { "description": "additionalProperty validates others", "data": {"quux": 3}, "valid": true }, { "description": "additionalProperty invalidates others", "data": {"quux": "foo"}, "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/ref.json000066400000000000000000000132511457312750000222570ustar00rootroot00000000000000[ { "description": "root pointer ref", "schema": { "properties": { "foo": {"$ref": "#"} }, "additionalProperties": false }, "tests": [ { "description": "match", "data": {"foo": false}, "valid": true }, { "description": "recursive match", "data": {"foo": {"foo": false}}, "valid": true }, { "description": "mismatch", "data": {"bar": false}, "valid": false }, { "description": "recursive mismatch", "data": {"foo": {"bar": false}}, "valid": false } ] }, { "description": "relative pointer ref to object", "schema": { "properties": { "foo": {"type": "integer"}, "bar": {"$ref": "#/properties/foo"} } }, "tests": [ { "description": "match", "data": {"bar": 3}, "valid": true }, { "description": "mismatch", "data": {"bar": true}, "valid": false } ] }, { "description": "relative pointer ref to array", "schema": { "items": [ {"type": "integer"}, {"$ref": "#/items/0"} ] }, "tests": [ { "description": "match array", "data": [1, 2], "valid": true }, { "description": "mismatch array", "data": [1, "foo"], "valid": false } ] }, { "description": "escaped pointer ref", "schema": { "tilda~field": {"type": "integer"}, "slash/field": {"type": "integer"}, "percent%field": {"type": "integer"}, "properties": { "tilda": {"$ref": "#/tilda~0field"}, "slash": {"$ref": "#/slash~1field"}, "percent": {"$ref": "#/percent%25field"} } }, "tests": [ { "description": "slash invalid", "data": {"slash": "aoeu"}, "valid": false }, { "description": "tilda invalid", "data": {"tilda": "aoeu"}, "valid": false }, { "description": "percent invalid", "data": {"percent": "aoeu"}, "valid": false }, { "description": "slash valid", "data": {"slash": 123}, "valid": true }, { "description": "tilda valid", "data": {"tilda": 123}, "valid": true }, { "description": "percent valid", "data": {"percent": 123}, "valid": true } ] }, { "description": "nested refs", "schema": { "definitions": { "a": {"type": "integer"}, "b": {"$ref": "#/definitions/a"}, "c": {"$ref": "#/definitions/b"} }, "$ref": "#/definitions/c" }, "tests": [ { "description": "nested ref valid", "data": 5, "valid": true }, { "description": "nested ref invalid", "data": "a", "valid": false } ] }, { "description": "ref overrides any sibling keywords", "schema": { "definitions": { "reffed": { "type": "array" } }, "properties": { "foo": { "$ref": "#/definitions/reffed", "maxItems": 2 } } }, "tests": [ { "description": "ref valid", "data": { "foo": [] }, "valid": true }, { "description": "ref valid, maxItems ignored", "data": { "foo": [ 1, 2, 3] }, "valid": true }, { "description": "ref invalid", "data": { "foo": "string" }, "valid": false } ] }, { "description": "remote ref, containing refs itself", "schema": {"$ref": "http://json-schema.org/draft-04/schema#"}, "tests": [ { "description": "remote ref valid", "data": {"minLength": 1}, "valid": true }, { "description": "remote ref invalid", "data": {"minLength": -1}, "valid": false } ] }, { "description": "property named $ref that is not a reference", "schema": { "properties": { "$ref": {"type": "string"} } }, "tests": [ { "description": "property named $ref valid", "data": {"$ref": "a"}, "valid": true }, { "description": "property named $ref invalid", "data": {"$ref": 2}, "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/refRemote.json000066400000000000000000000036451457312750000234410ustar00rootroot00000000000000[ { "description": "remote ref", "schema": {"$ref": "http://localhost:1234/integer.json"}, "tests": [ { "description": "remote ref valid", "data": 1, "valid": true }, { "description": "remote ref invalid", "data": "a", "valid": false } ] }, { "description": "fragment within remote ref", "schema": {"$ref": "http://localhost:1234/subSchemas.json#/integer"}, "tests": [ { "description": "remote fragment valid", "data": 1, "valid": true }, { "description": "remote fragment invalid", "data": "a", "valid": false } ] }, { "description": "ref within remote ref", "schema": { "$ref": "http://localhost:1234/subSchemas.json#/refToInteger" }, "tests": [ { "description": "ref within ref valid", "data": 1, "valid": true }, { "description": "ref within ref invalid", "data": "a", "valid": false } ] }, { "description": "base URI change", "schema": { "id": "http://localhost:1234/", "items": { "id": "folder/", "items": {"$ref": "folderInteger.json"} } }, "tests": [ { "description": "base URI change ref valid", "data": [[1]], "valid": true }, { "description": "base URI change ref invalid", "data": [["a"]], "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/remotes/000077500000000000000000000000001457312750000222645ustar00rootroot00000000000000validate-0.24.0/fixtures/jsonschema_suite/remotes/folder/000077500000000000000000000000001457312750000235375ustar00rootroot00000000000000validate-0.24.0/fixtures/jsonschema_suite/remotes/folder/folderInteger.json000066400000000000000000000000311457312750000272150ustar00rootroot00000000000000{ "type": "integer" }validate-0.24.0/fixtures/jsonschema_suite/remotes/integer.json000066400000000000000000000000311457312750000246060ustar00rootroot00000000000000{ "type": "integer" }validate-0.24.0/fixtures/jsonschema_suite/remotes/name.json000066400000000000000000000002701457312750000240760ustar00rootroot00000000000000{ "definitions": { "orNull": { "anyOf": [ {"type": "null"}, {"$ref": "#"} ] } }, "type": "string" } validate-0.24.0/fixtures/jsonschema_suite/remotes/subSchemas.json000066400000000000000000000001561457312750000252560ustar00rootroot00000000000000{ "integer": { "type": "integer" }, "refToInteger": { "$ref": "#/integer" } }validate-0.24.0/fixtures/jsonschema_suite/required.json000066400000000000000000000024771457312750000233330ustar00rootroot00000000000000[ { "description": "required validation", "schema": { "properties": { "foo": {}, "bar": {} }, "required": ["foo"] }, "tests": [ { "description": "present required property is valid", "data": {"foo": 1}, "valid": true }, { "description": "non-present required property is invalid", "data": {"bar": 1}, "valid": false }, { "description": "ignores arrays", "data": [], "valid": true }, { "description": "ignores strings", "data": "", "valid": true }, { "description": "ignores other non-objects", "data": 12, "valid": true } ] }, { "description": "required default validation", "schema": { "properties": { "foo": {} } }, "tests": [ { "description": "not required by default", "data": {}, "valid": true } ] } ] validate-0.24.0/fixtures/jsonschema_suite/type.json000066400000000000000000000231631457312750000224670ustar00rootroot00000000000000[ { "description": "integer type matches integers", "schema": {"type": "integer"}, "tests": [ { "description": "an integer is an integer", "data": 1, "valid": true }, { "description": "a float is not an integer", "data": 1.1, "valid": false }, { "description": "a string is not an integer", "data": "foo", "valid": false }, { "description": "a string is still not an integer, even if it looks like one", "data": "1", "valid": false }, { "description": "an object is not an integer", "data": {}, "valid": false }, { "description": "an array is not an integer", "data": [], "valid": false }, { "description": "a boolean is not an integer", "data": true, "valid": false }, { "description": "null is not an integer", "data": null, "valid": false } ] }, { "description": "number type matches numbers", "schema": {"type": "number"}, "tests": [ { "description": "an integer is a number", "data": 1, "valid": true }, { "description": "a float is a number", "data": 1.1, "valid": true }, { "description": "a string is not a number", "data": "foo", "valid": false }, { "description": "a string is still not a number, even if it looks like one", "data": "1", "valid": false }, { "description": "an object is not a number", "data": {}, "valid": false }, { "description": "an array is not a number", "data": [], "valid": false }, { "description": "a boolean is not a number", "data": true, "valid": false }, { "description": "null is not a number", "data": null, "valid": false } ] }, { "description": "string type matches strings", "schema": {"type": "string"}, "tests": [ { "description": "1 is not a string", "data": 1, "valid": false }, { "description": "a float is not a string", "data": 1.1, "valid": false }, { "description": "a string is a string", "data": "foo", "valid": true }, { "description": "a string is still a string, even if it looks like a number", "data": "1", "valid": true }, { "description": "an object is not a string", "data": {}, "valid": false }, { "description": "an array is not a string", "data": [], "valid": false }, { "description": "a boolean is not a string", "data": true, "valid": false }, { "description": "null is not a string", "data": null, "valid": false } ] }, { "description": "object type matches objects", "schema": {"type": "object"}, "tests": [ { "description": "an integer is not an object", "data": 1, "valid": false }, { "description": "a float is not an object", "data": 1.1, "valid": false }, { "description": "a string is not an object", "data": "foo", "valid": false }, { "description": "an object is an object", "data": {}, "valid": true }, { "description": "an array is not an object", "data": [], "valid": false }, { "description": "a boolean is not an object", "data": true, "valid": false }, { "description": "null is not an object", "data": null, "valid": false } ] }, { "description": "array type matches arrays", "schema": {"type": "array"}, "tests": [ { "description": "an integer is not an array", "data": 1, "valid": false }, { "description": "a float is not an array", "data": 1.1, "valid": false }, { "description": "a string is not an array", "data": "foo", "valid": false }, { "description": "an object is not an array", "data": {}, "valid": false }, { "description": "an array is an array", "data": [], "valid": true }, { "description": "a boolean is not an array", "data": true, "valid": false }, { "description": "null is not an array", "data": null, "valid": false } ] }, { "description": "boolean type matches booleans", "schema": {"type": "boolean"}, "tests": [ { "description": "an integer is not a boolean", "data": 1, "valid": false }, { "description": "a float is not a boolean", "data": 1.1, "valid": false }, { "description": "a string is not a boolean", "data": "foo", "valid": false }, { "description": "an object is not a boolean", "data": {}, "valid": false }, { "description": "an array is not a boolean", "data": [], "valid": false }, { "description": "a boolean is a boolean", "data": true, "valid": true }, { "description": "null is not a boolean", "data": null, "valid": false } ] }, { "description": "null type matches only the null object", "schema": {"type": "null"}, "tests": [ { "description": "an integer is not null", "data": 1, "valid": false }, { "description": "a float is not null", "data": 1.1, "valid": false }, { "description": "a string is not null", "data": "foo", "valid": false }, { "description": "an object is not null", "data": {}, "valid": false }, { "description": "an array is not null", "data": [], "valid": false }, { "description": "a boolean is not null", "data": true, "valid": false }, { "description": "null is null", "data": null, "valid": true } ] }, { "description": "multiple types can be specified in an array", "schema": {"type": ["integer", "string"]}, "tests": [ { "description": "an integer is valid", "data": 1, "valid": true }, { "description": "a string is valid", "data": "foo", "valid": true }, { "description": "a float is invalid", "data": 1.1, "valid": false }, { "description": "an object is invalid", "data": {}, "valid": false }, { "description": "an array is invalid", "data": [], "valid": false }, { "description": "a boolean is invalid", "data": true, "valid": false }, { "description": "null is invalid", "data": null, "valid": false } ] } ] validate-0.24.0/fixtures/jsonschema_suite/uniqueItems.json000066400000000000000000000050651457312750000240170ustar00rootroot00000000000000[ { "description": "uniqueItems validation", "schema": {"uniqueItems": true}, "tests": [ { "description": "unique array of integers is valid", "data": [1, 2], "valid": true }, { "description": "non-unique array of integers is invalid", "data": [1, 1], "valid": false }, { "description": "numbers are unique if mathematically unequal", "data": [1.0, 1.00, 1], "valid": false }, { "description": "unique array of objects is valid", "data": [{"foo": "bar"}, {"foo": "baz"}], "valid": true }, { "description": "non-unique array of objects is invalid", "data": [{"foo": "bar"}, {"foo": "bar"}], "valid": false }, { "description": "unique array of nested objects is valid", "data": [ {"foo": {"bar" : {"baz" : true}}}, {"foo": {"bar" : {"baz" : false}}} ], "valid": true }, { "description": "non-unique array of nested objects is invalid", "data": [ {"foo": {"bar" : {"baz" : true}}}, {"foo": {"bar" : {"baz" : true}}} ], "valid": false }, { "description": "unique array of arrays is valid", "data": [["foo"], ["bar"]], "valid": true }, { "description": "non-unique array of arrays is invalid", "data": [["foo"], ["foo"]], "valid": false }, { "description": "1 and true are unique", "data": [1, true], "valid": true }, { "description": "0 and false are unique", "data": [0, false], "valid": true }, { "description": "unique heterogeneous types are valid", "data": [{}, [1], true, null, 1], "valid": true }, { "description": "non-unique heterogeneous types are invalid", "data": [{}, [1], true, null, {}, 1], "valid": false } ] } ] validate-0.24.0/fixtures/local_expansion/000077500000000000000000000000001457312750000204215ustar00rootroot00000000000000validate-0.24.0/fixtures/local_expansion/item.yaml000066400000000000000000000002501457312750000222400ustar00rootroot00000000000000type: object required: - title properties: id: type: integer format: uint64 readOnly: true title: type: string minLength: 2 maxLength: 80 validate-0.24.0/fixtures/local_expansion/spec.yaml000066400000000000000000000007431457312750000222430ustar00rootroot00000000000000--- swagger: "2.0" info: title: Item API description: Item API version: "1.0.0" host: item.api.local basePath: /v1 securityDefinitions: key: type: apiKey name: x-item-token in: header security: - key: [] consumes: - application/json produces: - application/json schemes: - http paths: /item: get: operationId: GetItem responses: 200: description: item detail response schema: "$ref": "item.yaml" validate-0.24.0/fixtures/petstore/000077500000000000000000000000001457312750000171105ustar00rootroot00000000000000validate-0.24.0/fixtures/petstore/swagger-invalid.json000066400000000000000000000136661457312750000231020ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Swagger Petstore", "contact": { "name": "Wordnik API Team", "url": "http://developer.wordnik.com" }, "license": { "name": "Creative Commons 4.0 International", "url": "http://creativecommons.org/licenses/by/4.0/" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/api", "schemes": [ "http" ], "paths": { "/pets": { "get": { "security": [ { "basic": [] } ], "tags": [ "Pet Operations" ], "operationId": "getAllPets", "parameters": [ { "name": "status", "in": "query", "description": "The status to filter by", "type": "string" }, { "name": "limit", "in": "query", "description": "The maximum number of results to return", "type": "integer", "format": "int64" } ], "summary": "Finds all pets in the system", "responses": { "200": { "description": "Pet response", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } }, "post": { "security": [ { "basic": [] } ], "tags": [ "Pet Operations" ], "operationId": "createPet", "summary": "Creates a new pet", "consumes": ["application/x-yaml"], "produces": ["application/x-yaml"], "parameters": [ { "name": "pet", "in": "body", "description": "The Pet to create", "required": true, "schema": { "$ref": "#/definitions/newPet" } } ], "responses": { "200": { "description": "Created Pet response", "schema": { "$ref": "#/definitions/Pet" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/pets/{id}": { "delete": { "security": [ { "apiKey": [] } ], "description": "Deletes the Pet by id", "operationId": "deletePet", "parameters": [ { "name": "id", "in": "path", "description": "ID of pet to delete", "required": true, "type": "integer", "format": "int64" } ], "responses": { "204": { "description": "pet deleted" }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/Error" } } } }, "get": { "tags": [ "Pet Operations" ], "operationId": "getPetById", "summary": "Finds the pet by id", "responses": { "200": { "description": "Pet response", "schema": { "$ref": "#/definitions/Pet" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } }, "parameters": [ { "name": "id", "in": "path", "description": "ID of pet", "required": true, "type": "integer", "format": "int64" } ] } }, "definitions": { "Category": { "id": "Category", "properties": { "id": { "format": "int64", "type": "integer" }, "name": { "type": "string" } } }, "Pet": { "id": "Pet", "properties": { "category": { "$ref": "#/definitions/Category" }, "id": { "description": "unique identifier for the pet", "format": "int64", "maximum": 100.0, "minimum": 0.0, "type": "integer" }, "name": { "type": "string" }, "photoUrls": { "items": { "type": "string" }, "type": "array" }, "status": { "description": "pet status in the store", "enum": [ "available", "pending", "sold" ], "type": "string" }, "tags": { "items": { "$ref": "#/definitions/Tag" }, "type": "array" } }, "required": [ "id", "name" ] }, "newPet": { "anyOf": [ { "$ref": "#/definitions/Pet" }, { "required": [ "name" ] } ] }, "Tag": { "id": "Tag", "properties": { "id": { "format": "int64", "type": "integer" }, "name": { "type": "string" } } }, "Error": { "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } } }, "consumes": [ "application/json", "application/xml" ], "produces": [ "application/json", "application/xml", "text/plain", "text/html" ], "securityDefinitions": { "basic": { "type": "basic" }, "apiKey": { "type": "apiKey", "in": "header", "name": "X-API-KEY" } } } validate-0.24.0/fixtures/petstore/swagger.json000066400000000000000000000136661457312750000214560ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Swagger Petstore", "contact": { "name": "Wordnik API Team", "url": "http://developer.wordnik.com" }, "license": { "name": "Creative Commons 4.0 International", "url": "http://creativecommons.org/licenses/by/4.0/" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/api", "schemes": [ "http" ], "paths": { "/pets": { "get": { "security": [ { "basic": [] } ], "tags": [ "Pet Operations" ], "operationId": "getAllPets", "parameters": [ { "name": "status", "in": "query", "description": "The status to filter by", "type": "string" }, { "name": "limit", "in": "query", "description": "The maximum number of results to return", "type": "integer", "format": "int64" } ], "summary": "Finds all pets in the system", "responses": { "200": { "description": "Pet response", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } }, "post": { "security": [ { "basic": [] } ], "tags": [ "Pet Operations" ], "operationId": "createPet", "summary": "Creates a new pet", "consumes": ["application/x-yaml"], "produces": ["application/x-yaml"], "parameters": [ { "name": "pet", "in": "body", "description": "The Pet to create", "required": true, "schema": { "$ref": "#/definitions/newPet" } } ], "responses": { "200": { "description": "Created Pet response", "schema": { "$ref": "#/definitions/Pet" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/pets/{id}": { "delete": { "security": [ { "apiKey": [] } ], "description": "Deletes the Pet by id", "operationId": "deletePet", "parameters": [ { "name": "id", "in": "path", "description": "ID of pet to delete", "required": true, "type": "integer", "format": "int64" } ], "responses": { "204": { "description": "pet deleted" }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/Error" } } } }, "get": { "tags": [ "Pet Operations" ], "operationId": "getPetById", "summary": "Finds the pet by id", "responses": { "200": { "description": "Pet response", "schema": { "$ref": "#/definitions/Pet" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } }, "parameters": [ { "name": "id", "in": "path", "description": "ID of pet", "required": true, "type": "integer", "format": "int64" } ] } }, "definitions": { "Category": { "id": "Category", "properties": { "id": { "format": "int64", "type": "integer" }, "name": { "type": "string" } } }, "Pet": { "id": "Pet", "properties": { "category": { "$ref": "#/definitions/Category" }, "id": { "description": "unique identifier for the pet", "format": "int64", "maximum": 100.0, "minimum": 0.0, "type": "integer" }, "name": { "type": "string" }, "photoUrls": { "items": { "type": "string" }, "type": "array" }, "status": { "description": "pet status in the store", "enum": [ "available", "pending", "sold" ], "type": "string" }, "tags": { "items": { "$ref": "#/definitions/Tag" }, "type": "array" } }, "required": [ "id", "name" ] }, "newPet": { "allOf": [ { "$ref": "#/definitions/Pet" }, { "required": [ "name" ] } ] }, "Tag": { "id": "Tag", "properties": { "id": { "format": "int64", "type": "integer" }, "name": { "type": "string" } } }, "Error": { "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } } }, "consumes": [ "application/json", "application/xml" ], "produces": [ "application/json", "application/xml", "text/plain", "text/html" ], "securityDefinitions": { "basic": { "type": "basic" }, "apiKey": { "type": "apiKey", "in": "header", "name": "X-API-KEY" } } } validate-0.24.0/fixtures/pruning/000077500000000000000000000000001457312750000167255ustar00rootroot00000000000000validate-0.24.0/fixtures/pruning/schema.json000066400000000000000000000034511457312750000210630ustar00rootroot00000000000000{ "properties": { "foo": { "type": "integer" }, "bar": { "type": "integer" }, "nested": { "type": "object", "properties": { "inner": { "type": "object", "properties": { "foo": { "type": "integer" }, "bar": { "type": "integer" } } } } }, "all": { "allOf": [ { "type": "object", "properties": { "foo": { "type": "integer" } } }, { "type": "object", "properties": { "bar": { "type": "integer" } } } ] }, "any": { "anyOf": [ { "type": "object", "properties": { "foo": { "type": "integer" } } }, { "type": "object", "properties": { "bar": { "type": "integer" } } } ] }, "one": { "oneOf": [ { "type": "object", "properties": { "foo": { "type": "integer" } }, "required": ["foo"] }, { "type": "object", "properties": { "bar": { "type": "integer" } } } ] }, "not": { "not": { "type": "object", "properties": { "foo": { "type": "integer" } } } }, "array": { "items": { "properties": { "foo": {} } } } }, "required": ["foo", "bar", "nested", "all", "any", "one"] } validate-0.24.0/fixtures/recursive_expansion/000077500000000000000000000000001457312750000213365ustar00rootroot00000000000000validate-0.24.0/fixtures/recursive_expansion/item.yaml000066400000000000000000000003621457312750000231610ustar00rootroot00000000000000item: type: object required: - title properties: id: type: integer format: uint64 readOnly: true title: type: string minLength: 2 maxLength: 80 subitem: $ref: "item.yaml#/item" validate-0.24.0/fixtures/recursive_expansion/spec.yaml000066400000000000000000000011771457312750000231620ustar00rootroot00000000000000--- swagger: "2.0" info: title: Item API description: Item API version: "1.0.0" host: item.api.local basePath: /v1 securityDefinitions: key: type: apiKey name: x-item-token in: header security: - key: [] consumes: - application/json produces: - application/json schemes: - http responses: itemResponse: description: Item schema: $ref: "item.yaml#/item" paths: /item: get: operationId: GetItem responses: 200: description: item detail response schema: $ref: "item.yaml#/item" default: $ref: "#/responses/itemResponse" validate-0.24.0/fixtures/schemas/000077500000000000000000000000001457312750000166665ustar00rootroot00000000000000validate-0.24.0/fixtures/schemas/int-enum.json000066400000000000000000000013471457312750000213220ustar00rootroot00000000000000[ { "schema": { "type": "object", "properties": { "sizes": { "type": "object", "properties": { "first": { "type": "object", "properties": { "count": { "type": "integer", "default": 3, "enum": [3, 5, 7] } }, "required": ["count"] } }, "required": ["first"] } }, "required": ["sizes"] }, "valid": { "sizes": { "first": { "count": 3 } } }, "invalid": { "sizes": { "first": { "count": 2 } } } } ] validate-0.24.0/fixtures/validation/000077500000000000000000000000001457312750000173755ustar00rootroot00000000000000validate-0.24.0/fixtures/validation/bitbucket.json000066400000000000000000007422251457312750000222600ustar00rootroot00000000000000{ "info": { "termsOfService": "https://www.atlassian.com/end-user-agreement", "version": "2.0", "contact": { "url": "https://bitbucket.org/support", "name": "Bitbucket Support", "email": "support@bitbucket.org" }, "description": "Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework.", "title": "Bitbucket API" }, "paths": { "/repositories/{username}/{repo_slug}/refs/branches/{name}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "name", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "refs" ] } }, "/teams/{username}/following": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "account" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the list of accounts this team is following.", "responses": { "200": { "description": "A paginated list of user objects.", "schema": { "$ref": "#/definitions/paginated_users" } }, "404": { "description": "If no team exists for the specified name, or if the specified account is a personal account, not a team account.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The team's username", "name": "username", "in": "path" } ], "tags": [ "teams" ] } }, "/repositories/{username}/{repo_slug}/commit/{sha}/comments/{comment_id}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "sha", "in": "path" }, { "required": true, "type": "string", "name": "comment_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified commit comment.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] } }, "/repositories/{username}/{repo_slug}/hooks": { "post": { "security": [ { "oauth2": [ "webhook" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Creates a new webhook on the specified repository.", "responses": { "201": { "description": "If the webhook was registered successfully.", "schema": { "$ref": "#/definitions/webhook_subscription" } }, "403": { "description": "If the authenticated user does not have permission to install webhooks on the specified repository.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "webhooks" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "webhook" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a paginated list of webhooks installed on this repository.", "responses": { "200": { "description": "The paginated list of installed webhooks.", "schema": { "$ref": "#/definitions/paginated_webhook_subscriptions" } }, "403": { "description": "If the authenticated user does not have permission to access the webhooks.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "webhooks" ] } }, "/repositories/{username}/{repo_slug}/issues/{issue_id}/attachments/{path}": { "delete": { "security": [ { "oauth2": [ "issue:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes an attachment.", "responses": { "401": { "description": "If the issue tracker is private and the request was not authenticated." }, "404": { "description": "If the specified repository, issue, or attachment does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "Indicates that the deletion was successful" } }, "parameters": [], "tags": [ "issue_tracker" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "issue_id", "in": "path" }, { "required": true, "type": "string", "name": "path", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the contents of the specified file attachment.\n\nNote that this endpoint does not return a JSON response, but instead\nreturns a redirect pointing to the actual file that in turn will return\nthe raw contents.\n\nThe redirect URL contains a one-time token that has a limited lifetime.\nAs a result, the link should not be persisted, stored, or shared.", "responses": { "401": { "description": "If the issue tracker is private and the request was not authenticated." }, "404": { "description": "If the specified repository or issue does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } }, "302": { "headers": { "Location": { "type": "string" } }, "description": "A redirect to the file's contents" } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/versions/{version_id}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "version_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified issue tracker version object.", "responses": { "200": { "description": "The specified version object.", "schema": { "$ref": "#/definitions/version" } }, "404": { "description": "If the specified repository or version does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The version's id", "name": "version_id", "in": "path" } ], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/issues/{issue_id}/vote": { "put": { "security": [ { "oauth2": [ "issue", "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Vote for this issue.\n\nTo cast your vote, do an empty PUT. The 204 status code indicates that\nthe operation was successful.", "responses": { "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "When the issue does not exist, the repo does not exist, or when the repos does not have an issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "Indicating the authenticated user has cast their vote successfully.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] }, "delete": { "security": [ { "oauth2": [ "issue:write", "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Retract your vote.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "issue_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue", "account" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Check whether the authenticated user has voted for this issue.\nA 204 status code indicates that the user has voted, while a 404\nimplies they haven't.", "responses": { "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the authenticated user has not voted for this issue, or when the repo does not exist, or does not have an issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "If the authenticated user has not voted for this issue.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/milestones": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the milestones that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", "responses": { "200": { "description": "The milestones that have been defined in the issue tracker.", "schema": { "$ref": "#/definitions/paginated_milestones" } }, "404": { "description": "If the specified repository does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/components": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the components that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", "responses": { "200": { "description": "The components that have been defined in the issue tracker.", "schema": { "$ref": "#/definitions/paginated_components" } }, "404": { "description": "If the specified repository does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/account/{username}/addons/{encoded_context_id}/refresh": { "put": { "security": [ { "oauth2": [ "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_context_id", "in": "path" } ] }, "/addon/linkers/{linker_key}/values": { "put": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "post": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "delete": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "parameters": [ { "required": true, "type": "string", "name": "linker_key", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] } }, "/repositories/{username}/{repo_slug}/refs/branches": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "refs" ] } }, "/hook_events/{subject_type}": { "parameters": [ { "required": true, "type": "string", "name": "subject_type", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a paginated list of all valid webhook events for the\nspecified entity.\n\nThis is public data that does not require any scopes or authentication.", "responses": { "200": { "description": "A paginated list of webhook types available to subscribe on.", "schema": { "$ref": "#/definitions/paginated_hook_events" } }, "404": { "description": "If an invalid `{subject_type}` value was specified.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "enum": [ "user", "repository", "team" ], "name": "subject_type", "required": true, "in": "path", "type": "string", "description": "A resource or subject type." } ], "tags": [ "webhooks" ] } }, "/users/{username}/followers": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the list of accounts that are following this team.", "responses": { "200": { "description": "A paginated list of user objects.", "schema": { "$ref": "#/definitions/paginated_users" } }, "404": { "description": "If no account exists for the specified name, or if the specified account is a team account, not a personal account.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The account's username", "name": "username", "in": "path" } ], "tags": [ "users" ] } }, "/repositories/{username}/{repo_slug}/default-reviewers": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the repository's default reviewers.\n\nThese are the users that are automatically added as reviewers on every\nnew pull request that is created.", "responses": { "200": { "description": "The paginated list of default reviewers" } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/repositories/{username}/{repo_slug}/downloads/{filename}": { "delete": { "security": [ { "oauth2": [ "repository:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes the specified download artifact from the repository.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "downloads" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "filename", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Return a redirect to the contents of a download artifact.\n\nThis endpoint returns the actual file contents and not the artifact's\nmetadata.\n\n $ curl -s -L https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads/hello.txt\n Hello World", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "downloads" ] } }, "/repositories/{username}/{repo_slug}/commit/{node}/statuses/build/{key}": { "put": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "node", "in": "path" }, { "required": true, "type": "string", "name": "key", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [] } }, "/repositories/{username}/{repo_slug}/watchers": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a paginated list of all the watchers on the specified\nrepository.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "repositories" ] } }, "/snippets/{username}/{encoded_id}/commits": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the changes (commits) made on this snippet.", "responses": { "200": { "description": "The paginated list of snippet commits.", "schema": { "$ref": "#/definitions/paginated_snippet_commit" } }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "snippets" ] } }, "/users/{username}/repositories": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "All repositories owned by a user/team. This includes private\nrepositories, but filtered down to the ones that the calling user has\naccess to.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "users", "teams" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/activity": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the pull request's activity log. This includes comments that\nwere made by the reviewers, updates and approvals.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/snippets/{username}/{encoded_id}/comments/{comment_id}": { "put": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Updates a comment.\n\nComments can only be updated by their author.", "responses": { "200": { "description": "The updated comment object." }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the comment or snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "snippets" ] }, "delete": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes a snippet comment.\n\nComments can only be removed by their author.", "responses": { "204": { "description": "Indicates the comment was deleted successfully." }, "403": { "description": "If the authenticated user is not the author of the comment.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the comment or the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "snippets" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" }, { "required": true, "type": "string", "name": "comment_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specific snippet comment.", "responses": { "200": { "description": "The specified comment.", "schema": { "$ref": "#/definitions/snippet_comment" } }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the comment or snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "snippets" ] } }, "/repositories/{username}/{repo_slug}/diff/{spec}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "spec", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] } }, "/repositories/{username}/{repo_slug}/branch-restrictions": { "post": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "branch_restrictions" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "branch_restrictions" ] } }, "/repositories/{username}/{repo_slug}/issues/{issue_id}/comments/{comment_id}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "issue_id", "in": "path" }, { "required": true, "type": "string", "name": "comment_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified issue comment object.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/hooks/{uid}": { "put": { "security": [ { "oauth2": [ "webhook" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Updates the specified webhook subscription.\n\nThe following properties can be mutated:\n\n* `description`\n* `url`\n* `active`\n* `events`", "responses": { "200": { "description": "The webhook subscription object.", "schema": { "$ref": "#/definitions/webhook_subscription" } }, "403": { "description": "If the authenticated user does not have permission to update the webhook.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the webhook or repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The installed webhook's id", "name": "uid", "in": "path" } ], "tags": [ "webhooks" ] }, "delete": { "security": [ { "oauth2": [ "webhook" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes the specified webhook subscription.", "responses": { "204": { "description": "When the webhook was deleted successfully", "schema": { "$ref": "#/definitions/webhook_subscription" } }, "403": { "description": "If the authenticated user does not have permission to delete the webhook.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the webhook or repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The installed webhook's id", "name": "uid", "in": "path" } ], "tags": [ "webhooks" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "uid", "in": "path" } ], "get": { "security": [ { "oauth2": [ "webhook" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the webhook installed on the specified repository.", "responses": { "200": { "description": "The webhook subscription object.", "schema": { "$ref": "#/definitions/webhook_subscription" } }, "404": { "description": "If the webhook or repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The installed webhook's id.", "name": "uid", "in": "path" } ], "tags": [ "webhooks" ] } }, "/users/{username}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "Gets the public information associated with a user account.\n\nIf the user's profile is private, `location`, `website` and\n`created_on` elements are omitted.", "responses": { "200": { "description": "The user object", "schema": { "$ref": "#/definitions/team" } }, "404": { "description": "If no user exists for the specified name or UUID, or if the specified account is a team account, not a personal account.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The account's username or UUID.", "name": "username", "in": "path" } ], "tags": [ "users" ] } }, "/snippets/{username}/{encoded_id}": { "put": { "responses": { "200": { "description": "The updated snippet object.", "schema": { "$ref": "#/definitions/snippet" } }, "401": { "description": "If the snippet is private and the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "403": { "description": "If authenticated user does not have permission to update the private snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet's id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ], "produces": [ "application/json", "multipart/related", "multipart/form-data" ], "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "consumes": [ "application/json", "multipart/related", "multipart/form-data" ], "description": "Used to update a snippet. Use this to add and delete files and to\nchange a snippet's title.\n\nTo update a snippet, one can either PUT a full snapshot, or only the\nparts that need to be changed.\n\nThe contract for PUT on this API is that properties missing from the\nrequest remain untouched so that snippets can be efficiently\nmanipulated with differential payloads.\n\nTo delete a property (e.g. the title, or a file), include its name in\nthe request, but omit its value (use `null`).\n\nAs in Git, explicit renaming of files is not supported. Instead, to\nrename a file, delete it and add it again under another name. This can\nbe done atomically in a single request. Rename detection is left to\nthe SCM.\n\nPUT supports three different content types for both request and\nresponse bodies:\n\n* `application/json`\n* `multipart/related`\n* `multipart/form-data`\n\nThe content type used for the request body can be different than that\nused for the response. Content types are specified using standard HTTP\nheaders.\n\nUse the `Content-Type` and `Accept` headers to select the desired\nrequest and response format.\n\n\napplication/json\n----------------\n\nAs with creation and retrieval, the content type determines what\nproperties can be manipulated. `application/json` does not support\nfile contents and is therefore limited to a snippet's meta data.\n\nTo update the title, without changing any of its files:\n\n $ curl -X POST -H \"Content-Type: application/json\" https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d '{\"title\": \"Updated title\"}'\n\n\nTo delete the title:\n\n $ curl -X POST -H \"Content-Type: application/json\" https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d '{\"title\": null}'\n\nNot all parts of a snippet can be manipulated. The owner and creator\nfor instance are immutable.\n\n\nmultipart/related\n-----------------\n\n`multipart/related` can be used to manipulate all of a snippet's\nproperties. The body is identical to a POST. properties omitted from\nthe request are left unchanged. Since the `start` part contains JSON,\nthe mechanism for manipulating the snippet's meta data is identical\nto `application/json` requests.\n\nTo update one of a snippet's file contents, while also changing its\ntitle:\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 288\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"title\": \"My updated snippet\",\n \"files\": {\n \"foo.txt\": {}\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"foo.txt\"\n Content-Disposition: attachment; filename=\"foo.txt\"\n\n Updated file contents.\n\n --===============1438169132528273974==--\n\nHere only the parts that are changed are included in the body. The\nother files remain untouched.\n\nNote the use of the `files` list in the JSON part. This list contains\nthe files that are being manipulated. This list should have\ncorresponding multiparts in the request that contain the new contents\nof these files.\n\nIf a filename in the `files` list does not have a corresponding part,\nit will be deleted from the snippet, as shown below:\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 188\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"files\": {\n \"image.png\": {}\n }\n }\n\n --===============1438169132528273974==--\n\nTo simulate a rename, delete a file and add the same file under\nanother name:\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 212\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"files\": {\n \"foo.txt\": {},\n \"bar.txt\": {}\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"bar.txt\"\n Content-Disposition: attachment; filename=\"bar.txt\"\n\n foo\n\n --===============1438169132528273974==--\n\n\nmultipart/form-data\n-----------------\n\nAgain, one can also use `multipart/form-data` to manipulate file\ncontents and meta data atomically.\n\n $ curl -X PUT http://localhost:12345/2.0/snippets/evzijst/kypj -F title=\"My updated snippet\" -F file=@foo.txt\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 351\n Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"file\"; filename=\"foo.txt\"\n Content-Type: text/plain\n\n foo\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"title\"\n\n My updated snippet\n ------------------------------63a4b224c59f\n\nTo delete a file, omit its contents while including its name in the\n`files` field:\n\n $ curl -X PUT https://api.bitbucket.org/2.0/snippets/evzijst/kypj -F files=image.png\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 149\n Content-Type: multipart/form-data; boundary=----------------------------ef8871065a86\n\n ------------------------------ef8871065a86\n Content-Disposition: form-data; name=\"files\"\n\n image.png\n ------------------------------ef8871065a86--\n\nThe explicit use of the `files` element in `multipart/related` and\n`multipart/form-data` is only required when deleting files.\nThe default mode of operation is for file parts to be processed,\nregardless of whether or not they are listed in `files`, as a\nconvenience to the client." }, "delete": { "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes a snippet and returns an empty response.", "responses": { "401": { "description": "If the snippet is private and the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "403": { "description": "If authenticated user does not have permission to delete the private snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "If the snippet was deleted successfully." } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet's id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" } ], "get": { "responses": { "200": { "description": "The snippet object.", "schema": { "$ref": "#/definitions/snippet" } }, "401": { "description": "If the snippet is private and the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "403": { "description": "If authenticated user does not have access to the private snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet's id.", "name": "encoded_id", "in": "path" } ], "produces": [ "application/json", "multipart/related", "multipart/form-data" ], "tags": [ "snippets" ], "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Retrieves a single snippet.\n\nSnippets support multiple content types:\n\n* application/json\n* multipart/related\n* multipart/form-data\n\n\napplication/json\n----------------\n\nThe default content type of the response is `application/json`.\nSince JSON is always `utf-8`, it cannot reliably contain file contents\nfor files that are not text. Therefore, JSON snippet documents only\ncontain the filename and links to the file contents.\n\nThis means that in order to retrieve all parts of a snippet, N+1\nrequests need to be made (where N is the number of files in the\nsnippet).\n\n\nmultipart/related\n-----------------\n\nTo retrieve an entire snippet in a single response, use the\n`Accept: multipart/related` HTTP request header.\n\n $ curl -H \"Accept: multipart/related\" https://api.bitbucket.org/2.0/snippets/evzijst/1\n\nResponse:\n\n HTTP/1.1 200 OK\n Content-Length: 2214\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/snippets/evzijst/kypj\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/comments\"\n },\n \"watchers\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/watchers\"\n },\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/commits\"\n }\n },\n \"id\": kypj,\n \"title\": \"My snippet\",\n \"created_on\": \"2014-12-29T22:22:04.790331+00:00\",\n \"updated_on\": \"2014-12-29T22:22:04.790331+00:00\",\n \"is_private\": false,\n \"files\": {\n \"foo.txt\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/foo.txt\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/snippets/evzijst/kypj#foo.txt\"\n }\n }\n },\n \"image.png\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/image.png\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/snippets/evzijst/kypj#image.png\"\n }\n }\n }\n ],\n \"owner\": {\n \"username\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/evzijst\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png\"\n }\n }\n },\n \"creator\": {\n \"username\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/evzijst\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png\"\n }\n }\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"foo.txt\"\n Content-Disposition: attachment; filename=\"foo.txt\"\n\n foo\n\n --===============1438169132528273974==\n Content-Type: image/png\n MIME-Version: 1.0\n Content-Transfer-Encoding: base64\n Content-ID: \"image.png\"\n Content-Disposition: attachment; filename=\"image.png\"\n\n iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m\n TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB\n cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5\n EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ\n 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN\n AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==\n --===============1438169132528273974==--\n\nmultipart/form-data\n-------------------\n\nAs with creating new snippets, `multipart/form-data` can be used as an\nalternative to `multipart/related`. However, the inherently flat\nstructure of form-data means that only basic, root-level properties\ncan be returned, while nested elements like `links` are omitted:\n\n $ curl -H \"Accept: multipart/form-data\" https://api.bitbucket.org/2.0/snippets/evzijst/kypj\n\nResponse:\n\n HTTP/1.1 200 OK\n Content-Length: 951\n Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"title\"\n Content-Type: text/plain; charset=\"utf-8\"\n\n My snippet\n ------------------------------63a4b224c59f--\n Content-Disposition: attachment; name=\"file\"; filename=\"foo.txt\"\n Content-Type: text/plain\n\n foo\n\n ------------------------------63a4b224c59f\n Content-Disposition: attachment; name=\"file\"; filename=\"image.png\"\n Content-Transfer-Encoding: base64\n Content-Type: application/octet-stream\n\n iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m\n TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB\n cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5\n EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ\n 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN\n AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==\n ------------------------------5957323a6b76--" } }, "/addon/linkers": { "parameters": [], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" }, { "required": true, "type": "string", "name": "comment_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a specific pull request comment.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/repositories/{username}/{repo_slug}/components/{component_id}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "component_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified issue tracker component object.", "responses": { "200": { "description": "The specified component object.", "schema": { "$ref": "#/definitions/component" } }, "404": { "description": "If the specified repository or component does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The component's id", "name": "component_id", "in": "path" } ], "tags": [ "issue_tracker" ] } }, "/addon": { "put": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "parameters": [], "delete": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] } }, "/users/{username}/following": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "account" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the list of accounts this user is following.", "responses": { "200": { "description": "A paginated list of user objects.", "schema": { "$ref": "#/definitions/paginated_users" } }, "404": { "description": "If no user exists for the specified name, or if the specified account is a team account, not a personal account.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The user's username", "name": "username", "in": "path" } ], "tags": [ "users" ] } }, "/repositories/{username}/{repo_slug}/issues/{issue_id}": { "delete": { "security": [ { "oauth2": [ "issue:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes the specified issue. This requires write access to the\nrepository.", "responses": { "200": { "description": "The issue object.", "schema": { "$ref": "#/definitions/issue" } }, "403": { "description": "When the authenticated user lacks isn't authorized to delete the issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the specified repository or issue does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "issue_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified issue.", "responses": { "200": { "description": "The issue object.", "schema": { "$ref": "#/definitions/issue" } }, "403": { "description": "When the authenticated user lacks isn't authorized to access the issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the specified repository or issue does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/teams/{username}/repositories": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "All repositories owned by a user/team. This includes private\nrepositories, but filtered down to the ones that the calling user has\naccess to.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "users", "teams" ] } }, "/repositories/{username}/{repo_slug}/downloads": { "post": { "security": [ { "oauth2": [ "repository:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Upload new download artifacts.\n\nTo upload files, perform a `multipart/form-data` POST containing one\nor more `files` fields:\n\n $ echo Hello World > hello.txt\n $ curl -s -u evzijst -X POST https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads -F files=@hello.txt\n\nWhen a file is uploaded with the same name as an existing artifact,\nthen the existing file will be replaced.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "downloads" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a list of download links associated with the repository.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "downloads" ] } }, "/repositories/{username}/{repo_slug}/refs": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "refs" ] } }, "/hook_events": { "parameters": [], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the webhook resource or subject types on which webhooks can\nbe registered.\n\nEach resource/subject type contains an `event` link that returns the\npaginated list of specific events each individual subject type can\nemit.\n\nThis endpoint is publicly accessible and does not require\nauthentication or scopes.", "responses": { "200": { "description": "A mapping of resource/subject types pointing to their individual event types.", "schema": { "$ref": "#/definitions/subject_types" } } }, "parameters": [], "tags": [ "webhooks" ] } }, "/teams/{username}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "Gets the public information associated with a team.\n\nIf the team's profile is private, `location`, `website` and\n`created_on` elements are omitted.", "responses": { "200": { "description": "The team object", "schema": { "$ref": "#/definitions/team" } }, "404": { "description": "If no team exists for the specified name or UUID, or if the specified account is a personal account, not a team account.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The team's username or UUID.", "name": "username", "in": "path" } ], "tags": [ "teams" ] } }, "/user/emails/{email}": { "parameters": [ { "required": true, "type": "string", "name": "email", "in": "path" } ], "get": { "security": [ { "oauth2": [ "email" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns details about a specific one of the authenticated user's\nemail addresses.\n\nDetails describe whether the address has been confirmed by the user and\nwhether it is the user's primary address or not.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "users" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/approve": { "post": { "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Approve the specified pull request as the authenticated user.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ], "delete": { "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Redact the authenticated user's approval of the specified pull\nrequest.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/repositories/{username}/{repo_slug}/patch/{spec}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "spec", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] } }, "/snippets/{username}/{encoded_id}/{node_id}/diff": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" }, { "required": true, "type": "string", "name": "node_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the diff of the specified commit against its first parent.\n\nNote that this resource is different in functionality from the `patch`\nresource.\n\nThe differences between a diff and a patch are:\n\n* patches have a commit header with the username, message, etc\n* diffs support the optional `path=foo/bar.py` query param to filter the\n diff to just that one file diff (not supported for patches)\n* for a merge, the diff will show the diff between the merge commit and\n its first parent (identical to how PRs work), while patch returns a\n response containing separate patches for each commit on the second\n parent's ancestry, up to the oldest common ancestor (identical to\n its reachability).\n\nNote that the character encoding of the contents of the diff is\nunspecified as Git and Mercurial do not track this, making it hard for\nBitbucket to reliably determine this.", "responses": { "200": { "description": "The raw diff contents." }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "type": "string", "description": "When used, only one the diff of the specified file will be returned.", "name": "path", "in": "query" }, { "required": true, "type": "string", "description": "The snippet id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ] } }, "/repositories/{username}/{repo_slug}/forks": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a paginated list of all the forks of the specified\nrepository.", "responses": { "200": { "description": "All forks.", "schema": { "$ref": "#/definitions/paginated_repositories" } } }, "parameters": [], "tags": [ "repositories" ] } }, "/repositories/{username}/{repo_slug}/issues": { "post": { "security": [ { "oauth2": [ "issue:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Creates a new issue.\n\nThis call requires authentication. Private repositories or private\nissue trackers require the caller to authenticate with an account that\nhas appropriate authorisation.\n\nThe authenticated user is used for the issue's `reporter` field.", "responses": { "201": { "headers": { "Location": { "type": "string", "description": "The (absolute) URL of the newly created issue." } }, "description": "The newly created issue.", "schema": { "$ref": "#/definitions/issue" } }, "403": { "description": "When the authenticated user lacks the privilege to create issues in the issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the specified repository or version does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } }, "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "schema": { "$ref": "#/definitions/issue" }, "required": true, "description": "The new issue. Note that the only required element is `title`. All other elements can be omitted from the body.", "name": "_body", "in": "body" } ], "tags": [ "issue_tracker" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the issues in the issue tracker.", "responses": { "200": { "description": "A paginated list of the issues matching any filter criteria that were provided.", "schema": { "$ref": "#/definitions/paginated_issues" } }, "404": { "description": "If the specified repository or version does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/issues/{issue_id}/attachments": { "post": { "security": [ { "oauth2": [ "issue:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Upload new issue attachments.\n\nTo upload files, perform a `multipart/form-data` POST containing one\nor more file fields.\n\nWhen a file is uploaded with the same name as an existing attachment,\nthen the existing file will be replaced.", "responses": { "400": { "description": "If no files were uploaded, or if the wrong `Content-Type` was used." }, "201": { "headers": { "Location": { "type": "string", "description": "The URL to the issue's collection of attachments." } }, "description": "An empty response document." }, "404": { "description": "If the specified repository or issue does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } }, "401": { "description": "If the issue tracker is private and the request was not authenticated." } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "issue_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all attachments for this issue.\n\nThis returns the files' meta data. This does not return the files'\nactual contents.\n\nThe files are always ordered by their upload date.", "responses": { "200": { "description": "A paginated list of all attachments for this issue.", "schema": { "$ref": "#/definitions/paginated_issue_attachments" } }, "401": { "description": "If the issue tracker is private and the request was not authenticated." }, "404": { "description": "If the specified repository or version does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/versions": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the versions that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", "responses": { "200": { "description": "The versions that have been defined in the issue tracker.", "schema": { "$ref": "#/definitions/paginated_versions" } }, "404": { "description": "If the specified repository does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/refs/tags/{name}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "name", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "refs" ] } }, "/snippets/{username}/{encoded_id}/watch": { "put": { "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Used to start watching a specific snippet. Returns 204 (No Content).", "responses": { "401": { "description": "If the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "Indicates the authenticated user is now watching the snippet.", "schema": { "$ref": "#/definitions/paginated_users" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ] }, "delete": { "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Used to stop watching a specific snippet. Returns 204 (No Content)\nto indicate success.", "responses": { "401": { "description": "If the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "Indicates the user stopped watching the snippet successfully.", "schema": { "$ref": "#/definitions/paginated_users" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Used to check if the current user is watching a specific snippet.\n\nReturns 204 (No Content) if the user is watching the snippet and 404 if\nnot.\n\nHitting this endpoint anonymously always returns a 404.", "responses": { "204": { "description": "If the authenticated user is watching the snippet.", "schema": { "$ref": "#/definitions/paginated_users" } }, "404": { "description": "If the snippet does not exist, or if the authenticated user is not watching the snippet.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/diff": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/snippets": { "post": { "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Creates a new snippet under the authenticated user's account.\n\nSnippets can contain multiple files. Both text and binary files are\nsupported.\n\nThe simplest way to create a new snippet from a local file:\n\n $ curl -u username:password -X POST https://api.bitbucket.org/2.0/snippets -F file=@image.png\n\nCreating snippets through curl has a few limitations and so let's look\nat a more complicated scenario.\n\nSnippets are created with a multipart POST. Both `multipart/form-data`\nand `multipart/related` are supported. Both allow the creation of\nsnippets with both meta data (title, etc), as well as multiple text\nand binary files.\n\nThe main difference is that `multipart/related` can use rich encoding\nfor the meta data (currently JSON).\n\n\nmultipart/related (RFC-2387)\n----------------------------\n\nThis is the most advanced and efficient way to create a paste.\n\n POST /2.0/snippets/evzijst HTTP/1.1\n Content-Length: 1188\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"title\": \"My snippet\",\n \"is_private\": true,\n \"scm\": \"hg\",\n \"files\": {\n \"foo.txt\": {},\n \"image.png\": {}\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"foo.txt\"\n Content-Disposition: attachment; filename=\"foo.txt\"\n\n foo\n\n --===============1438169132528273974==\n Content-Type: image/png\n MIME-Version: 1.0\n Content-Transfer-Encoding: base64\n Content-ID: \"image.png\"\n Content-Disposition: attachment; filename=\"image.png\"\n\n iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m\n TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB\n cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5\n EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ\n 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN\n AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==\n --===============1438169132528273974==--\n\nThe request contains multiple parts and is structured as follows.\n\nThe first part is the JSON document that describes the snippet's\nproperties or meta data. It either has to be the first part, or the\nrequest's `Content-Type` header must contain the `start` parameter to\npoint to it.\n\nThe remaining parts are the files of which there can be zero or more.\nEach file part should contain the `Content-ID` MIME header through\nwhich the JSON meta data's `files` element addresses it. The value\nshould be the name of the file.\n\n`Content-Disposition` is an optional MIME header. The header's\noptional `filename` parameter can be used to specify the file name\nthat Bitbucket should use when writing the file to disk. When present,\n`filename` takes precedence over the value of `Content-ID`.\n\nWhen the JSON body omits the `files` element, the remaining parts are\nnot ignored. Instead, each file is added to the new snippet as if its\nname was explicitly linked (the use of the `files` elements is\nmandatory for some operations like deleting or renaming files).\n\n\nmultipart/form-data\n-------------------\n\nThe use of JSON for the snippet's meta data is optional. Meta data can\nalso be supplied as regular form fields in a more conventional\n`multipart/form-data` request:\n\n $ curl -X POST -u credentials https://api.bitbucket.org/2.0/snippets -F title=\"My snippet\" -F file=@foo.txt -F file=@image.png\n\n POST /2.0/snippets HTTP/1.1\n Content-Length: 951\n Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"file\"; filename=\"foo.txt\"\n Content-Type: text/plain\n\n foo\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"file\"; filename=\"image.png\"\n Content-Type: application/octet-stream\n\n ?PNG\n\n IHDR?1??I.....\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"title\"\n\n My snippet\n ------------------------------63a4b224c59f--\n\nHere the meta data properties are included as flat, top-level form\nfields. The file attachments use the `file` field name. To attach\nmultiple files, simply repeat the field.\n\nThe advantage of `multipart/form-data` over `multipart/related` is\nthat it can be easier to build clients.\n\nEssentially all properties are optional, `title` and `files` included.\n\n\nSharing and Visibility\n----------------------\n\nSnippets can be either public (visible to anyone on Bitbucket, as well\nas anonymous users), or private (visible only to the owner, creator\nand members of the team in case the snippet is owned by a team). This\nis controlled through the snippet's `is_private` element:\n\n* **is_private=false** -- everyone, including anonymous users can view\n the snippet\n* **is_private=true** -- only the owner and team members (for team\n snippets) can view it\n\nTo create the snippet under a team account, just append the team name\nto the URL (see `/2.0/snippets/{username}`).", "responses": { "201": { "headers": { "Location": { "type": "string", "description": "The URL of the newly created snippet." } }, "description": "The newly created snippet object.", "schema": { "$ref": "#/definitions/snippet" } }, "401": { "description": "If the request was not authenticated", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "schema": { "$ref": "#/definitions/snippet" }, "required": true, "description": "The new snippet object.", "name": "_body", "in": "body" } ], "tags": [ "snippets" ] }, "parameters": [], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all snippets. Like pull requests, repositories and teams, the\nfull set of snippets is defined by what the current user has access to.\n\nThis includes all snippets owned by the current user, but also all snippets\nowned by any of the teams the user is a member of, or snippets by other\nusers that the current user is either watching or has collaborated on (for\ninstance by commenting on it).\n\nTo limit the set of returned snippets, apply the\n`?role=[owner|contributor|member]` query parameter where the roles are\ndefined as follows:\n\n* `owner`: all snippets owned by the current user\n* `contributor`: all snippets owned by, or watched by the current user\n* `member`: owned by the user, their teams, or watched by the current user\n\nWhen no role is specified, all public snippets are returned, as well as all\nprivately owned snippets watched or commented on.\n\nThe returned response is a normal paginated JSON list. This endpoint\nonly supports `application/json` responses and no\n`multipart/form-data` or `multipart/related`. As a result, it is not\npossible to include the file contents.", "responses": { "200": { "description": "A paginated list of snippets.", "schema": { "$ref": "#/definitions/paginated_snippets" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "enum": [ "owner", "contributor", "member" ], "name": "role", "required": false, "in": "query", "type": "string", "description": "Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`)." } ], "tags": [ "snippets" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}": { "put": { "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Mutates the specified pull request.\n\nThis can be used to change the pull request's branches or description.\n\nOnly open pull requests can be mutated.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified pull request.", "responses": { "200": { "description": "The pull request object", "schema": { "$ref": "#/definitions/pullrequest" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all the pull request's comments.\n\nThis includes both global, inline comments and replies.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/account/{username}/addons/{encoded_context_id}": { "put": { "security": [ { "oauth2": [ "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "delete": { "security": [ { "oauth2": [ "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_context_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/decline": { "post": { "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ] }, "/user/emails": { "parameters": [], "get": { "security": [ { "oauth2": [ "email" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all the authenticated user's email addresses. Both\nconfirmed and unconfirmed.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "users" ] } }, "/repositories/{username}/{repo_slug}/pullrequests": { "post": { "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Creates a new pull request.", "responses": { "201": { "headers": { "Location": { "type": "string", "description": "The URL of new newly created pull request." } }, "description": "The newly created pull request.", "schema": { "$ref": "#/definitions/pullrequest" } } }, "parameters": [ { "schema": { "$ref": "#/definitions/pullrequest" }, "required": false, "description": "The new pull request.\n\nThe request URL you POST to becomes the destination repository URL. For this reason, you must specify an explicit source repository in the request object if you want to pull from a different repository (fork).\n\nSince not all elements are required or even mutable, you only need to include the elements you want to initialize, such as the source branch and the title.", "name": "_body", "in": "body" } ], "tags": [ "pullrequests" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all pull requests on the specified repository.\n\nBy default only open pull requests are returned. This can be controlled\nusing the `state` query parameter. To retrieve pull requests that are\nin one of multiple states, repeat the `state` parameter for each\nindividual state.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "enum": [ "MERGED", "SUPERSEDED", "OPEN", "DECLINED" ], "type": "string", "description": "Only return pull requests that in this state. This parameter can be repeated.", "name": "state", "in": "query" } ], "tags": [ "pullrequests" ] } }, "/repositories/{username}/{repo_slug}/commits": { "post": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Identical to `GET /repositories/{username}/{repo_slug}/commits`,\nexcept that POST allows clients to place the include and exclude\nparameters in the request body to avoid URL length issues.\n\n**Note that this resource does NOT support new commit creation.**", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "These are the repository's commits. They are paginated and returned\nin reverse chronological order, similar to the output of `git log` and\n`hg log`. Like these tools, the DAG can be filtered.\n\n## GET /repositories/{username}/{repo_slug}/commits/\n\nReturns all commits in the repo in topological order (newest commit\nfirst). All branches and tags are included (similar to\n`git log --all` and `hg log`).\n\n## GET /repositories/{username}/{repo_slug}/commits/master\n\nReturns all commits on rev `master` (similar to `git log master`,\n`hg log master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/dev?exclude=master\n\nReturns all commits on ref `dev`, except those that are reachable on\n`master` (similar to `git log dev ^master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/?exclude=master\n\nReturns all commits in the repo that are not on master\n(similar to `git log --all ^master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar\n\nReturns all commits that are on refs `foo` or `bar`, but not on `fu` or\n`fubar` (similar to `git log foo bar ^fu ^fubar`).\n\nBecause the response could include a very large number of commits, it\nis paginated. Follow the 'next' link in the response to navigate to the\nnext page of commits. As with other paginated resources, do not\nconstruct your own links.\n\nWhen the include and exclude parameters are more than ca fit in a\nquery string, clients can use a `x-www-form-urlencoded` POST instead.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] } }, "/repositories/{username}/{repo_slug}/commit/{sha}/comments": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "sha", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the commit's comments.\n\nThis includes both global and inline comments.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] } }, "/repositories/{username}/{repo_slug}/commit/{revision}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "revision", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified commit.", "responses": { "200": { "description": "The commit object", "schema": { "$ref": "#/definitions/commit" } }, "404": { "description": "If the specified commit or repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The commit's SHA1.", "name": "revision", "in": "path" } ], "tags": [ "commits" ] } }, "/snippets/{username}": { "post": { "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Identical to `/snippets`, except that the new snippet will be\ncreated under the account specified in the path parameter `{username}`.", "responses": { "201": { "headers": { "Location": { "type": "string", "description": "The URL of the newly created snippet." } }, "description": "The newly created snippet object.", "schema": { "$ref": "#/definitions/snippet" } }, "403": { "description": "If the authenticated user does not have permission to create snippets under the specified account.", "schema": { "$ref": "#/definitions/error" } }, "401": { "description": "If the request was not authenticated", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "schema": { "$ref": "#/definitions/snippet" }, "required": true, "description": "The new snippet object.", "name": "_body", "in": "body" } ], "tags": [ "snippets" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Identical to `/snippets`, except that the result is further filtered\nby the snippet owner and only those that are owned by `{username}` are\nreturned.", "responses": { "200": { "description": "A paginated list of snippets.", "schema": { "$ref": "#/definitions/paginated_snippets" } }, "404": { "description": "If the user does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "enum": [ "owner", "contributor", "member" ], "name": "role", "required": false, "in": "query", "type": "string", "description": "Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`)." }, { "required": true, "type": "string", "description": "Limits the result to snippets owned by this user.", "name": "username", "in": "path" } ], "tags": [ "snippets" ] } }, "/repositories/{username}/{repo_slug}/issues/{issue_id}/watch": { "put": { "security": [ { "oauth2": [ "issue", "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Start watching this issue.\n\nTo start watching this issue, do an empty PUT. The 204 status code\nindicates that the operation was successful.", "responses": { "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "Indicates that the authenticated user successfully started watching this issue.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] }, "delete": { "security": [ { "oauth2": [ "issue:write", "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Stop watching this issue.", "responses": { "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the issue or the repo does not exist, or the repository does not have an issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "Indicates that the authenticated user successfully stopped watching this issue.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "issue_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue", "account" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Indicated whether or not the authenticated user is watching this\nissue.", "responses": { "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "If the authenticated user is watching this issue.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The issue's id", "name": "issue_id", "in": "path" } ], "tags": [ "issue_tracker" ] } }, "/repositories/{username}/{repo_slug}/milestones/{milestone_id}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "milestone_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified issue tracker milestone object.", "responses": { "200": { "description": "The specified milestone object.", "schema": { "$ref": "#/definitions/milestone" } }, "404": { "description": "If the specified repository or milestone does not exist, or if the repository doesn't have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "integer", "description": "The milestone's id", "name": "milestone_id", "in": "path" } ], "tags": [ "issue_tracker" ] } }, "/teams": { "parameters": [], "get": { "security": [ { "oauth2": [ "team" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all the teams that the authenticated user is associated\nwith.", "responses": { "200": { "description": "A paginated list of teams.", "schema": { "$ref": "#/definitions/paginated_teams" } }, "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "enum": [ "admin", "contributor", "member" ], "name": "role", "required": false, "in": "query", "type": "string", "description": "\nFilters the teams based on the authenticated user's role on each team.\n\n* **member**: returns a list of all the teams which the caller is a member of\n at least one team group or repository owned by the team\n* **contributor**: returns a list of teams which the caller has write access\n to at least one repository owned by the team\n* **admin**: returns a list teams which the caller has team administrator access\n" } ], "tags": [ "teams" ] } }, "/user": { "parameters": [], "get": { "security": [ { "oauth2": [ "account" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the currently logged in user.", "responses": { "200": { "description": "The current user.", "schema": { "$ref": "#/definitions/user" } }, "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "users" ] } }, "/repositories/{username}/{repo_slug}/commits/{revision}": { "post": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Identical to `GET /repositories/{username}/{repo_slug}/commits`,\nexcept that POST allows clients to place the include and exclude\nparameters in the request body to avoid URL length issues.\n\n**Note that this resource does NOT support new commit creation.**", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "revision", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "These are the repository's commits. They are paginated and returned\nin reverse chronological order, similar to the output of `git log` and\n`hg log`. Like these tools, the DAG can be filtered.\n\n## GET /repositories/{username}/{repo_slug}/commits/\n\nReturns all commits in the repo in topological order (newest commit\nfirst). All branches and tags are included (similar to\n`git log --all` and `hg log`).\n\n## GET /repositories/{username}/{repo_slug}/commits/master\n\nReturns all commits on rev `master` (similar to `git log master`,\n`hg log master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/dev?exclude=master\n\nReturns all commits on ref `dev`, except those that are reachable on\n`master` (similar to `git log dev ^master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/?exclude=master\n\nReturns all commits in the repo that are not on master\n(similar to `git log --all ^master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar\n\nReturns all commits that are on refs `foo` or `bar`, but not on `fu` or\n`fubar` (similar to `git log foo bar ^fu ^fubar`).\n\nBecause the response could include a very large number of commits, it\nis paginated. Follow the 'next' link in the response to navigate to the\nnext page of commits. As with other paginated resources, do not\nconstruct your own links.\n\nWhen the include and exclude parameters are more than ca fit in a\nquery string, clients can use a `x-www-form-urlencoded` POST instead.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "commits" ] } }, "/snippets/{username}/{encoded_id}/comments": { "post": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Creates a new comment.\n\nThe only required field in the body is `content.raw`.\n\nTo create a threaded reply to an existing comment, include `parent.id`.", "responses": { "201": { "headers": { "Location": { "type": "string", "description": "The URL of the new comment" } }, "description": "The newly created comment.", "schema": { "$ref": "#/definitions/snippet" } }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "schema": { "$ref": "#/definitions/snippet" }, "required": true, "description": "The contents of the new comment.", "name": "_body", "in": "body" } ], "tags": [ "snippets" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Used to retrieve a paginated list of all comments for a specific\nsnippet.\n\nThis resource works identical to commit and pull request comments.", "responses": { "200": { "description": "A paginated list of snippet comments, ordered by creation date.", "schema": { "$ref": "#/definitions/paginated_snippet_comments" } }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "snippets" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/activity": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the pull request's activity log. This includes comments that\nwere made by the reviewers, updates and approvals.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/repositories/{username}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all repositories owned by the specified account.\n\nThe result can be narrowed down based on the authenticated user's role.\n\nE.g. with `?role=contributor`, only those repositories that the\nauthenticated user has write access to are returned (this includes any\nrepo the user is an admin on, as that implies write access).", "responses": { "200": { "description": "The repositories owned by the specified account.", "schema": { "$ref": "#/definitions/paginated_repositories" } }, "404": { "description": "If the specified account does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "enum": [ "admin", "contributor", "member", "owner" ], "name": "role", "required": false, "in": "query", "type": "string", "description": "\nFilters the result based on the authenticated user's role on each repository.\n\n* **member**: returns repositories to which the user has explicit read access\n* **contributor**: returns repositories to which the user has explicit write access\n* **admin**: returns repositories to which the user has explicit administrator access\n* **owner**: returns all repositories owned by the current user\n" } ], "tags": [ "repositories" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/merge": { "post": { "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ] }, "/snippets/{username}/{encoded_id}/commits/": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "200": { "description": "The specified snippet commit.", "schema": { "$ref": "#/definitions/snippet_commit" } }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the commit or the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "snippets" ] } }, "/snippets/{username}/{encoded_id}/{node_id}/patch": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" }, { "required": true, "type": "string", "name": "node_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the patch of the specified commit against its first\nparent.\n\nNote that this resource is different in functionality from the `diff`\nresource.\n\nThe differences between a diff and a patch are:\n\n* patches have a commit header with the username, message, etc\n* diffs support the optional `path=foo/bar.py` query param to filter the\n diff to just that one file diff (not supported for patches)\n* for a merge, the diff will show the diff between the merge commit and\n its first parent (identical to how PRs work), while patch returns a\n response containing separate patches for each commit on the second\n parent's ancestry, up to the oldest common ancestor (identical to\n its reachability).\n\nNote that the character encoding of the contents of the patch is\nunspecified as Git and Mercurial do not track this, making it hard for\nBitbucket to reliably determine this.", "responses": { "200": { "description": "The raw patch contents." }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ] } }, "/teams/{username}/followers": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the list of accounts that are following this team.", "responses": { "200": { "description": "A paginated list of user objects.", "schema": { "$ref": "#/definitions/paginated_users" } }, "404": { "description": "If no team exists for the specified name, or if the specified account is a personal account, not a team account.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The team's username", "name": "username", "in": "path" } ], "tags": [ "teams" ] } }, "/snippets/{username}/{encoded_id}/{node_id}/files/{path}": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" }, { "required": true, "type": "string", "name": "node_id", "in": "path" }, { "required": true, "type": "string", "name": "path", "in": "path" } ], "get": { "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Retrieves the raw contents of a specific file in the snippet. The\n`Content-Disposition` header will be \"attachment\" to avoid issues with\nmalevolent executable files.\n\nThe file's mime type is derived from its filename and returned in the\n`Content-Type` header.\n\nNote that for text files, no character encoding is included as part of\nthe content type.", "responses": { "200": { "headers": { "Content-Type": { "type": "string", "description": "The mime type as derived from the filename" }, "Content-Disposition": { "type": "string", "description": "attachment" } }, "description": "Returns the contents of the specified file." }, "403": { "description": "If the authenticated user does not have access to the snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the file or snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "snippets" ] } }, "/addon/linkers/{linker_key}": { "parameters": [ { "required": true, "type": "string", "name": "linker_key", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] } }, "/repositories/{username}/{repo_slug}/refs/tags": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "refs" ] } }, "/repositories/{username}/{repo_slug}/commit/{node}/approve": { "post": { "security": [ { "oauth2": [ "repository:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Approve the specified commit as the authenticated user.\n\nThis operation is only available to users that have explicit access to\nthe repository. In contrast, just the fact that a repository is\npublicly accessible to users does not give them the ability to approve\ncommits.", "responses": { "200": { "description": "The `participant` object recording that the authenticated user approved the commit.", "schema": { "$ref": "#/definitions/participant" } }, "404": { "description": "If the specified commit, or the repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The commit's SHA1.", "name": "node", "in": "path" } ], "tags": [ "commits" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "node", "in": "path" } ], "delete": { "security": [ { "oauth2": [ "repository:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Redact the authenticated user's approval of the specified commit.\n\nThis operation is only available to users that have explicit access to\nthe repository. In contrast, just the fact that a repository is\npublicly accessible to users does not give them the ability to approve\ncommits.", "responses": { "204": { "description": "An empty response indicating the authenticated user's approval has been withdrawn." }, "404": { "description": "If the specified commit, or the repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The commit's SHA1.", "name": "node", "in": "path" } ], "tags": [ "commits" ] } }, "/account/{username}/addons": { "post": { "security": [ { "oauth2": [ "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "account:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/commits": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the pull request's commits.\n\nThese are the commits that are being merged into the destination\nbranch when the pull requests gets accepted.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/snippets/{username}/{encoded_id}/watchers": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" } ], "get": { "responses": { "200": { "description": "The paginated list of users watching this snippet", "schema": { "$ref": "#/definitions/paginated_users" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ], "deprecated": true, "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a paginated list of all users watching a specific snippet." } }, "/repositories/{username}/{repo_slug}/branch-restrictions/{id}": { "put": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "branch_restrictions" ] }, "delete": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "branch_restrictions" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "branch_restrictions" ] } }, "/repositories/{username}/{repo_slug}/commit/{node}/statuses/build": { "post": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "node", "in": "path" } ] }, "/repositories/{username}/{repo_slug}": { "post": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Creates a new repository.", "responses": { "200": { "description": "The newly created repository.", "schema": { "$ref": "#/definitions/repository" } }, "401": { "description": "If the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "400": { "description": "If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "schema": { "$ref": "#/definitions/repository" }, "required": false, "description": "The repository that is to be created. Note that most object elements are optional. Elements \"owner\" and \"full_name\" are ignored as the URL implies them.", "name": "_body", "in": "body" } ], "tags": [ "repositories" ] }, "delete": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes the repository. This is an irreversible operation.\n\nThis does not affect its forks.", "responses": { "204": { "description": "Indicates successful deletion." }, "403": { "description": "If the caller either does not have admin access to the repository, or the repository is set to read-only.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "repositories" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the object describing this repository.", "responses": { "200": { "description": "The repository object.", "schema": { "$ref": "#/definitions/repository" } }, "403": { "description": "If the repository is private and the authenticated user does not have access to it.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If no repository exists at this location.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "repositories" ] } }, "/repositories/{username}/{repo_slug}/default-reviewers/{target_username}": { "put": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Adds the specified user to the repository's list of default\nreviewers.\n\nThis method is idempotent. Adding a user a second time has no effect.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] }, "delete": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Removes a default reviewer from the repository.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "target_username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "repository:admin" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified reviewer.\n\nThis can be used to test whether a user is among the repository's\ndefault reviewers list. A 404 indicates that that specified user is not\na default reviewer.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/repositories/{username}/{repo_slug}/issues/{issue_id}/comments": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "issue_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all comments that were made on the specified issue.", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "issue_tracker" ] } }, "/snippets/{username}/{encoded_id}/{node_id}": { "put": { "responses": { "200": { "description": "The updated snippet object.", "schema": { "$ref": "#/definitions/snippet" } }, "401": { "description": "If the snippet is private and the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "403": { "description": "If authenticated user does not have permission to update the private snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet or the revision does not exist.", "schema": { "$ref": "#/definitions/error" } }, "405": { "description": "If `{node_id}` is not the latest revision.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet's id.", "name": "encoded_id", "in": "path" }, { "required": true, "type": "string", "description": "A commit revision (SHA1).", "name": "node_id", "in": "path" } ], "tags": [ "snippets" ], "produces": [ "application/json", "multipart/related", "multipart/form-data" ], "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "consumes": [ "application/json", "multipart/related", "multipart/form-data" ], "description": "Identical to `UPDATE /snippets/encoded_id`, except that this endpoint\ntakes an explicit commit revision. Only the snippet's \"HEAD\"/\"tip\"\n(most recent) version can be updated and requests on all other,\nolder revisions fail by returning a 405 status.\n\nUsage of this endpoint over the unrestricted `/snippets/encoded_id`\ncould be desired if the caller wants to be sure no concurrent\nmodifications have taken place between the moment of the UPDATE\nrequest and the original GET.\n\nThis can be considered a so-called \"Compare And Swap\", or CAS\noperation.\n\nOther than that, the two endpoints are identical in behavior." }, "delete": { "security": [ { "oauth2": [ "snippet:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes the snippet.\n\nNote that this only works for versioned URLs that point to the latest\ncommit of the snippet. Pointing to an older commit results in a 405\nstatus code.\n\nTo delete a snippet, regardless of whether or not concurrent changes\nare being made to it, use `DELETE /snippets/{encoded_id}` instead.", "responses": { "401": { "description": "If the snippet is private and the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "403": { "description": "If authenticated user does not have permission to delete the private snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet does not exist.", "schema": { "$ref": "#/definitions/error" } }, "204": { "description": "If the snippet was deleted successfully." }, "405": { "description": "If `{node_id}` is not the latest revision.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet's id.", "name": "encoded_id", "in": "path" } ], "tags": [ "snippets" ] }, "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "encoded_id", "in": "path" }, { "required": true, "type": "string", "name": "node_id", "in": "path" } ], "get": { "responses": { "200": { "description": "The snippet object.", "schema": { "$ref": "#/definitions/snippet" } }, "401": { "description": "If the snippet is private and the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "403": { "description": "If authenticated user does not have access to the private snippet.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the snippet, or the revision does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The snippet's id.", "name": "encoded_id", "in": "path" }, { "required": true, "type": "string", "description": "A commit revision (SHA1).", "name": "node_id", "in": "path" } ], "produces": [ "application/json", "multipart/related", "multipart/form-data" ], "tags": [ "snippets" ], "security": [ { "oauth2": [ "snippet" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Identical to `GET /snippets/encoded_id`, except that this endpoint\ncan be used to retrieve the contents of the snippet as it was at an\nolder revision, while `/snippets/encoded_id` always returns the\nsnippet's current revision.\n\nNote that only the snippet's file contents are versioned, not its\nmeta data properties like the title.\n\nOther than that, the two endpoints are identical in behavior." } }, "/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/patch": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" }, { "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "type": "string", "name": "pull_request_id", "in": "path" } ], "get": { "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "pullrequests" ] } }, "/addon/linkers/{linker_key}/values/": { "delete": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] }, "parameters": [ { "required": true, "type": "string", "name": "linker_key", "in": "path" } ], "get": { "security": [ { "oauth2": [] }, { "basic": [] }, { "api_key": [] } ], "description": "", "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "addon" ] } }, "/repositories": { "parameters": [], "get": { "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns all public repositories.", "responses": { "200": { "description": "All public repositories.", "schema": { "$ref": "#/definitions/paginated_repositories" } } }, "parameters": [], "tags": [ "repositories" ] } }, "/teams/{username}/members": { "parameters": [ { "required": true, "type": "string", "name": "username", "in": "path" } ], "get": { "security": [ { "oauth2": [ "account" ] }, { "basic": [] }, { "api_key": [] } ], "description": "All members of a team.\n\nReturns all members of the specified team. Any member of any of the\nteam's groups is considered a member of the team. This includes users\nin groups that may not actually have access to any of the team's\nrepositories.\n\nNote that members using the \"private profile\" feature are not included.", "responses": { "200": { "description": "All members", "schema": { "$ref": "#/definitions/user" } }, "404": { "description": "When the team does not exist, or multiple teams with the same name exist that differ only in casing and the URL did not match the exact casing of a particular one.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [], "tags": [ "teams" ] } } }, "schemes": [ "https" ], "tags": [ { "name": "users", "description": "" }, { "name": "teams", "description": "" }, { "name": "repositories", "description": "" }, { "name": "refs", "description": "" }, { "name": "commits", "description": "" }, { "name": "pullrequests", "description": "" }, { "name": "issue_tracker", "description": "The issues resource provides functionality for getting information on\nissues in an issue tracker, creating new issues, updating them and deleting\nthem.\n\nYou can access public issues without authentication, but you can't gain access\nto private repositories' issues. By authenticating, you will get the ability\nto create issues, as well as access to updating data or deleting issues you\nhave access to." }, { "name": "wiki", "description": "" }, { "name": "downloads", "description": "" }, { "name": "snippets", "description": "" }, { "name": "webhooks", "description": "Webhooks provide a way to configure Bitbucket Cloud to make requests to\nyour server (or another external service) whenever certain events occur in\nBitbucket Cloud.\n\nA webhook consists of:\n\n* A subject -- The resource that generates the events. Currently, this resource\n is the repository, user account, or team where you create the webhook.\n* One or more event -- The default event is a repository push, but you can\n select multiple events that can trigger the webhook.\n* A URL -- The endpoint where you want Bitbucket to send the event payloads\n when a matching event happens.\n\nThere are two parts to getting a webhook to work: creating the webhook and\ntriggering the webhook. After you create a webhook for an event, every time\nthat event occurs, Bitbucket sends a payload request that describes the event\nto the specified URL. Thus, you can think of webhooks as a kind of\nnotification system.\n\nUse webhooks to integrate applications with Bitbucket Cloud. The following\nuse cases provides examples of when you would want to use webhooks:\n\n* Every time a user pushes commits in a repository, you may want to notify\n your CI server to start a build.\n* Every time a user pushes commits or creates a pull request, you may want to\n display a notification in your application.\n" } ], "basePath": "/2.0", "produces": [ "application/json" ], "securityDefinitions": { "oauth2": { "scopes": { "wiki": "Read and write to your repositories' wikis", "snippet": "Read your snippets", "account": "Read your account information", "repository:admin": "Administer your repositories", "repository": "Read your repositories", "snippet:write": "Read and write to your snippets", "issue:write": "Read and write to your repositories' issues", "pullrequest": "Read your repositories and their pull requests", "webhook": "Read and write to your repositories' webhooks", "pullrequest:write": "Read and write to your repositories and their pull requests", "project": "Read your team's projects", "project:write": "Read and write to your team's projects and move repositories between them", "team": "Read your team membership information", "repository:write": "Read and write to your repositories", "team:write": "Read and write to your team membership information", "account:write": "Read and write to your account information", "issue": "Read your repositories' issues", "email": "Read your account's primary email address" }, "tokenUrl": "http://dev.bitbucket.org:8000/site/oauth2/access_token", "description": "OAuth 2 as per [RFC-6749](https://tools.ietf.org/html/rfc6749).", "flow": "accessCode", "type": "oauth2", "authorizationUrl": "http://dev.bitbucket.org:8000/site/oauth2/authorize" }, "api_key": { "in": "header", "type": "apiKey", "description": "API Keys can be used as Basic HTTP Authentication credentials and provide a substitute for the account's actual username and password. API Keys are only available to team accounts and there is only 1 key per account. API Keys do not support scopes and have therefore access to all contents of the account.", "name": "Authorization" }, "basic": { "type": "basic", "description": "Basic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported). Note that Basic Auth with username and password as credentials is only available on accounts that have 2-factor-auth / 2-step-verification disabled. If you use 2fa, you should authenticate using OAuth2 instead." } }, "x-revision": "dev-1452122794", "host": "api.dev.bitbucket.org:8000", "definitions": { "paginated_repositories": { "allOf": [ { "$ref": "#/definitions/page" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of repositories.", "properties": { "values": { "minItems": 0, "items": { "$ref": "#/definitions/repository" }, "uniqueItems": true, "type": "array" } } } ] }, "subject_types": { "additionalProperties": false, "type": "object", "description": "The mapping of resource/subject types pointing to their individual event types.", "properties": { "user": { "additionalProperties": false, "type": "object", "properties": { "events": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "repository": { "additionalProperties": false, "type": "object", "properties": { "events": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "team": { "additionalProperties": false, "type": "object", "properties": { "events": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } } } }, "paginated_hook_events": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of webhook types available to subscribe on.", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/hook_event" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "base_commit": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "The common base type for both repository and snippet commits.", "properties": { "date": { "type": "string", "format": "date-time" }, "parents": { "minItems": 0, "items": { "$ref": "#/definitions/base_commit" }, "type": "array" }, "message": { "type": "string" }, "hash": { "pattern": "[0-9a-f]{7,}?", "type": "string" }, "author": { "$ref": "#/definitions/account" } } } ] }, "error": { "additionalProperties": false, "type": "object", "properties": { "error": { "additionalProperties": false, "required": [ "message" ], "type": "object", "properties": { "message": { "type": "string" }, "detail": { "type": "string" } } } } }, "participant": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "Object describing a user's role on resources like commits or pull requests.", "properties": { "role": { "enum": [ "PARTICIPANT", "REVIEWER" ], "type": "string" }, "user": { "$ref": "#/definitions/user" }, "approved": { "type": "boolean" } } } ] }, "paginated_versions": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of issue tracker versions.", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/version" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "paginated_users": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of users.", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/user" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "snippet": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A snippet object.", "properties": { "scm": { "enum": [ "hg", "git" ], "type": "string", "description": "The DVCS used to store the snippet." }, "title": { "type": "string" }, "creator": { "$ref": "#/definitions/account" }, "created_on": { "type": "string", "format": "date-time" }, "owner": { "$ref": "#/definitions/account" }, "updated_on": { "type": "string", "format": "date-time" }, "id": { "minimum": 0, "type": "integer" }, "is_private": { "type": "boolean" } } } ] }, "hook_event": { "additionalProperties": false, "type": "object", "description": "An event, associated with a resource or subject type.", "properties": { "category": { "type": "string", "description": "The category this event belongs to." }, "event": { "enum": [ "pullrequest:updated", "repo:commit_status_created", "repo:fork", "issue:comment_created", "pullrequest:rejected", "pullrequest:fulfilled", "pullrequest:comment_created", "pullrequest:comment_deleted", "issue:created", "repo:commit_comment_created", "pullrequest:approved", "repo:commit_status_updated", "pullrequest:comment_updated", "issue:updated", "pullrequest:unapproved", "pullrequest:created", "repo:push" ], "type": "string", "description": "The event identifier." }, "description": { "type": "string", "description": "More detailed description of the webhook event type." }, "label": { "type": "string", "description": "Summary of the webhook event type." } } }, "version": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A version as defined in a repository's issue tracker.", "properties": { "name": { "type": "string" }, "links": { "additionalProperties": false, "type": "object", "properties": { "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "id": { "type": "integer" } } } ] }, "issue": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "An issue.", "properties": { "content": { "additionalProperties": false, "type": "object", "properties": { "raw": { "type": "string", "description": "The text as it was typed by a user." }, "markup": { "enum": [ "markdown", "creole" ], "type": "string", "description": "The type of markup language the content is to be interpreted in." }, "html": { "type": "string", "description": "The user's markup rendered as HTML." } } }, "kind": { "enum": [ "bug", "enhancement", "proposal", "task" ], "type": "string" }, "repository": { "$ref": "#/definitions/repository" }, "links": { "additionalProperties": false, "type": "object", "properties": { "attachments": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "watch": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "comments": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "html": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "vote": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "title": { "type": "string" }, "reporter": { "$ref": "#/definitions/user" }, "component": { "$ref": "#/definitions/component" }, "votes": { "type": "integer" }, "priority": { "enum": [ "trivial", "minor", "major", "critical", "blocker" ], "type": "string" }, "assignee": { "$ref": "#/definitions/user" }, "state": { "enum": [ "new", "open", "resolved", "on hold", "invalid", "duplicate", "wontfix", "closed" ], "type": "string" }, "version": { "$ref": "#/definitions/version" }, "edited_on": { "type": "string", "format": "date-time" }, "created_on": { "type": "string", "format": "date-time" }, "milestone": { "$ref": "#/definitions/milestone" }, "updated_on": { "type": "string", "format": "date-time" }, "id": { "type": "integer" } } } ] }, "webhook_subscription": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A Webhook subscription.", "properties": { "subject_type": { "enum": [ "user", "repository", "team" ], "type": "string", "description": "The type of entity, which is `repository` in the case of webhook subscriptions on repositories." }, "uuid": { "type": "string", "description": "The webhook's id" }, "url": { "type": "string", "description": "The URL events get delivered to.", "format": "uri" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": "string", "description": "A user-defined description of the webhook." }, "active": { "type": "boolean" }, "events": { "minItems": 1, "items": { "enum": [ "pullrequest:updated", "repo:commit_status_created", "repo:fork", "issue:comment_created", "pullrequest:rejected", "pullrequest:fulfilled", "pullrequest:comment_created", "pullrequest:comment_deleted", "issue:created", "repo:commit_comment_created", "pullrequest:approved", "repo:commit_status_updated", "pullrequest:comment_updated", "issue:updated", "pullrequest:unapproved", "pullrequest:created", "repo:push" ], "type": "string" }, "uniqueItems": true, "description": "The events this webhook is subscribed to.", "type": "array" }, "subject": { "$ref": "#/definitions/object" } } } ] }, "repository": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A Bitbucket repository.", "properties": { "scm": { "enum": [ "hg", "git" ], "type": "string" }, "has_wiki": { "type": "boolean" }, "uuid": { "type": "string", "description": "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user." }, "links": { "additionalProperties": false, "type": "object", "properties": { "watchers": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "commits": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "downloads": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "html": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "avatar": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "hooks": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "forks": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "clone": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "pullrequests": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "fork_policy": { "enum": [ "allow_forks", "no_public_forks", "no_forks" ], "type": "string", "description": "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n be made public later)\n* **no_forks**: deny all forking\n" }, "description": { "type": "string" }, "language": { "type": "string" }, "created_on": { "type": "string", "format": "date-time" }, "parent": { "$ref": "#/definitions/repository" }, "full_name": { "type": "string", "description": "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs." }, "has_issues": { "type": "boolean" }, "owner": { "$ref": "#/definitions/account" }, "updated_on": { "type": "string", "format": "date-time" }, "size": { "type": "integer" }, "is_private": { "type": "boolean" }, "name": { "type": "string" } } } ] }, "snippet_commit": { "allOf": [ { "$ref": "#/definitions/base_commit" }, { "additionalProperties": true, "type": "object", "description": "", "properties": { "snippet": { "$ref": "#/definitions/snippet" }, "links": { "additionalProperties": false, "type": "object", "properties": { "diff": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "html": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } } } } ] }, "object": { "description": "Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.", "required": [ "type" ], "additionalProperties": true, "discriminator": "type", "type": "object", "properties": { "type": { "type": "string" } } }, "component": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A component as defined in a repository's issue tracker.", "properties": { "name": { "type": "string" }, "links": { "additionalProperties": false, "type": "object", "properties": { "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "id": { "type": "integer" } } } ] }, "paginated_issues": { "allOf": [ { "$ref": "#/definitions/page" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of issues.", "properties": { "values": { "minItems": 0, "items": { "$ref": "#/definitions/issue" }, "uniqueItems": true, "type": "array" } } } ] }, "user": { "allOf": [ { "$ref": "#/definitions/account" }, { "additionalProperties": true, "type": "object", "description": "A user object.", "properties": {} } ] }, "milestone": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A milestone as defined in a repository's issue tracker.", "properties": { "name": { "type": "string" }, "links": { "additionalProperties": false, "type": "object", "properties": { "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "id": { "type": "integer" } } } ] }, "paginated_issue_attachments": { "allOf": [ { "$ref": "#/definitions/page" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of issue attachments.", "properties": { "values": { "minItems": 0, "items": { "$ref": "#/definitions/issue_attachment" }, "type": "array" } } } ] }, "paginated_webhook_subscriptions": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of webhook subscriptions", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/webhook_subscription" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "snippet_comment": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A comment on a snippet.", "properties": { "snippet": { "$ref": "#/definitions/snippet" }, "links": { "additionalProperties": false, "type": "object", "properties": { "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "html": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } } } } ] }, "paginated_milestones": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of issue tracker milestones.", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/milestone" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "paginated_components": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of issue tracker components.", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/component" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "account": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "An account object.", "properties": { "username": { "pattern": "^[a-zA-Z0-9_\\-]+$", "type": "string" }, "website": { "type": "string" }, "display_name": { "type": "string" }, "uuid": { "type": "string" }, "links": { "additionalProperties": false, "type": "object", "properties": { "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "repositories": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "html": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "followers": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "avatar": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "following": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "created_on": { "type": "string", "format": "date-time" } } } ] }, "issue_attachment": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "An issue file attachment's meta data. Note this does not contain the file's actual contents.", "properties": { "name": { "type": "string" }, "links": { "additionalProperties": false, "type": "object", "properties": { "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } } } } ] }, "paginated_snippet_commit": { "allOf": [ { "$ref": "#/definitions/page" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of snippet commits.", "properties": { "values": { "minItems": 0, "items": { "$ref": "#/definitions/snippet_commit" }, "type": "array" } } } ] }, "pullrequest": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A pull request object.", "properties": { "state": { "enum": [ "MERGED", "SUPERSEDED", "OPEN", "DECLINED" ], "type": "string" }, "author": { "$ref": "#/definitions/account" }, "id": { "type": "integer" }, "links": { "additionalProperties": false, "type": "object", "properties": { "decline": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "commits": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "comments": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "merge": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "html": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "activity": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "diff": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "approve": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } }, "title": { "type": "string" } } } ] }, "paginated_teams": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of teams.", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/team" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "paginated_snippet_comments": { "allOf": [ { "$ref": "#/definitions/page" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of snippet comments.", "properties": { "values": { "minItems": 0, "items": { "$ref": "#/definitions/snippet_comment" }, "uniqueItems": true, "type": "array" } } } ] }, "team": { "allOf": [ { "$ref": "#/definitions/account" }, { "additionalProperties": true, "type": "object", "description": "A team object.", "properties": {} } ] }, "commit": { "allOf": [ { "$ref": "#/definitions/base_commit" }, { "additionalProperties": true, "type": "object", "description": "A repository commit object.", "properties": { "participants": { "minItems": 0, "items": { "$ref": "#/definitions/participant" }, "type": "array" }, "repository": { "$ref": "#/definitions/repository" }, "links": { "additionalProperties": false, "type": "object", "properties": { "self": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "comments": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "patch": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "html": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "diff": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } }, "approve": { "additionalProperties": false, "type": "object", "properties": { "href": { "type": "string", "format": "uri" } } } } } } } ] }, "paginated_snippets": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "A paginated list of snippets.", "properties": { "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "values": { "minItems": 0, "items": { "$ref": "#/definitions/snippet" }, "uniqueItems": true, "type": "array" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" } } } ] }, "page": { "allOf": [ { "$ref": "#/definitions/object" }, { "additionalProperties": true, "type": "object", "description": "Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.", "properties": { "previous": { "type": "string", "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "pagelen": { "minimum": 1, "type": "integer", "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." }, "next": { "type": "string", "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", "format": "uri" }, "page": { "minimum": 1, "type": "integer", "description": "Page number of the current results. This is an optional element that is not provided in all responses." }, "size": { "minimum": 0, "type": "integer", "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." } } } ] } }, "swagger": "2.0", "consumes": [ "application/json" ] } validate-0.24.0/fixtures/validation/default/000077500000000000000000000000001457312750000210215ustar00rootroot00000000000000invalid-default-value-default-response-PatternProperties.json000066400000000000000000000060761457312750000347760ustar00rootroot00000000000000validate-0.24.0/fixtures/validation/default{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error", "schema": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "patternProperties": { ")nb-[.*)": { "type": "integer", "format": "int64" } }, "default": { "id": 10, "name": "abc", "nb-1": 20 } } }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "patternProperties": { "nb-.*": { "type": "integer", "format": "int64", "default": 20 } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-default-response.json000066400000000000000000000067751457312750000313730ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "integer", "format": "int32", "default": 20 } }, "description": "Generic Error", "schema": { "type": "object", "properties": { "myint": { "type": "integer", "format": "uint32" } }, "default": { "myint": "abc" } } }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-header-badpattern.json000066400000000000000000000062431457312750000314530ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "string", "pattern": "(^][so baaad]+$", "default": "abc" } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-header-items-default-response.json000066400000000000000000000063711457312750000337300ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "default": "ABC" } } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-header-items-response.json000066400000000000000000000071611457312750000323040ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "default": 20 } } }, "description": "Generic Error" }, "200": { "description": "Pets list", "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "default": "ABC" } } }, "schema": { "type": "array", "items": { "type": "integer", "format": "int32", "default": 20 } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-header-items.json000066400000000000000000000063701457312750000304510ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "default": "20" } } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-header-pattern.json000066400000000000000000000062351457312750000310050ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "string", "pattern": "^[a-z]+$", "default": "abc9" } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-header-response.json000066400000000000000000000065271457312750000311720ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "integer", "format": "int32", "default": 20 } }, "description": "Generic Error" }, "200": { "description": "Pets list", "headers": { "X-Rate-Limit": { "type": "integer", "format": "uint32", "default": -20 } }, "schema": { "type": "integer", "format": "uint32", "default": 10 } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-header.json000066400000000000000000000062301457312750000273250ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "integer", "format": "int32", "default": "20" } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-parameter-items.json000066400000000000000000000065321457312750000312010ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [{ "name": "limit", "in": "query", "description": "number of items to return in the result", "type": "array", "collectionFormat": "csv", "items": { "type": "integer", "format": "int32", "default": "20" } }], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-parameter-ref.json000066400000000000000000000051571457312750000306360ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "parameters": { "limit": { "name": "limit", "in": "query", "description": "number of items to return in the result", "type": "integer", "format": "int32", "default": "20" } }, "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [{ "$ref": "#/parameters/limit" }], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-parameter-required.json000066400000000000000000000064331457312750000317000ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [ { "name": "limit", "in": "query", "required": true, "description": "number of items to return in the result", "type": "integer", "format": "int32", "default": "ABC" } ], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-parameter-schema.json000066400000000000000000000064551457312750000313240ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [ { "name": "limit", "in": "query", "description": "number of items to return in the result", "schema": { "type": "integer", "format": "int32", "default": "abc" } } ], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-parameter.json000066400000000000000000000063711457312750000300630ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [ { "name": "limit", "in": "query", "description": "number of items to return in the result", "type": "integer", "format": "int32", "default": "20" } ], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-response-ref.json000066400000000000000000000054451457312750000305140ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "$ref": "#/responses/petListResponse" } } } } }, "responses": { "petListResponse": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" }, "default": [ { "id": 123, "photoUrls": [ "https://cloud.githubusercontent.com/assets/987686/9987390/24bd7be0-607a-11e5-9c3a-e0c6f333a764.png" ] }, { "id": 456, "photoUrls": [ "https://cloud.githubusercontent.com/assets/987686/9987390/24bd7be0-607a-11e5-9c3a-e0c6f333a764.png" ] } ] } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-schema-additionalProperties.json000066400000000000000000000046721457312750000335300ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "additionalProperties": { "type": "integer", "format": "int32", "default": "20" } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-schema-allOf.json000066400000000000000000000050621457312750000303720ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "allOf": [ { "properties": { "id": { "type": "integer", "format": "int64", "default": "20" }, "name": { "type": "string" } } }, { "properties": { "notes": { "type": "string" } } } ] } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-schema-items-allOf.json000066400000000000000000000056351457312750000315170ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "allOf": [ { "properties": { "id": { "type": "integer", "format": "int64", "default": "ABC" }, "name": { "type": "string" } } }, { "properties": { "notes": { "type": "string" } } } ] } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "allOf": [ { "properties": { "id": { "type": "integer", "format": "int64", "default": 20 }, "name": { "type": "string" } } }, { "properties": { "notes": { "type": "string" } } } ] } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-schema-items.json000066400000000000000000000047671457312750000304710ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "extra": { "type": "array", "items": { "type": "integer", "format": "int64", "default": "20" } } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-schema-patternProperties.json000066400000000000000000000047321457312750000330720ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "patternProperties": { "nb-.*": { "type": "integer", "format": "int64", "default": "20" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-schema-ref.json000066400000000000000000000045371457312750000301170ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64", "default": "20" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/invalid-default-value-schema.json000066400000000000000000000045361457312750000273440ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64", "default": "20" }, "name": { "type": "string" } } } } } valid-default-value-default-response-PatternProperties.json000066400000000000000000000056371457312750000344510ustar00rootroot00000000000000validate-0.24.0/fixtures/validation/default{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error", "schema": { "$ref": "#/definitions/WrongTag" } }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "patternProperties": { "nb-.*": { "type": "integer", "format": "int64", "default": 20 } } }, "WrongTag": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "patternProperties": { "nb-.*": { "type": "integer", "format": "int64", "default": 20 } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-default-response.json000066400000000000000000000064661457312750000310410ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "integer", "format": "int32", "default": 20 } }, "description": "Generic Error", "schema": { "type": "integer", "format": "uint32", "default": 20 } }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-header-badpattern.json000066400000000000000000000062341457312750000311240ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "string", "pattern": "^[a-z]+$", "default": "abc" } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-header-items-default-response.json000066400000000000000000000063661457312750000334050ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "default": 20 } } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-header-items-response.json000066400000000000000000000071561457312750000317610ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "default": 20 } } }, "description": "Generic Error" }, "200": { "description": "Pets list", "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "default": 20 } } }, "schema": { "type": "array", "items": { "type": "integer", "format": "int32", "default": 20 } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-header-items.json000066400000000000000000000063661457312750000301270ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "default": 20 } } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-header-pattern.json000066400000000000000000000062341457312750000304550ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "string", "pattern": "^[a-z]+$", "default": "abc" } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-header-response.json000066400000000000000000000061751457312750000306420ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "integer", "format": "int32", "default": 20 } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "integer", "format": "uint32", "default": 10 } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-header.json000066400000000000000000000062261457312750000270030ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "integer", "format": "int32", "default": 20 } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-parameter-items.json000066400000000000000000000065301457312750000306500ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [{ "name": "limit", "in": "query", "description": "number of items to return in the result", "type": "array", "collectionFormat": "csv", "items": { "type": "integer", "format": "int32", "default": 20 } }], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-parameter-ref.json000066400000000000000000000051551457312750000303050ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "parameters": { "limit": { "name": "limit", "in": "query", "description": "number of items to return in the result", "type": "integer", "format": "int32", "default": 20 } }, "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [{ "$ref": "#/parameters/limit" }], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-parameter-required.json000066400000000000000000000064301457312750000313460ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [ { "name": "limit", "in": "query", "required": true, "description": "number of items to return in the result", "type": "integer", "format": "int32", "default": 20 } ], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-parameter-schema.json000066400000000000000000000064511457312750000307710ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [ { "name": "limit", "in": "body", "description": "number of items to return in the result", "schema": { "type": "integer", "format": "int32", "default": 20 } } ], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-parameter.json000066400000000000000000000063661457312750000275400ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [ { "name": "limit", "in": "query", "description": "number of items to return in the result", "type": "integer", "format": "int32", "default": 20 } ], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-response-ref.json000066400000000000000000000055331457312750000301630ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "$ref": "#/responses/petListResponse" } } } } }, "responses": { "petListResponse": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" }, "default": [ { "id": 123, "photoUrls": [ "https://cloud.githubusercontent.com/assets/987686/9987390/24bd7be0-607a-11e5-9c3a-e0c6f333a764.png" ], "name": "my name" }, { "id": 456, "photoUrls": [ "https://cloud.githubusercontent.com/assets/987686/9987390/24bd7be0-607a-11e5-9c3a-e0c6f333a764.png" ], "name": "my other name" } ] } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-schema-additionalProperties.json000066400000000000000000000046701457312750000331770ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "additionalProperties": { "type": "integer", "format": "int32", "default": 20 } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-schema-allOf.json000066400000000000000000000050601457312750000300410ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "allOf": [ { "properties": { "id": { "type": "integer", "format": "int64", "default": 20 }, "name": { "type": "string" } } }, { "properties": { "notes": { "type": "string" } } } ] } } } validate-0.24.0/fixtures/validation/default/valid-default-value-schema-items-allOf.json000066400000000000000000000056321457312750000311650ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "allOf": [ { "properties": { "id": { "type": "integer", "format": "int64", "default": 20 }, "name": { "type": "string" } } }, { "properties": { "notes": { "type": "string" } } } ] } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "allOf": [ { "properties": { "id": { "type": "integer", "format": "int64", "default": 20 }, "name": { "type": "string" } } }, { "properties": { "notes": { "type": "string" } } } ] } } } validate-0.24.0/fixtures/validation/default/valid-default-value-schema-items.json000066400000000000000000000056761457312750000301420ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-schema-patternProperties.json000066400000000000000000000047301457312750000325410ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "patternProperties": { "nb-.*": { "type": "integer", "format": "int64", "default": 20 } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-schema-ref.json000066400000000000000000000045341457312750000275650ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64", "default": 20 }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/default/valid-default-value-schema.json000066400000000000000000000050161457312750000270070ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64", "default": 20 }, "name": { "type": "string" }, "extra": { "type": "array", "items": { "type": "integer", "format": "int64", "default": 20 } } } } } } validate-0.24.0/fixtures/validation/direct-circular-ancestor.json000066400000000000000000000072301457312750000251620ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Circular1": { "allOf": [{ "$ref": "#/definitions/Circular2" }, { "properties": { "age": { "type": "integer", "format": "int32" } } }] }, "Circular2": { "allOf": [{ "$ref": "#/definitions/Circular1" }, { "properties": { "createdAt": { "type": "string", "format": "date-time" } } }] }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/duplicateprops.json000066400000000000000000000071521457312750000233330ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "ValidChild": { "allOf": [{ "$ref": "#/definitions/Parent" }, { "properties": { "age": { "type": "integer", "format": "int32" } } }] }, "InvalidChild": { "allOf": [{ "$ref": "#/definitions/Parent" }, { "properties": { "name": { "type": "string" } } }] }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/empty-path-param-name.json000066400000000000000000000065351457312750000244050ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets/{}": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [{ "name": "limit", "in": "query", "description": "number of items to return in the result", "type": "array", "collectionFormat": "csv", "items": { "type": "integer", "format": "int32", "default": "20" } }], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/000077500000000000000000000000001457312750000210305ustar00rootroot00000000000000validate-0.24.0/fixtures/validation/example/invalid-example-default-response-PatternProperties.json000066400000000000000000000060761457312750000337610ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error", "schema": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "patternProperties": { ")nb-[.*)": { "type": "integer", "format": "int64" } }, "example": { "id": 10, "name": "abc", "nb-1": 20 } } }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "patternProperties": { "nb-.*": { "type": "integer", "format": "int64", "example": 20 } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-default-response.json000066400000000000000000000067751457312750000302770ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "integer", "format": "int32", "example": 20 } }, "description": "Generic Error", "schema": { "type": "object", "properties": { "myint": { "type": "integer", "format": "uint32" } }, "example": { "myint": "abc" } } }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-header-badpattern.json000066400000000000000000000062431457312750000303570ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "string", "pattern": "(^][so baaad]+$", "example": "abc" } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-header-items-default-response.json000066400000000000000000000063711457312750000326340ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "example": "ABC" } } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-header-items-response.json000066400000000000000000000071611457312750000312100ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "example": 20 } } }, "description": "Generic Error" }, "200": { "description": "Pets list", "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "example": "ABC" } } }, "schema": { "type": "array", "items": { "type": "integer", "format": "int32", "example": 20 } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-header-items.json000066400000000000000000000063701457312750000273550ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "example": "20" } } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-header-pattern.json000066400000000000000000000062351457312750000277110ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "string", "pattern": "^[a-z]+$", "example": "abc9" } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-header-response.json000066400000000000000000000065271457312750000300760ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "integer", "format": "int32", "example": 20 } }, "description": "Generic Error" }, "200": { "description": "Pets list", "headers": { "X-Rate-Limit": { "type": "integer", "format": "uint32", "example": -20 } }, "schema": { "type": "integer", "format": "uint32", "example": 10 } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-header.json000066400000000000000000000062301457312750000262310ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "integer", "format": "int32", "example": "20" } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-parameter-items.json000066400000000000000000000065321457312750000301050ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [{ "name": "limit", "in": "query", "description": "number of items to return in the result", "type": "array", "collectionFormat": "csv", "items": { "type": "integer", "format": "int32", "example": "20" } }], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-parameter-ref.json000066400000000000000000000051571457312750000275420ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "parameters": { "limit": { "name": "limit", "in": "query", "description": "number of items to return in the result", "type": "integer", "format": "int32", "example": "20" } }, "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [{ "$ref": "#/parameters/limit" }], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-parameter-required.json000066400000000000000000000064331457312750000306040ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [ { "name": "limit", "in": "query", "required": true, "description": "number of items to return in the result", "type": "integer", "format": "int32", "example": "ABC" } ], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-parameter-schema.json000066400000000000000000000064541457312750000302270ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [ { "name": "limit", "in": "body", "description": "number of items to return in the result", "schema": { "type": "integer", "format": "int32", "example": "abc" } } ], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-parameter.json000066400000000000000000000063711457312750000267670ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [ { "name": "limit", "in": "query", "description": "number of items to return in the result", "type": "integer", "format": "int32", "example": "20" } ], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-response-ref.json000066400000000000000000000051621457312750000274140ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "$ref": "#/responses/petListResponse" } } } } }, "responses": { "petListResponse": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } }, "examples": { "application/json": [{ "id": 123, "photoUrls": [ "https://cloud.githubusercontent.com/assets/987686/9987390/24bd7be0-607a-11e5-9c3a-e0c6f333a764.png" ] }] } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-response.json000066400000000000000000000054671457312750000266520ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } }, "examples": { "application/json": [ { "id": 123, "photoUrls": [ "https://cloud.githubusercontent.com/assets/987686/9987390/24bd7be0-607a-11e5-9c3a-e0c6f333a764.png" ] }, { "photoUrls": [ "https://cloud.githubusercontent.com/assets/987686/9987390/24bd7be0-607a-11e5-9c3a-e0c6f333a764.png" ] } ] } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-schema-additionalProperties.json000066400000000000000000000046721457312750000324340ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "additionalProperties": { "type": "integer", "format": "int32", "example": "20" } } } } validate-0.24.0/fixtures/validation/example/invalid-example-schema-allOf.json000066400000000000000000000050621457312750000272760ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "allOf": [ { "properties": { "id": { "type": "integer", "format": "int64", "example": "20" }, "name": { "type": "string" } } }, { "properties": { "notes": { "type": "string" } } } ] } } } validate-0.24.0/fixtures/validation/example/invalid-example-schema-items-allOf.json000066400000000000000000000056351457312750000304230ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "allOf": [ { "properties": { "id": { "type": "integer", "format": "int64", "example": "ABC" }, "name": { "type": "string" } } }, { "properties": { "notes": { "type": "string" } } } ] } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "allOf": [ { "properties": { "id": { "type": "integer", "format": "int64", "example": 20 }, "name": { "type": "string" } } }, { "properties": { "notes": { "type": "string" } } } ] } } } validate-0.24.0/fixtures/validation/example/invalid-example-schema-items.json000066400000000000000000000047671457312750000273750ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "extra": { "type": "array", "items": { "type": "integer", "format": "int64", "example": "20" } } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-schema-patternProperties.json000066400000000000000000000047321457312750000317760ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "patternProperties": { "nb-.*": { "type": "integer", "format": "int64", "example": "20" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-schema-ref.json000066400000000000000000000045371457312750000270230ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64", "example": "20" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/invalid-example-schema.json000066400000000000000000000045361457312750000262500ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64", "example": "20" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-default-response-PatternProperties.json000066400000000000000000000056371457312750000334340ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error", "schema": { "$ref": "#/definitions/WrongTag" } }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "patternProperties": { "nb-.*": { "type": "integer", "format": "int64", "example": 20 } } }, "WrongTag": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "patternProperties": { "nb-.*": { "type": "integer", "format": "int64", "example": 20 } } } } } validate-0.24.0/fixtures/validation/example/valid-example-default-response.json000066400000000000000000000064661457312750000277450ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "integer", "format": "int32", "example": 20 } }, "description": "Generic Error", "schema": { "type": "integer", "format": "uint32", "example": 20 } }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-header-badpattern.json000066400000000000000000000062341457312750000300300ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "string", "pattern": "^[a-z]+$", "example": "abc" } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-header-items-default-response.json000066400000000000000000000063661457312750000323110ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "example": 20 } } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-header-items-response.json000066400000000000000000000071561457312750000306650ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "example": 20 } } }, "description": "Generic Error" }, "200": { "description": "Pets list", "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "example": 20 } } }, "schema": { "type": "array", "items": { "type": "integer", "format": "int32", "example": 20 } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-header-items.json000066400000000000000000000063661457312750000270330ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "array", "items": { "type": "integer", "format": "int32", "example": 20 } } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-header-pattern.json000066400000000000000000000062341457312750000273610ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "string", "pattern": "^[a-z]+$", "example": "abc" } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-header-response.json000066400000000000000000000061751457312750000275460ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "integer", "format": "int32", "example": 20 } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "integer", "format": "uint32", "example": 10 } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-header.json000066400000000000000000000062261457312750000257070ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "headers": { "X-Rate-Limit": { "type": "integer", "format": "int32", "example": 20 } }, "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-parameter-items.json000066400000000000000000000065301457312750000275540ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [{ "name": "limit", "in": "query", "description": "number of items to return in the result", "type": "array", "collectionFormat": "csv", "items": { "type": "integer", "format": "int32", "example": 20 } }], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-parameter-ref.json000066400000000000000000000051551457312750000272110ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "parameters": { "limit": { "name": "limit", "in": "query", "description": "number of items to return in the result", "type": "integer", "format": "int32", "example": 20 } }, "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [{ "$ref": "#/parameters/limit" }], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-parameter-required.json000066400000000000000000000064301457312750000302520ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [ { "name": "limit", "in": "query", "required": true, "description": "number of items to return in the result", "type": "integer", "format": "int32", "example": 20 } ], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-parameter-schema.json000066400000000000000000000064511457312750000276750ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [ { "name": "limit", "in": "body", "description": "number of items to return in the result", "schema": { "type": "integer", "format": "int32", "example": 20 } } ], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-parameter.json000066400000000000000000000063661457312750000264440ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [ { "name": "limit", "in": "query", "description": "number of items to return in the result", "type": "integer", "format": "int32", "example": 20 } ], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-response-ref.json000066400000000000000000000052451457312750000270670ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "$ref": "#/responses/petListResponse" } } } } }, "responses": { "petListResponse": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } }, "examples": { "application/json": [{ "id": 123, "photoUrls": [ "https://cloud.githubusercontent.com/assets/987686/9987390/24bd7be0-607a-11e5-9c3a-e0c6f333a764.png" ], "name": "issue 63 response ref example" }] } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-response.json000066400000000000000000000052361457312750000263150ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } }, "examples": { "application/json": [{ "id": 123, "photoUrls": [ "https://cloud.githubusercontent.com/assets/987686/9987390/24bd7be0-607a-11e5-9c3a-e0c6f333a764.png" ], "name": "issue 63 response ref example" }] } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-schema-additionalProperties.json000066400000000000000000000046701457312750000321030ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "additionalProperties": { "type": "integer", "format": "int32", "example": 20 } } } } validate-0.24.0/fixtures/validation/example/valid-example-schema-allOf.json000066400000000000000000000050601457312750000267450ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "allOf": [ { "properties": { "id": { "type": "integer", "format": "int64", "example": 20 }, "name": { "type": "string" } } }, { "properties": { "notes": { "type": "string" } } } ] } } } validate-0.24.0/fixtures/validation/example/valid-example-schema-items-allOf.json000066400000000000000000000056321457312750000300710ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "allOf": [ { "properties": { "id": { "type": "integer", "format": "int64", "example": 20 }, "name": { "type": "string" } } }, { "properties": { "notes": { "type": "string" } } } ] } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "allOf": [ { "properties": { "id": { "type": "integer", "format": "int64", "example": 20 }, "name": { "type": "string" } } }, { "properties": { "notes": { "type": "string" } } } ] } } } validate-0.24.0/fixtures/validation/example/valid-example-schema-items.json000066400000000000000000000056761457312750000270460ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-schema-patternProperties.json000066400000000000000000000047301457312750000314450ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "patternProperties": { "nb-.*": { "type": "integer", "format": "int64", "example": 20 } } } } } validate-0.24.0/fixtures/validation/example/valid-example-schema-ref.json000066400000000000000000000045341457312750000264710ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64", "example": 20 }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/example/valid-example-schema.json000066400000000000000000000050161457312750000257130ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64", "example": 20 }, "name": { "type": "string" }, "extra": { "type": "array", "items": { "type": "integer", "format": "int64", "example": 20 } } } } } } validate-0.24.0/fixtures/validation/expected_messages.yaml000066400000000000000000001766341457312750000237720ustar00rootroot00000000000000# # This document specifies messages expecations on tested fixtures (errors and warnings) # Messages may be either a plain string (assert.Contains) or a simple regexp (assert.True(regexp.MatchString()) fixture-items-items.yaml: comment: how to get through item.Items in simple schemas todo: expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: - message: 'soSimple in path has a default value and is required as parameter' withContinueOnErrors: false isRegexp: false valid-referenced.yml: comment: todo: expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: [] valid-referenced-variants.yaml: comment: additional scenarios with failures on additionalProperties and required properties todo: expectedLoadError: false expectedValid: false expectedMessages: - message: 'definitions.lotOfErrors.patternProperties in body is a forbidden property' withContinueOnErrors: false isRegexp: false - message: '"definitions.lotOfErrors.additionalProperties" must validate at least one schema (anyOf)' withContinueOnErrors: false isRegexp: false - message: 'definitions.lotOfErrors.additionalProperties.patternProperties in body is a forbidden property' withContinueOnErrors: false isRegexp: false - message: 'definitions.lotOfErrors2.patternProperties in body is a forbidden property' withContinueOnErrors: false isRegexp: false - message: 'pattern "^)b-InvalidRegexp1.(*$" is invalid in lotOfErrors' withContinueOnErrors: true isRegexp: false - message: '"bug" is present in required but not defined as property in definition "lotOfErrors"' withContinueOnErrors: true isRegexp: false - message: 'pattern "^)b-InvalidRegexp2.(*$" is invalid in lotOfErrors2' withContinueOnErrors: true isRegexp: false expectedWarnings: - message: 'Required property a in "lotOfErrors" should not be marked as both required and readOnly' withContinueOnErrors: true isRegexp: false - message: 'Required property z-1 in "lotOfErrors" should not be marked as both required and readOnly' withContinueOnErrors: true isRegexp: false - message: 'Required property b-8 in "lotOfErrors2" should not be marked as both required and readOnly' withContinueOnErrors: true isRegexp: false fixture-additional-items.yaml: comment: todo: unsupported keyword such as additionnalItems should be better reported expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: [] fixture-additional-items-2.yaml: comment: todo: unsupported keyword such as additionnalItems should be better reported expectedLoadError: false expectedValid: false expectedMessages: - message: '"paths./servers/getGood.get.parameters" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: 'paths./servers/getGood.get.parameters.schema.additionalItems in body is a forbidden property' withContinueOnErrors: false isRegexp: false expectedWarnings: [] fixture-additional-items-3.yaml: comment: todo: unsupported keyword such as additionnalItems should be better reported expectedLoadError: false expectedValid: false expectedMessages: - message: '"paths./servers/edgeCase.get.responses.200" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: '"paths./servers/edgeCase.get.responses.200.schema" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: 'paths./servers/edgeCase.get.responses.200.schema.additionalItems in body is a forbidden property' withContinueOnErrors: false isRegexp: false - message: '"paths./servers/edgeCase.get.responses.200.schema.items" must validate at least one schema (anyOf)' withContinueOnErrors: false isRegexp: false - message: 'paths./servers/edgeCase.get.responses.200.schema.items.additionalItems in body is a forbidden property' withContinueOnErrors: false isRegexp: false - message: '"paths./servers/getGood.get.responses.200" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: '"paths./servers/getGood.get.responses.200.schema" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: 'paths./servers/getGood.get.responses.200.schema.additionalItems in body is a forbidden property' withContinueOnErrors: false isRegexp: false expectedWarnings: - message: 'definition "#/definitions/itemsSchema0" is not used anywhere' withContinueOnErrors: true isRegexp: false - message: 'definition "#/definitions/itemsSchema1" is not used anywhere' withContinueOnErrors: true isRegexp: false - message: 'definition "#/definitions/itemsSchema2" is not used anywhere' withContinueOnErrors: true isRegexp: false - message: 'definition "#/definitions/itemsSchema3" is not used anywhere' withContinueOnErrors: true isRegexp: false fixture-no-json-example.yaml: comment: a response example for a mime type other than application/json todo: not supported. atm, this is just a warning expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: - message: 'No validation attempt for examples for media types other than application/json, in operation "getGoodOp", default response' withContinueOnErrors: false isRegexp: false - message: 'Examples provided without schema in operation "getGoodOp", response 200' withContinueOnErrors: false isRegexp: false fixture-additional-items-invalid-values.yaml: comment: additional testing scenario for default and example values todo: expectedLoadError: false expectedValid: false expectedMessages: - message: '"paths./servers/getBad1.get.responses.default" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: 'paths./servers/getBad1.get.responses.default.description in body is required' withContinueOnErrors: false isRegexp: false - message: 'default value for addItems in body does not validate its schema' withContinueOnErrors: true isRegexp: false - message: 'addItems.default.0.first in body must be of type string: "array"' withContinueOnErrors: true isRegexp: false - message: 'addItems.default.2.c in body must be of type number: "string"' withContinueOnErrors: true isRegexp: false - message: 'addItems.default.2.x in body must be of type string: "number"' withContinueOnErrors: true isRegexp: false - message: 'addItems.default.2.x in body should be one of [a b c]' withContinueOnErrors: true isRegexp: false - message: 'addItems.default.3.z in body must be of type number: "string"' withContinueOnErrors: true isRegexp: false - message: 'in operation "getGoodOp", default value in default response does not validate its schema' withContinueOnErrors: true isRegexp: false - message: 'default.default.0.first in body must be of type string: "array"' withContinueOnErrors: true isRegexp: false - message: 'default.default.2.x in body must be of type string: "number"' withContinueOnErrors: true isRegexp: false - message: 'default.default.2.x in body should be one of [a b c]' withContinueOnErrors: true isRegexp: false - message: 'default.default.2.c in body must be of type number: "string"' withContinueOnErrors: true isRegexp: false - message: 'default.default.3.z in body must be of type number: "string"' withContinueOnErrors: true isRegexp: false - message: 'in operation "getGoodOp", default value in response 200 does not validate its schema' withContinueOnErrors: true isRegexp: false - message: '200.default.0.first in body must be of type string: "array"' withContinueOnErrors: true isRegexp: false - message: '200.default.2.c in body must be of type number: "string"' withContinueOnErrors: true isRegexp: false - message: '200.default.2.x in body must be of type string: "number"' withContinueOnErrors: true isRegexp: false - message: '200.default.2.x in body should be one of [a b c]' withContinueOnErrors: true isRegexp: false - message: '200.default.3.z in body must be of type number: "string"' withContinueOnErrors: true isRegexp: false expectedWarnings: - message: 'in operation "getGoodOp", example value in response 200 does not validate its schema' withContinueOnErrors: true isRegexp: false - message: '/servers/getBad1.examples.0.first in body must be of type string: "number"' withContinueOnErrors: true isRegexp: false - message: '/servers/getBad1.examples.3.z in body must be of type number: "boolean"' withContinueOnErrors: true isRegexp: false - message: '200.example.0.first in body must be of type string: "number"' withContinueOnErrors: true isRegexp: false - message: '200.example.3.z in body must be of type number: "boolean"' withContinueOnErrors: true isRegexp: false - message: 'example value for addItems in body does not validate its schema' withContinueOnErrors: true isRegexp: false - message: 'addItems.example.0.first in body must be of type string: "number"' withContinueOnErrors: true isRegexp: false - message: 'addItems.example.3.z in body must be of type number: "boolean"' withContinueOnErrors: true isRegexp: false - message: 'in operation "getGoodOp", example value in default response does not validate its schema' withContinueOnErrors: true isRegexp: false - message: 'default.example.0.first in body must be of type string: "number"' withContinueOnErrors: true isRegexp: false - message: 'default.example.3.z in body must be of type number: "boolean"' withContinueOnErrors: true isRegexp: false fixture-no-response.yaml: comment: todo: expectedLoadError: false expectedValid: false expectedMessages: - message: 'operation "ListBackendSets" has no valid response' withContinueOnErrors: true isRegexp: false - message: 'paths./loadBalancers/{loadBalancerId}/backendSets.get.responses in body must be of type object: "null"' withContinueOnErrors: false isRegexp: false expectedWarnings: [] fixture-empty-paths.json: comment: todo: expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: - message: spec has no valid path defined withContinueOnErrors: false isRegexp: false fixture-patternProperties.json: comment: Exercise pattern properties (for default values), with an invalid pattern todo: expectedLoadError: false expectedValid: false expectedMessages: - message: definitions.Tag.patternProperties in body is a forbidden property withContinueOnErrors: false isRegexp: false - message: definitions.TagInvalidDefault.patternProperties in body is a forbidden property withContinueOnErrors: false isRegexp: false - message: definitions.TagWrong.patternProperties in body is a forbidden property withContinueOnErrors: false isRegeexp: false - message: 'definitions.TagInvalidDefault.default.id in body must be of type integer: "string"' withContinueOnErrors: true isRegexp: false - message: 'definitions.TagInvalidDefault.default.nb-1 in body must be of type integer: "string"' withContinueOnErrors: true isRegexp: false - message: 'definitions.TagInvalidDefault.default.nb-2 in body must be of type integer: "string"' withContinueOnErrors: true isRegexp: false # with systematic response expansion we get more messages - message: '200.items.default.invalidDefault.default.id in body must be of type integer: "string"' withContinueOnErrors: true isRegexp: false - message: '200.items.default.invalidDefault.default.nb-1 in body must be of type integer: "string"' withContinueOnErrors: true isRegexp: false - message: '200.items.default.invalidDefault.default.nb-2 in body must be of type integer: "string"' withContinueOnErrors: true isRegexp: false - message: 'in operation "getPets", default value in response 200 does not validate its schema' withContinueOnErrors: true isRegexp: false expectedWarnings: - message: 'definition "#/definitions/Parent" is not used anywhere' withContinueOnErrors: true isRegexp: false bitbucket.json: comment: Path differing by only a trailing "/" are not considered duplicates todo: expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: [] fixture-161-2.json: comment: | Variant of Issue#161: this is a partially fixed spec. In this version, the name param type is fixed, but the default value remains wrongly typed' todo: expectedLoadError: false expectedValid: false expectedMessages: - message: default value for requestBody in body does not validate its schema withContinueOnErrors: false isRegexp: false - message: 'requestBody.default in body must be of type object: "string"' withContinueOnErrors: false isRegexp: false expectedWarnings: - message: 'example value for requestBody in body does not validate its schema' withContinueOnErrors: false isRegexp: false - message: 'requestBody.example.parent.id in body must be of type number: "string"' withContinueOnErrors: false isRegexp: false fixture-161-good.json: comment: 'Issue#161: this is the corresponding corrected spec which should be valid. Ah! But now examples are invalid...' todo: expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: - message: 'example value for requestBody in body does not validate its schema' withContinueOnErrors: false isRegexp: false - message: 'requestBody.example.parent.id in body must be of type number: "string"' withContinueOnErrors: false isRegexp: false fixture-161.json: comment: 'Issue#161: default value as object' todo: expectedLoadError: false expectedValid: false expectedMessages: - message: 'default value for requestBody in body does not validate its schema' withContinueOnErrors: false isRegexp: false - message: 'requestBody.default in body must be of type object: "string"' withContinueOnErrors: false isRegexp: false expectedWarnings: - message: 'requestBody.example.name in body must be of type object: "string"' withContinueOnErrors: false isRegexp: false - message: 'example value for requestBody in body does not validate its schema' withContinueOnErrors: false isRegexp: false - message: 'requestBody.example.parent.id in body must be of type number: "string"' withContinueOnErrors: false isRegexp: false fixture-342-2.yaml: comment: Botched correction attempt for fixture-342 todo: expectedLoadError: true expectedValid: false expectedMessages: # This one is a regexp to avoid being too stringent on expectations from another package (loads or analysis) - message: '.*cannot unmarshal.*' withContinueOnErrors: false isRegexp: true expectedWarnings: [] fixture-342.yaml: comment: 'Panic on interface conversion: early stop on error prevents the panic, but continuing it goes in, it goes down' todo: $ref have no sibling should be more general expectedLoadError: false expectedValid: false expectedMessages: - message: 'paths./get_main_object.get.parameters.$ref in body is a forbidden property' withContinueOnErrors: false isRegexp: false - message: 'invalid definition for parameter sid in body in operation ""' withContinueOnErrors: true isRegexp: false - message: 'paths./get_main_object.get.parameters.in in body should be one of [header]' withContinueOnErrors: false isRegexp: false - message: 'paths./get_main_object.get.parameters.type in body is required' withContinueOnErrors: false isRegexp: false - message: '"paths./get_main_object.get.parameters" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: 'invalid ref "nowhere.yaml#/definitions/sample_info/properties/sid"' withContinueOnErrors: true isRegexp: false - message: 'invalid definition as Schema for parameter in in operation ""' withContinueOnErrors: true isRegexp: false - message: 'invalid definition for parameter in in operation ""' withContinueOnErrors: true isRegexp: false - message: '"parameters.wrong" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: 'parameters.wrong.theName in body is a forbidden property' withContinueOnErrors: false isRegexp: false - message: 'parameters.wrong.theType in body is a forbidden property' withContinueOnErrors: false isRegexp: false - message: 'parameters.wrong.name in body is required' withContinueOnErrors: false isRegexp: false - message: 'parameters.wrong.in in body is required' withContinueOnErrors: false isRegexp: false - message: 'parameters.wrong.type in body is required' withContinueOnErrors: false isRegexp: false - message: '"parameters.notbetter" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: 'parameters.notbetter.properties in body is a forbidden property' withContinueOnErrors: false isRegexp: false - message: 'parameters.notbetter.type in body should be one of [string number boolean integer array]' withContinueOnErrors: false isRegexp: false - message: 'parameters.notbetter.name in body is required' withContinueOnErrors: false isRegexp: false - message: 'parameters.notbetter.in in body is required' withContinueOnErrors: false isRegexp: false - message: '"parameters.stillnogood" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: 'parameters.stillnogood.name in body is required' withContinueOnErrors: false isRegexp: false - message: 'parameters.stillnogood.in in body is required' withContinueOnErrors: false isRegexp: false - message: 'could not resolve reference in "\/get_main_object"\.GET to \$ref nowhere\.yaml#\/definitions\/sample_info\/properties\/sid: open .+nowhere\.yaml:\s.*' withContinueOnErrors: true isRegexp: true expectedWarnings: - message: 'definition "#/definitions/sample_info" is not used anywhere' withContinueOnErrors: true isRegexp: false - message: $ref property should have no sibling in "".sid withContinueOnErrors: true isRegexp: false - message: $ref property should have no sibling in "". withContinueOnErrors: true isRegexp: false fixture-581-good-numbers.yaml: comment: todo: expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: [] fixture-581-good.yaml: comment: todo: expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: [] fixture-581-inline-param-format.yaml: comment: a collection of error messages raised by format validation todo: expectedLoadError: false expectedValid: false expectedMessages: - message: 'paths./fixture.get.parameters.in in body should be one of [body]' withContinueOnErrors: false isRegexp: false - message: 'paths./fixture.get.parameters.in in body should be one of [header]' withContinueOnErrors: false isRegexp: false - message: 'paths./fixture.get.parameters.multipleOf in body should be greater than 0' withContinueOnErrors: false isRegexp: false - message: '"paths./fixture.get.parameters" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: default value for inlineInfiniteInt in query does not validate its schema withContinueOnErrors: true isRegexp: false - message: default value for inlineInfiniteInt2 in query does not validate its schema withContinueOnErrors: true isRegexp: false - message: default value for inlineMaxInt in query does not validate its schema withContinueOnErrors: true isRegexp: false - message: default value for inlineMinInt in query does not validate its schema withContinueOnErrors: true isRegexp: false - message: default value for negFactor in query does not validate its schema withContinueOnErrors: true isRegexp: false - message: default value for negFactor2 in query does not validate its schema withContinueOnErrors: true isRegexp: false - message: default value for negFactor3 in query does not validate its schema withContinueOnErrors: true isRegexp: false - message: Checked value must be of type integer with format uint32 in inlineInfiniteInt withContinueOnErrors: true isRegexp: false - message: inlineInfiniteInt in query should be greater than or equal to 0 withContinueOnErrors: true isRegexp: false - message: Checked value must be of type integer with format uint32 in negFactor3 withContinueOnErrors: true isRegexp: false - message: 'factor MultipleOf declared for negFactor must be positive: -300' withContinueOnErrors: true isRegexp: false - message: negFactor2 in query should be a multiple of 3 withContinueOnErrors: true isRegexp: false - message: Minimum boundary value must be of type integer with format uint64 in inlineMaxInt withContinueOnErrors: true isRegexp: false - message: Maximum boundary value must be of type integer with format uint64 in inlineMaxInt withContinueOnErrors: true isRegexp: false - message: Minimum boundary value must be of type integer with format uint32 in inlineMinInt withContinueOnErrors: true isRegexp: false - message: Maximum boundary value must be of type integer with format uint32 in inlineMinInt withContinueOnErrors: true isRegexp: false - message: definitions.myId.uint64.default in body should be less than or equal to 0 withContinueOnErrors: true isRegexp: false - message: definitions.myId.uint8.default in body should be less than or equal to 255 withContinueOnErrors: true isRegexp: false - message: Checked value must be of type integer with format uint32 in inlineInfiniteInt2 withContinueOnErrors: true isRegexp: false - message: inlineInfiniteInt2 in query should be greater than or equal to 0 withContinueOnErrors: true isRegexp: false - message: 'default value for myid in query does not validate its schema' withContinueOnErrors: true isRegexp: false - message: 'invalid definition as Schema for parameter myid in query in operation "op1"' withContinueOnErrors: true isRegexp: false - message: myid.uint64.default in body should be less than or equal to 0 withContinueOnErrors: true isRegexp: false - message: myid.uint8.default in body should be less than or equal to 255 withContinueOnErrors: true isRegexp: false expectedWarnings: - message: definition "#/definitions/myId" is not used anywhere withContinueOnErrors: true isRegexp: false fixture-581-inline-param.yaml: comment: A variation on the theme of number constraints, inspired by isssue#581. Focuses on inline params. todo: Still limited by support of default/examples values check expectedLoadError: false expectedValid: false expectedMessages: - message: '"paths./fixture.get.parameters" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: 'paths./fixture.get.parameters.in in body should be one of [body]' withContinueOnErrors: false isRegexp: false - message: 'paths./fixture.get.parameters.in in body should be one of [header]' withContinueOnErrors: false isRegexp: false - message: 'paths./fixture.get.parameters.multipleOf in body should be greater than 0' withContinueOnErrors: false isRegexp: false - message: default value for inlineInfiniteInt in query does not validate its schema withContinueOnErrors: true isRegexp: false - message: default value for inlineMaxInt in query does not validate its schema withContinueOnErrors: true isRegexp: false - message: default value for inlineMinInt in query does not validate its schema withContinueOnErrors: true isRegexp: false - message: default value for negFactor in query does not validate its schema withContinueOnErrors: true isRegexp: false - message: Maximum boundary value must be of type integer (default format) in inlineMaxInt withContinueOnErrors: true isRegexp: false - message: Minimum boundary value must be of type integer (default format) in inlineMinInt withContinueOnErrors: true isRegexp: false - message: Minimum boundary value must be of type integer (default format) in inlineInfiniteInt withContinueOnErrors: true isRegexp: false - message: Maximum boundary value must be of type integer (default format) in inlineInfiniteInt withContinueOnErrors: true isRegexp: false - message: 'factor MultipleOf declared for negFactor must be positive: -300' withContinueOnErrors: true isRegexp: false - message: inlineMinInt in query should be less than or equal to 1 withContinueOnErrors: true isRegexp: false - message: definitions.myId.uint64.default in body should be less than or equal to 0 withContinueOnErrors: true isRegexp: false - message: definitions.myId.uint8.default in body should be less than or equal to 255 withContinueOnErrors: true isRegexp: false - message: default value for myid in query does not validate its schema withContinueOnErrors: true isRegexp: false - message: 'invalid definition as Schema for parameter myid in query in operation "op1"' withContinueOnErrors: true isRegexp: false - message: myid.uint64.default in body should be less than or equal to 0 withContinueOnErrors: true isRegexp: false - message: myid.uint8.default in body should be less than or equal to 255 withContinueOnErrors: true isRegexp: false expectedWarnings: - message: definition "#/definitions/myId" is not used anywhere withContinueOnErrors: true isRegexp: false fixture-581.yaml: comment: 'Issue#581 : value and type checking in constraints' todo: 'issue#581 error reporting solved: not only inline params are subject to this validation' expectedLoadError: false expectedValid: false expectedMessages: - message: 'paths./fixture.get.parameters.in in body should be one of [body]' withContinueOnErrors: false isRegexp: false - message: '"paths./fixture.get.parameters" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: 'definitions.myId.uint8.default in body should be less than or equal to 255' withContinueOnErrors: true isRegexp: false - message: 'default value for myid in query does not validate its schema' withContinueOnErrors: true isRegexp: false - message: 'invalid definition as Schema for parameter myid in query in operation "op1"' withContinueOnErrors: true isRegexp: false - message: 'myid.uint8.default in body should be less than or equal to 255' withContinueOnErrors: true isRegexp: false expectedWarnings: - message: 'definition "#/definitions/myId" is not used anywhere' withContinueOnErrors: true isRegexp: false fixture-859-2.yaml: comment: 'Issue#859: clear message on unresolved $ref. Additional scenario with items' todo: expectedLoadError: false expectedValid: false expectedMessages: # This one is a regexp since we cannot predict which $ref will fail first - message: 'some references could not be resolved in spec\. First found: object has no key ".*"' withContinueOnErrors: false isRegexp: true - message: 'could not resolve reference in / to $ref : object has no key "myitem"' withContinueOnErrors: true isRegexp: false expectedWarnings: - message: definition "#/definitions/myoutput" is not used anywhere withContinueOnErrors: true isRegexp: false fixture-859-good.yaml: comment: 'Issue#859: clear message on unresolved $ref. Valid spec baseline for further scenarios' todo: "" expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: - message: definition "#/definitions/myoutput" is not used anywhere withContinueOnErrors: false isRegexp: false fixture-859.yaml: comment: 'Issue#859: clear message on unresolved $ref. First scenario for messages Supplement for items, arrays and other nested structures in fixture-859-2.yaml' todo: would love to have all missing references in one shot. expectedLoadError: false expectedValid: false expectedMessages: - message: 'paths./.get.parameters.in in body should be one of [body]' withContinueOnErrors: false isRegexp: false - message: '"paths./.get.parameters" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: 'some references could not be resolved in spec\. First found: object has no key ".*"' withContinueOnErrors: true isRegexp: true #- message: 'invalid reference: "#/parameters/rateLimit"' #withContinueOnErrors: true #isRegexp: true - message: 'could not resolve reference in "/".GET to $ref #/parameters/rateLimit: object has no key "rateLimit"' withContinueOnErrors: true isRegexp: false - message: 'could not resolve reference in / to $ref : object has no key "record"' withContinueOnErrors: true isRegexp: false #- message: some parameters definitions are broken in "/".POST. Cannot carry on full checks on parameters for operation #withContinueOnErrors: true #isRegexp: false #- message: some parameters definitions are broken in "/".GET. Cannot carry on full checks on parameters for operation #withContinueOnErrors: true #isRegexp: false - message: 'could not resolve reference in "/".POST to $ref #/parameters/rateLimit: object has no key "rateLimit"' withContinueOnErrors: true isRegexp: false - message: 'could not resolve reference in "/".GET to $ref : object has no key "myparam"' withContinueOnErrors: true isRegexp: false expectedWarnings: - message: definition "#/definitions/myoutputs" is not used anywhere withContinueOnErrors: true isRegexp: false - message: parameter "#/parameters/rateLimits" is not used anywhere withContinueOnErrors: true isRegexp: false - message: definition "#/definitions/records" is not used anywhere withContinueOnErrors: true isRegexp: false - message: definition "#/definitions/myparams" is not used anywhere withContinueOnErrors: true isRegexp: false fixture-1050.yaml: comment: 'Valid spec: fix issue#1050 (dot separated path params)' todo: "" expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: [] fixture-1171.yaml: comment: An invalid array definition todo: Missing check on $ref sibling expectedLoadError: false expectedValid: false expectedMessages: - message: 'invalid definition as Schema for parameter other_server_id in path in operation "listZones"' withContinueOnErrors: true isRegexp: false - message: 'invalid definition for parameter in body in operation "getBody"' withContinueOnErrors: true isRegexp: false - message: '"paths./servers/{server_id}/zones.get.parameters" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: '"paths./server/getBody.get.parameters" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: '"paths./server/getBody.get.responses.200" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: '"paths./server/getBody.get.responses.200.schema" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: 'paths./server/getBody.get.responses.200.schema.properties.name in body must be of type object: "string"' withContinueOnErrors: false isRegexp: false - message: 'paths./server/getBody.get.responses.200.schema.properties.$ref in body must be of type object: "string"' withContinueOnErrors: false isRegexp: false - message: paths./server/getBody.get.responses.200.description in body is required withContinueOnErrors: false isRegexp: false - message: items in definitions.Zones is required withContinueOnErrors: false isRegexp: false - message: '"definitions.InvalidZone.items" must validate at least one schema (anyOf)' withContinueOnErrors: false isRegexp: false - message: definitions.InvalidZone.items.name in body is a forbidden property withContinueOnErrors: false isRegexp: false - message: path param "other_server_id" is not present in path "/servers/{server_id}/zones" withContinueOnErrors: true isRegexp: false - message: 'operation "getBody" has more than 1 body param: ["" "yet_other_server_id"]' withContinueOnErrors: true isRegexp: false - message: body param "yet_other_server_id" for "getBody" is a collection without an element type (array requires items definition) withContinueOnErrors: true isRegexp: false - message: in operation "listZones",path param "other_server_id" must be declared as required withContinueOnErrors: true isRegexp: false # TODO name missing in path - message: 'items in paths./server/getBody.get.parameters.schema is required' withContinueOnErrors: false isRegexp: false # TODO name missing in path - message: 'items in paths./servers/{server_id}/zones.get.parameters.schema is required' withContinueOnErrors: false isRegexp: false # TODO name missing in path - message: 'paths./server/getBody.get.parameters.in in body should be one of [header]' withContinueOnErrors: false isRegexp: false - message: 'paths./server/getBody.get.parameters.name in body is required' withContinueOnErrors: false isRegexp: false - message: 'paths./server/getBody.get.parameters.thestreetwithnoname in body is a forbidden property' withContinueOnErrors: false isRegexp: false - message: 'paths./servers/{server_id}/zones.get.parameters.in in body should be one of [body]' withContinueOnErrors: false isRegexp: false expectedWarnings: [] fixture-1231.yaml: comment: "" todo: "" expectedLoadError: false expectedValid: false expectedMessages: - message: '"parameters.customerIdParam" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: 'parameters.customerIdParam.example in body is a forbidden property' withContinueOnErrors: false isRegexp: false - message: 'parameters.customerIdParam.in in body should be one of [header]' withContinueOnErrors: false isRegexp: false expectedWarnings: - message: 'definitions.customer.create_date.example in body must be of type date-time: "float64"' withContinueOnErrors: true isRegexp: false - message: 'definitions.customer.email.example in body must be of type email: "float64"' withContinueOnErrors: true isRegexp: false - message: 'definitions.customer.id.example in body must be of type uuid: "float64"' withContinueOnErrors: true isRegexp: false - message: 'definitions.customer2.example.create_date in body must be of type date-time: "bad-date"' withContinueOnErrors: true isRegexp: false - message: 'definitions.customer2.example.id in body must be of type uuid: "mycustomer"' withContinueOnErrors: true isRegexp: false - message: 'example value for customer_id in path does not validate its schema' withContinueOnErrors: true isRegexp: false - message: '/v1/broker/{customer_id}.examples.id in body must be of type uuid: "mycustomer"' withContinueOnErrors: true isRegexp: false - message: '/v1/broker/{customer_id}.examples.create_date in body must be of type date-time: "bad-date"' withContinueOnErrors: true isRegexp: false - message: 'customer_id in path must be of type uuid: "xyz"' withContinueOnErrors: true isRegexp: false - message: '200.email.example in body must be of type email: "float64"' withContinueOnErrors: true isRegexp: false - message: '200.example.create_date in body must be of type date-time: "bad-date"' withContinueOnErrors: true isRegexp: false - message: '200.example.id in body must be of type uuid: "mycustomer"' withContinueOnErrors: true isRegexp: false - message: '200.create_date.example in body must be of type date-time: "float64"' withContinueOnErrors: true isRegexp: false - message: '200.id.example in body must be of type uuid: "float64"' withContinueOnErrors: true isRegexp: false - message: 'in operation "", example value in response 200 does not validate its schema' withContinueOnErrors: true isRegexp: false fixture-1238.yaml: comment: "" todo: "" expectedLoadError: false expectedValid: false expectedMessages: - message: definitions.RRSets in body must be of type array withContinueOnErrors: false isRegexp: false expectedWarnings: [] fixture-1243-2.yaml: comment: "" todo: "" expectedLoadError: false expectedValid: false expectedMessages: - message: path param "{loadBalancerId}" has no parameter definition withContinueOnErrors: false isRegexp: false expectedWarnings: [] fixture-1243-3.yaml: comment: "" todo: "" expectedLoadError: false expectedValid: false expectedMessages: - message: '"paths./loadBalancers/{loadBalancerId}/backendSets.get.parameters" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: 'in operation "ListBackendSets",path param "loadBalancerId" must be declared as required' withContinueOnErrors: true isRegexp: false - message: 'paths./loadBalancers/{loadBalancerId}/backendSets.get.parameters.in in body should be one of [header]' withContinueOnErrors: false isRegexp: false expectedWarnings: [] fixture-1243-4.yaml: comment: Check garbled path strings todo: "" expectedLoadError: false expectedValid: false expectedMessages: - message: '"paths./loadBalancers/{aLotOfLoadBalancerIds}/backendSets.get.parameters" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: 'paths./loadBalancers/{aLotOfLoadBalancerIds}/backendSets.get.parameters.in in body is required' withContinueOnErrors: false isRegexp: false - message: 'paths./loadBalancers/{aLotOfLoadBalancerIds}/backendSets.get.parameters.schema in body is required' withContinueOnErrors: false isRegexp: false - message: 'paths./loadBalancers/{aLotOfLoadBalancerIds}/backendSets.get.parameters.type in body is a forbidden property' withContinueOnErrors: false isRegexp: false - message: path param "{aLotOfLoadBalancerIds}" has no parameter definition withContinueOnErrors: true isRegexp: false - message: path /loadBalancers/{aLotOfLoadBalancerIds}/backendSets overlaps with /loadBalancers/{loadBalancerId}/backendSets withContinueOnErrors: true isRegexp: false - message: path param "{sid }" has no parameter definition withContinueOnErrors: true isRegexp: false - message: path param "sid" is not present in path "/othercheck/{si/d}warnMe" withContinueOnErrors: true isRegexp: false - message: path param "sid" is not present in path "/othercheck/{sid }/warnMe" withContinueOnErrors: true isRegexp: false expectedWarnings: - message: in path "/othercheck/{sid }/warnMe", param "{sid }" contains {,} or white space. Albeit not stricly illegal, this is probably no what you want withContinueOnErrors: true isRegexp: false - message: path stripped from path parameters /othercheck/{X/warnMe contains {,} or white space. This is probably no what you want. withContinueOnErrors: true isRegexp: false - message: path stripped from path parameters /othercheck/{si/d}warnMe contains {,} or white space. This is probably no what you want. withContinueOnErrors: true isRegexp: false fixture-1243-5.json: comment: "" todo: "" expectedLoadError: false expectedValid: false expectedMessages: - message: path param "{sid}" has no parameter definition withContinueOnErrors: false isRegexp: false - message: path param "{sid" is not present in path "/othercheck/{{sid}/warnMe" withContinueOnErrors: false isRegexp: false - message: path param "sid" is not present in path "/othercheck/{si/d}warnMe" withContinueOnErrors: false isRegexp: false - message: path /loadBalancers/{aLotOfLoadBalancerIds}/backendSets overlaps with /loadBalancers/{loadBalancerId}/backendSets withContinueOnErrors: false isRegexp: false expectedWarnings: - message: in path "/othercheck/{sid }/warnMe", param "{sid }" contains {,} or white space. Albeit not stricly illegal, this is probably no what you want withContinueOnErrors: false isRegexp: false - message: path stripped from path parameters /othercheck/{X/warnMe contains {,} or white space. This is probably no what you want. withContinueOnErrors: false isRegexp: false - message: path stripped from path parameters /othercheck/{si/d}warnMe contains {,} or white space. This is probably no what you want. withContinueOnErrors: false isRegexp: false fixture-1243-5.yaml: comment: "" todo: "" expectedLoadError: false expectedValid: false expectedMessages: #- message: '"paths./loadBalancers/{aLotOfLoadBalancerIds}/backendSets.get.parameters" # must validate one and only one schema (oneOf). Found none valid' # withContinueOnErrors: false # isRegexp: false #- message: '"paths./othercheck/{{sid}/warnMe.get.parameters" must validate one and # only one schema (oneOf). Found none valid' # withContinueOnErrors: false # isRegexp: false #- message: '"paths./othercheck/{sid }/warnMe.get.parameters" must validate one and # only one schema (oneOf). Found none valid' # withContinueOnErrors: false # isRegexp: false #- message: '"paths./othercheck/{si/d}warnMe.get.parameters" must validate one and # only one schema (oneOf). Found none valid' # withContinueOnErrors: false # isRegexp: false - message: 'path param "sid" is not present in path "/othercheck/{si/d}warnMe"' withContinueOnErrors: false isRegexp: false - message: 'path param "{sid" is not present in path "/othercheck/{{sid}/warnMe"' withContinueOnErrors: false isRegexp: false #- message: path param "{aLotOfLoadBalancerIds}" has no parameter definition # withContinueOnErrors: true # isRegexp: false - message: path param "{sid}" has no parameter definition withContinueOnErrors: false isRegexp: false #- message: path param "{sid }" has no parameter definition # withContinueOnErrors: true # isRegexp: false - message: path /loadBalancers/{aLotOfLoadBalancerIds}/backendSets overlaps with /loadBalancers/{loadBalancerId}/backendSets withContinueOnErrors: false isRegexp: false expectedWarnings: - message: in path "/othercheck/{sid }/warnMe", param "{sid }" contains {,} or white space. Albeit not stricly illegal, this is probably no what you want withContinueOnErrors: false isRegexp: false - message: path stripped from path parameters /othercheck/{X/warnMe contains {,} or white space. This is probably no what you want. withContinueOnErrors: false isRegexp: false - message: path stripped from path parameters /othercheck/{si/d}warnMe contains {,} or white space. This is probably no what you want. withContinueOnErrors: false isRegexp: false fixture-1243-good.yaml: comment: "" todo: "" expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: [] fixture-1243.yaml: comment: "" todo: "" expectedLoadError: false expectedValid: false expectedMessages: - message: '"paths./loadBalancers/{loadBalancerId}/backendSets.get.responses.200" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: paths./loadBalancers/{loadBalancerId}/backendSets.get.responses.200.headers.opc-response-id.$ref in body is a forbidden property withContinueOnErrors: false isRegexp: false - message: paths./loadBalancers/{loadBalancerId}/backendSets.get.responses.200.headers.opc-response-id.type in body is required withContinueOnErrors: false isRegexp: false - message: path param "{loadBalancerId}" has no parameter definition withContinueOnErrors: true isRegexp: false - message: 'in "paths./loadBalancers/{loadBalancerId}/backendSets.get.responses.200": $ref are not allowed in headers. In context for header "opc-response-id", one may not use $ref=":#/x-descriptions/opc-response-id"' withContinueOnErrors: false isRegexp: false expectedWarnings: [] fixture-1289-donotload.json: comment: "" todo: "" expectedLoadError: true expectedValid: false expectedMessages: - message: .*yaml:.+ withContinueOnErrors: false isRegexp: true expectedWarnings: [] fixture-1289-donotload.yaml: comment: "" todo: "" expectedLoadError: true expectedValid: false expectedMessages: - message: .*yaml:.+ withContinueOnErrors: false isRegexp: true expectedWarnings: [] fixture-1289-good.yaml: comment: "" todo: "" expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: [] fixture-1289.yaml: comment: "" todo: "" expectedLoadError: false expectedValid: false expectedMessages: - message: items in definitions.getSomeIds.properties.someIds is required withContinueOnErrors: false isRegexp: false expectedWarnings: [] fixture-collisions.yaml: comment: A supplement scenario for uniqueness tests in paths, operations, parameters todo: "" expectedLoadError: false expectedValid: false expectedMessages: - message: '"paths./bigbody/get.get.parameters" must validate one and only one schema (oneOf). Found none valid' withContinueOnErrors: false isRegexp: false - message: paths./dupparam/get.get.parameters in body shouldn't contain duplicates withContinueOnErrors: false isRegexp: false - message: paths./bigbody/get.get.parameters.in in body should be one of [header] withContinueOnErrors: false isRegexp: false - message: 'operation "ope2" has more than 1 body param: ["loadBalancerId2" "loadBalancerId3"]' withContinueOnErrors: true isRegexp: false - message: '"ope6" is defined 2 times' withContinueOnErrors: true isRegexp: false - message: '"ope5" is defined 2 times' withContinueOnErrors: true isRegexp: false - message: path /duplpath/{id1}/get overlaps with /duplpath/{id2}/get withContinueOnErrors: true isRegexp: false - message: duplicate parameter name "id2" for "query" in operation "ope7" withContinueOnErrors: true isRegexp: false - message: 'params in path "/loadBalancers/{loadBalancerId}/backendSets/{loadBalancerId}/get" must be unique: "{loadBalancerId}" conflicts with "{loadBalancerId}"' withContinueOnErrors: true isRegexp: false # with systematic param resolution, we get more errors like this one (body and type: string) - message: 'invalid definition for parameter loadBalancerId2 in body in operation "ope2"' withContinueOnErrors: true isRegexp: false - message: 'invalid definition for parameter loadBalancerId3 in body in operation "ope2"' withContinueOnErrors: true isRegexp: false expectedWarnings: [] fixture-constraints-on-numbers.yaml: comment: A supplement scenario for native vs float-based constraint verifications on integers (multipleOf,maximum, minimum). todo: This scenario supports current checks, that is for constraints on schemas with a default value only. It should be generalized (issue#581) and also for example values (issue#1231) expectedLoadError: false expectedValid: false expectedMessages: - message: default value for param1 in query does not validate its schema withContinueOnErrors: false isRegexp: false - message: default value for param2 in query does not validate its schema withContinueOnErrors: false isRegexp: false - message: default value for param3 in query does not validate its schema withContinueOnErrors: false isRegexp: false - message: default value for param4 in query does not validate its schema withContinueOnErrors: false isRegexp: false - message: default value for param5 in query does not validate its schema withContinueOnErrors: false isRegexp: false - message: default value for param6 in query does not validate its schema withContinueOnErrors: false isRegexp: false - message: default value for param7 in query does not validate its schema withContinueOnErrors: false isRegexp: false - message: default value for param8 in query does not validate its schema withContinueOnErrors: false isRegexp: false # Note how value has been implicitely converted to fload64 - message: param1 in query should be a multiple of 2.147483648e+09 withContinueOnErrors: false isRegexp: false - message: MultipleOf value must be of type integer with format int32 in param1 withContinueOnErrors: false isRegexp: false - message: MultipleOf value must be of type integer with format int32 in param2 withContinueOnErrors: false isRegexp: false - message: Checked value must be of type integer with format int32 in param2 withContinueOnErrors: false isRegexp: false - message: Checked value must be of type integer with format int32 in param3 withContinueOnErrors: false isRegexp: false - message: param3 in query should be a multiple of 10 withContinueOnErrors: false isRegexp: false - message: Checked value must be of type integer with format int32 in param4 withContinueOnErrors: false isRegexp: false - message: Checked value must be of type integer with format int32 in param5 withContinueOnErrors: false isRegexp: false # Note how value has been implicitely converted to fload64 - message: param5 in query should be less than or equal to 2.147483647e+09 withContinueOnErrors: false isRegexp: false - message: Checked value must be of type integer with format uint32 in param6 withContinueOnErrors: false isRegexp: false - message: Checked value must be of type integer with format int32 in param7 withContinueOnErrors: false isRegexp: false - message: Checked value must be of type integer with format uint32 in param8 withContinueOnErrors: false isRegexp: false # Note how value has been implicitely converted to fload64 - message: param8 in query should be greater than or equal to 2.147483647e+09 withContinueOnErrors: false isRegexp: false expectedWarnings: #- message: param8 in query has a default but no valid schema # withContinueOnErrors: false # isRegexp: false fixture-invalid-example-property.yaml: comment: todo: expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: - message: example value for getSomeIds in body does not validate its schema withContinueOnErrors: false isRegexp: false - message: 'getSomeIds.id.example in body must be of type number: "string"' withContinueOnErrors: false isRegexp: false fixture-valid-example-property.yaml: comment: todo: expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: [] petstore-expanded.json: comment: Fail Ref expansion in ContinueOnErrors mode panics todo: expectedLoadError: false expectedValid: false expectedMessages: - message: invalid ref "pet" withContinueOnErrors: false isRegexp: false # this one is a regexp since the full absolute path of the ref is reported - message: 'could not resolve reference in newPet to \$ref pet: open .*[\/\\]pet:\s.+' withContinueOnErrors: true isRegexp: true # with systematic response expansion, get more errors - message: 'could not resolve reference in "\/pets".POST to \$ref .*: open .*:\s.+' withContinueOnErrors: true isRegexp: true expectedWarnings: [] gentest.yaml: comment: many parameters situations todo: expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: - message: deepNested1 in query has a default value and is required as parameter withContinueOnErrors: false isRegexp: false - message: queryParam2 in query has a default value and is required as parameter withContinueOnErrors: false isRegexp: false gentest2.yaml: comment: many parameters situations with default values todo: expectedLoadError: false expectedValid: true expectedMessages: [] expectedWarnings: - message: deepNested1 in query has a default value and is required as parameter withContinueOnErrors: false isRegexp: false - message: queryParam2 in query has a default value and is required as parameter withContinueOnErrors: false isRegexp: false gentest3.yaml: comment: default format in headers todo: expectedLoadError: false expectedValid: false expectedMessages: - message: 'in operation "gimmeLottaHeaders", default value in header sanity-check-header-2 for response 201 does not validate its schema' withContinueOnErrors: false isRegexp: false - message: 'sanity-check-header-2 in response must be of type date: "x1972-01-01"' withContinueOnErrors: false isRegexp: false expectedWarnings: [] fixture-all-formats.yaml: comment: all custom formats as default values todo: expectedLoadError: false expectedValid: false expectedMessages: # On parameters: - message: 'default value for n01 in query does not validate its schema' - message: 'default value for n03 in query does not validate its schema' - message: 'default value for n04 in query does not validate its schema' - message: 'default value for n05 in query does not validate its schema' - message: 'default value for n06 in query does not validate its schema' - message: 'default value for p01 in query does not validate its schema' - message: 'default value for p02 in query does not validate its schema' - message: 'default value for p03 in query does not validate its schema' - message: 'default value for p04 in query does not validate its schema' - message: 'default value for p05 in query does not validate its schema' - message: 'default value for p06 in query does not validate its schema' - message: 'default value for p07 in query does not validate its schema' - message: 'default value for p08 in query does not validate its schema' - message: 'default value for p09 in query does not validate its schema' - message: 'default value for p10 in query does not validate its schema' - message: 'default value for p11 in query does not validate its schema' - message: 'default value for p12 in query does not validate its schema' - message: 'default value for p13 in query does not validate its schema' - message: 'default value for p14 in query does not validate its schema' - message: 'default value for p15 in query does not validate its schema' - message: 'default value for p16 in query does not validate its schema' - message: 'default value for p17 in query does not validate its schema' - message: 'default value for p18 in query does not validate its schema' - message: 'default value for p20 in query does not validate its schema' - message: 'default value for p21 in query does not validate its schema' - message: 'default value for p22 in query does not validate its schema' - message: 'default value for p23 in query does not validate its schema' - message: 'n01 in query must be of type number: "string"' - message: 'n03 in query must be of type int32: "float64"' - message: 'n04 in query must be of type int64: "float64"' - message: 'Checked value must be of type integer with format uint32 in n05' - message: 'Checked value must be of type integer with format uint64 in n06' - message: 'p01 in query must be of type byte: "ZWxpemFiZXRocG9zZXk"' - message: 'p02 in query must be of type creditcard: "4111-1X11-1111-1111"' - message: 'p03 in query must be of type date: "1970-13-01"' - message: 'p04 in query must be of type date-time: "1963-13-19T08:30:06.283185Z"' - message: 'p05 in query must be of type duration: "three weeks"' - message: 'p06 in query must be of type email: "joe.bloggs-example.com"' - message: 'p07 in query must be of type hexcolor: "xFFFFFF"' - message: 'p08 in query must be of type hostname: "not_a_valid_hostname"' - message: 'p09 in query must be of type ipv4: "192.168.0.256"' - message: 'p10 in query must be of type ipv6: "o::1"' - message: 'p11 in query must be of type isbn: "abc-0321751043"' - message: 'p12 in query must be of type isbn10: "abc-0321751043"' - message: 'p13 in query must be of type isbn13: "978|3401013190"' - message: 'p14 in query must be of type mac: "01:02:03:04:05:06:07"' - message: 'p15 in query must be of type bsonobjectid: "x07f1f77bcf86cd799439011"' - message: 'p16 in query must be of type password: "float64"' - message: 'p17 in query must be of type rgbcolor: "rgb(100,100)"' - message: 'p18 in query must be of type ssn: "111-11111"' - message: 'p20 in query must be of type uuid: "a8098c1a+f86e+11da+bd1a+00112444be1e"' - message: 'p21 in query must be of type uuid3: "bcd02e22+68f0+3046+a512+327cca9def8f"' - message: 'p22 in query must be of type uuid4: "025b0d74+00a2+4048+bf57+227c5111bb34"' - message: 'p23 in query must be of type uuid5: "886313e1+3b8a+5372+9b90+0c9aee199e5d"' # On schema: - message: 'definitions.allformats-bad.prop01.default in body must be of type byte: "ZWxpemFiZXRocG9zZXk"' - message: 'definitions.allformats-bad.prop02.default in body must be of type creditcard: "4111-1111-1111-111K"' - message: 'definitions.allformats-bad.prop03.default in body must be of type date: "1970-01-32"' - message: 'definitions.allformats-bad.prop04.default in body must be of type date-time: "1963-06-19T99:30:06.283185Z"' - message: 'definitions.allformats-bad.prop05.default in body must be of type duration: "weeks"' - message: 'definitions.allformats-bad.prop06.default in body must be of type email: "joe.bloggs-example.com"' - message: 'definitions.allformats-bad.prop07.default in body must be of type hexcolor: "float64"' - message: 'definitions.allformats-bad.prop08.default in body must be of type hostname: "---invalid-hostname---"' - message: 'definitions.allformats-bad.prop09.default in body must be of type ipv4: "192.2.0.1.45"' - message: 'definitions.allformats-bad.prop10.default in body must be of type ipv6: "x::1"' - message: 'definitions.allformats-bad.prop11.default in body must be of type isbn: "X0321751043"' - message: 'definitions.allformats-bad.prop12.default in body must be of type isbn10: "X0321751043"' - message: 'definitions.allformats-bad.prop13.default in body must be of type isbn13: "X978 3401013190"' - message: 'definitions.allformats-bad.prop14.default in body must be of type mac: "X1:02:03:04:05:06"' - message: 'definitions.allformats-bad.prop15.default in body must be of type bsonobjectid: "X507f1f77bcf86cd799439011"' - message: 'definitions.allformats-bad.prop16.default in body must be of type password: "float64"' - message: 'definitions.allformats-bad.prop17.default in body must be of type rgbcolor: "gb(100,100,100)"' - message: 'definitions.allformats-bad.prop18.default in body must be of type ssn: "Z111-11-1111"' - message: 'definitions.allformats-bad.prop20.default in body must be of type uuid: "a8098c1a+f86e+11da+bd1a+00112444be1e"' - message: 'definitions.allformats-bad.prop21.default in body must be of type uuid3: "bcd02e22+68f0+3046+a512+327cca9def8f"' - message: 'definitions.allformats-bad.prop22.default in body must be of type uuid4: "025b0d74+00a2+4048+bf57+227c5111bb34"' - message: 'definitions.allformats-bad.prop23.default in body must be of type uuid5: "886313e1+3b8a+5372+9b90+0c9aee199e5d"' - message: 'definitions.allformats-bad.propn01.default in body must be of type number: "string"' - message: 'definitions.allformats-bad.propn02.default in body must be of type number: "string"' - message: 'definitions.allformats-bad.propn03.default in body must be of type int32: "float64"' - message: 'definitions.allformats-bad.propn04.default in body must be of type int64: "float64"' - message: 'definitions.allformats-bad.propn05.default in body must be of type uint32: "float64"' - message: 'definitions.allformats-bad.propn06.default in body must be of type uint64: "float64"' # More messages with systematic response expansion - message: '200.prop01.default in body must be of type byte: "ZWxpemFiZXRocG9zZXk"' - message: '200.prop02.default in body must be of type creditcard: "4111-1111-1111-111K"' - message: '200.prop03.default in body must be of type date: "1970-01-32"' - message: '200.prop04.default in body must be of type date-time: "1963-06-19T99:30:06.283185Z"' - message: '200.prop05.default in body must be of type duration: "weeks"' - message: '200.prop06.default in body must be of type email: "joe.bloggs-example.com"' - message: '200.prop07.default in body must be of type hexcolor: "float64"' - message: '200.prop08.default in body must be of type hostname: "---invalid-hostname---"' - message: '200.prop09.default in body must be of type ipv4: "192.2.0.1.45"' - message: '200.prop10.default in body must be of type ipv6: "x::1"' - message: '200.prop11.default in body must be of type isbn: "X0321751043"' - message: '200.prop12.default in body must be of type isbn10: "X0321751043"' - message: '200.prop13.default in body must be of type isbn13: "X978 3401013190"' - message: '200.prop14.default in body must be of type mac: "X1:02:03:04:05:06"' - message: '200.prop15.default in body must be of type bsonobjectid: "X507f1f77bcf86cd799439011"' - message: '200.prop16.default in body must be of type password: "float64"' - message: '200.prop17.default in body must be of type rgbcolor: "gb(100,100,100)"' - message: '200.prop18.default in body must be of type ssn: "Z111-11-1111"' - message: '200.prop20.default in body must be of type uuid: "a8098c1a+f86e+11da+bd1a+00112444be1e"' - message: '200.prop21.default in body must be of type uuid3: "bcd02e22+68f0+3046+a512+327cca9def8f"' - message: '200.prop22.default in body must be of type uuid4: "025b0d74+00a2+4048+bf57+227c5111bb34"' - message: '200.prop23.default in body must be of type uuid5: "886313e1+3b8a+5372+9b90+0c9aee199e5d"' - message: '200.propn01.default in body must be of type number: "string"' - message: '200.propn02.default in body must be of type number: "string"' - message: '200.propn03.default in body must be of type int32: "float64"' - message: '200.propn04.default in body must be of type int64: "float64"' - message: '200.propn05.default in body must be of type uint32: "float64"' - message: '200.propn06.default in body must be of type uint64: "float64"' - message: 'in operation "op2", default value in response 200 does not validate its schema' expectedWarnings: [] fixture-bad-response.yaml: comment: $ref sibling in response todo: expectedLoadError: false expectedValid: false expectedMessages: - message: '"paths./fixture.get.responses.200" must validate one and only one schema (oneOf). Found none valid' - message: 'paths./fixture.get.responses.200.$ref in body is a forbidden property' expectedWarnings: - message: 'definition "#/definitions/someIds" is not used anywhere' withContinueOnErrors: true validate-0.24.0/fixtures/validation/fixture-1050.yaml000066400000000000000000000011651457312750000223350ustar00rootroot00000000000000swagger: '2.0' info: description: >- Minimal swagger file to demonstrate a dot-in-th-path problem version: 0.0.1 title: test tags: - name: test description: test the go-swagger generator bug paths: /{fileName}.{fileExt}: get: tags: - test operationId: test parameters: - name: fileName in: path required: true type: string - name: fileExt in: path required: true type: string responses: '204': description: successful operation '500': description: Operation errorvalidate-0.24.0/fixtures/validation/fixture-1171.yaml000066400000000000000000000046231457312750000223430ustar00rootroot00000000000000# In this one we make sure arrays without items are detected by validation # Conversely, objects with items are detected with fixture for issue #1238 swagger: '2.0' info: title: issue-1171 version: 0.0.1 license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: '/servers/{server_id}/zones': get: operationId: listZones tags: - zones parameters: - name: server_id in: path required: true type: string - name: other_server_id in: path schema: # Invalid array definition type: array properties: other: type: string responses: '200': description: An array of Zones schema: $ref: '#/definitions/Zones' '/server/getBody': get: operationId: getBody parameters: - name: yet_other_server_id in: body schema: # Invalid array definition type: array properties: other: type: string # param should be named? - thestreetwithnoname: storyOfTheStreetsAreMine in: body type: integer responses: '200': schema: $ref: '#/definitions/Zones' '/servers/{server_id}/zones/{zone_id}': get: operationId: listZone tags: - zones parameters: - name: server_id in: path required: true type: string - name: zone_id type: string in: path required: true responses: '200': description: A Zone schema: $ref: '#/definitions/Zone' '201': description: An invalid Zone schema: $ref: '#/definitions/InvalidZone' '203': description: An empty Zone schema: $ref: '#/definitions/EmptyZone' definitions: # An array must have an items definition Zones: type: array properties: name: type: string Zone: type: array items: type: string InvalidZone: type: array items: # This is a forbidden property name: type: string EmptyZone: type: array # Empty description: no error items: validate-0.24.0/fixtures/validation/fixture-1231.yaml000066400000000000000000000050421457312750000223340ustar00rootroot00000000000000swagger: '2.0' info: title: test example version: "1.0.0" produces: - application/json paths: /v1/broker/{customer_id}: get: #operationId: a parameters: - $ref: "#/parameters/customerIdParam" responses: 200: # in line example description: Customer schema: type: object properties: id: type: string format: uuid email: type: string format: email create_date: type: string format: date-time examples: application/json: id: mycustomer email: mycustomer@ripoffpark.com create_date: bad-date /v1/vendor/{customer_id}: get: #operationId: b parameters: - $ref: "#/parameters/customerIdParam" responses: 200: description: Customer schema: $ref: '#/definitions/customer2' /v1/customer/{customer_id}: get: #operationId: c parameters: - $ref: "#/parameters/customerIdParam" responses: 200: description: Customer schema: $ref: '#/definitions/customer' parameters: customerIdParam: name: customer_id description: The ID of the customer in: path required: true type: string format: uuid example: xyz #<---- example not allowed here definitions: # example property by property customer: type: object required: - id properties: id: type: string format: uuid description: The unique ID of the customer example: 123 email: type: string format: email description: The email address of the customer example: 123 create_date: type: string format: date-time description: The date and time when the customer was created example: 123 # example at object level customer2: type: object required: - id properties: id: type: string format: uuid description: The unique ID of the customer email: type: string format: email description: The email address of the customer create_date: type: string format: date-time description: The date and time when the customer was created example: id: 'mycustomer' email: 'mycustomer@ripoffpark.com' create_date: bad-date validate-0.24.0/fixtures/validation/fixture-1238.yaml000066400000000000000000000027111457312750000223430ustar00rootroot00000000000000# This spec should be correctly detected as invalid swagger: '2.0' info: title: issue-1238 version: 0.0.1 license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: '/servers/{server_id}/zones': get: operationId: listZones tags: - zones parameters: - name: server_id in: path required: true type: string responses: '200': description: An array of Zones schema: $ref: '#/definitions/Zones' '/servers/{server_id}/zones/{zone_id}': get: operationId: listZone tags: - zones parameters: - name: server_id in: path required: true type: string - name: zone_id type: string in: path required: true responses: '200': description: A Zone schema: $ref: '#/definitions/Zone' definitions: Zones: type: array items: $ref: '#/definitions/Zone' Zone: type: object properties: name: type: string RR: $ref: '#/definitions/RRSets' RRSets: # Declaring items for an object should be correctly assessed as invalid and not trigger a panic (issue#1238) type: object items: $ref: '#/definitions/RRSet' RRSet: properties: name: type: string validate-0.24.0/fixtures/validation/fixture-1243-2.yaml000066400000000000000000000014001457312750000224700ustar00rootroot00000000000000--- swagger: "2.0" info: title: "Load Balancing Service API" description: API for the Load Balancing Service version: "20170115" basePath: /20170115 paths: /loadBalancers/{loadBalancerId}/backendSets: get: summary: "ListBackendSets" tags: ['loadBalancer'] description: Lists all backend sets associated with a given load balancer. operationId: "ListBackendSets" # Missing parameter in path produces: - "application/json" responses: 200: description: The list is being retrieved. # fixed that: $ref is forbidden in headers headers: opc-response-id: description: | Unique identifier for the response. type: string validate-0.24.0/fixtures/validation/fixture-1243-3.yaml000066400000000000000000000016101457312750000224740ustar00rootroot00000000000000--- swagger: "2.0" info: title: "Load Balancing Service API" description: API for the Load Balancing Service version: "20170115" basePath: /20170115 paths: /loadBalancers/{loadBalancerId}/backendSets: get: summary: "ListBackendSets" tags: ['loadBalancer'] description: Lists all backend sets associated with a given load balancer. operationId: "ListBackendSets" # fixed that: Missing parameter in path parameters: - name: loadBalancerId in: path type: string # Ah: should be required produces: - "application/json" responses: 200: description: The list is being retrieved. # fix that: $ref is forbidden in headers headers: opc-response-id: description: | Unique identifier for the response. type: string validate-0.24.0/fixtures/validation/fixture-1243-4.yaml000066400000000000000000000047021457312750000225020ustar00rootroot00000000000000--- swagger: "2.0" info: title: "Load Balancing Service API" description: Play with path parameters and checks version: "20170115" basePath: /20170115 paths: /loadBalancers/{loadBalancerId}/backendSets: get: summary: "ListBackendSets" tags: ['loadBalancer'] description: Lists all backend sets associated with a given load balancer. operationId: "ListBackendSets" # fixed that: Missing parameter in path parameters: - name: loadBalancerId # fixed that: specified in in: path type: string # fixed that: should be required required: true produces: - "application/json" responses: 200: description: The list is being retrieved. # fixed that: $ref is forbidden in headers headers: opc-response-id: description: | Unique identifier for the response. type: string /loadBalancers/{aLotOfLoadBalancerIds}/backendSets: get: summary: "ERROR" tags: ['loadBalancer'] description: Triggers an invalid spec check operationId: "ListALotOfBackendSets" # fixed that: Missing parameter in path parameters: # Error here: parameter don't match - name: aLotOfLoadBalancerId type: string # fixed that: should be required required: true produces: - "application/json" responses: 200: description: The list is being retrieved. # fixed that: $ref is forbidden in headers headers: opc-response-id: description: | Unique identifier for the response. type: string # This one should give a warning /othercheck/{{sid}/warnMe: get: parameters: - name: sid type: string in: path required: true produces: - "application/json" responses: 200: # This one also /othercheck/{sid }/warnMe: get: parameters: - name: sid type: string in: path required: true produces: - "application/json" responses: 200: # This one fails /othercheck/{si/d}warnMe: get: parameters: - name: sid # fixed this in: path type: string required: true produces: - "application/json" responses: 200: validate-0.24.0/fixtures/validation/fixture-1243-5.json000066400000000000000000000045101457312750000225070ustar00rootroot00000000000000{ "swagger":"2.0", "info":{"title":"Load Balancing Service API","description":"Play with path parameters and checks","version":"20170115"}, "basePath":"/20170115", "paths":{ "/loadBalancers/{loadBalancerId}/backendSets":{ "get":{ "summary":"ListBackendSets", "tags":["loadBalancer"], "description":"Lists all backend sets associated with a given load balancer.", "operationId":"ListBackendSets", "parameters":[ { "name":"loadBalancerId", "type":"string", "in":"path", "required":true } ], "produces":["application/json"], "responses":{ "200":{ "description":"The list is being retrieved.", "headers":{ "opc-response-id":{ "description":"Unique identifier for the response.\n", "type":"string" } } } } } }, "/loadBalancers/{aLotOfLoadBalancerIds}/backendSets":{ "get":{ "summary":"ERROR", "tags":["loadBalancer"], "description":"Triggers an invalid spec check", "operationId":"ListALotOfBackendSets", "parameters":[ { "name":"aLotOfLoadBalancerIds", "type":"string", "in":"path", "required":true } ], "produces":[ "application/json" ], "responses":{ "200":{ "description":"The list is being retrieved.", "headers":{ "opc-response-id":{ "description":"Unique identifier for the response.\n", "type":"string" } } } } } }, "/othercheck/{{sid}/warnMe":{ "get":{ "parameters":[ { "name":"{sid", "type":"string", "in":"path", "required":true } ], "produces":[ "application/json" ], "responses":{ "200":null } } }, "/othercheck/{sid }/warnMe":{ "get":{ "parameters":[ { "name":"sid ", "in":"path", "type":"string", "required":true } ], "produces":["application/json"], "responses":{ "200":null } } }, "/othercheck/{si/d}warnMe":{ "get":{ "parameters":[ { "name":"sid", "type":"string", "in":"path", "required":true } ], "produces":["application/json"], "responses":{ "200":null } } } } } validate-0.24.0/fixtures/validation/fixture-1243-5.yaml000066400000000000000000000052711457312750000225050ustar00rootroot00000000000000--- swagger: "2.0" info: title: "Load Balancing Service API" description: Play with path parameters and checks version: "20170115" basePath: /20170115 paths: /loadBalancers/{loadBalancerId}/backendSets: get: summary: "ListBackendSets" tags: ['loadBalancer'] description: Lists all backend sets associated with a given load balancer. operationId: "ListBackendSets" # fixed that: Missing parameter in path parameters: - name: loadBalancerId type: string in: path # fixed that: should be required required: true produces: - "application/json" responses: 200: description: The list is being retrieved. # fixed that: $ref is forbidden in headers headers: opc-response-id: description: | Unique identifier for the response. type: string /loadBalancers/{aLotOfLoadBalancerIds}/backendSets: get: summary: "ERROR" tags: ['loadBalancer'] description: Triggers an invalid spec check operationId: "ListALotOfBackendSets" # fixed that: Missing parameter in path parameters: # Fixed that error here: parameter don't match - name: aLotOfLoadBalancerIds in: path type: string # fixed that: should be required required: true produces: - "application/json" responses: 200: description: The list is being retrieved. # fixed that: $ref is forbidden in headers headers: opc-response-id: description: | Unique identifier for the response. type: string # This one should give a warning /othercheck/{{sid}/warnMe: get: parameters: # Fixed this: stupid, but what if I explictly want a { in name... # Still an error since we add " in the name string - name: '{sid' in: path type: string required: true produces: - "application/json" responses: 200: # This one also /othercheck/{sid }/warnMe: get: parameters: # Fixed this: stupid, but what if I explictly want a space in name... # Still an error since we add " in the name string - name: 'sid ' in: path type: string required: true produces: - "application/json" responses: 200: # This one fails /othercheck/{si/d}warnMe: get: parameters: - name: sid in: path type: string required: true produces: - "application/json" responses: 200: validate-0.24.0/fixtures/validation/fixture-1243-good.yaml000066400000000000000000000016531457312750000232710ustar00rootroot00000000000000--- swagger: "2.0" info: title: "Load Balancing Service API" description: API for the Load Balancing Service version: "20170115" basePath: /20170115 paths: /loadBalancers/{loadBalancerId}/backendSets: get: summary: "ListBackendSets" tags: ['loadBalancer'] description: Lists all backend sets associated with a given load balancer. operationId: "ListBackendSets" # fixed that: Missing parameter in path parameters: - name: loadBalancerId in: path type: string # fixed that: should be required required: true produces: - "application/json" responses: 200: description: The list is being retrieved. # fixed that: $ref is forbidden in headers headers: opc-response-id: description: | Unique identifier for the response. type: string validate-0.24.0/fixtures/validation/fixture-1243.yaml000066400000000000000000000015671457312750000223470ustar00rootroot00000000000000--- swagger: "2.0" info: title: "Load Balancing Service API" description: API for the Load Balancing Service version: "20170115" basePath: /20170115 paths: /loadBalancers/{loadBalancerId}/backendSets: get: summary: "ListBackendSets" tags: ['loadBalancer'] description: Lists all backend sets associated with a given load balancer. operationId: "ListBackendSets" # error no param defined produces: - "application/json" responses: 200: # we should not have a forbidden property message here: instead description: The list is being retrieved. # $ref is forbidden in headers headers: opc-response-id: $ref: '#/x-descriptions/opc-response-id' x-descriptions: opc-response-id: description: | Unique identifier for the response. type: string validate-0.24.0/fixtures/validation/fixture-1289-donotload.json000066400000000000000000000005721457312750000243440ustar00rootroot00000000000000"someIds": { "type": "array", "example": [ 413, 231, 777 ], "default": [ 413, 231, 777 ], "items": { "type": "number" } }, "getSomeIds": { "type": "object", "properties": { "someIds": { "$ref": "#/definitions/someIds", "type": "array" } } }, validate-0.24.0/fixtures/validation/fixture-1289-donotload.yaml000066400000000000000000000005721457312750000243350ustar00rootroot00000000000000"someIds": { "type": "array", "example": [ 413, 231, 777 ], "default": [ 413, 231, 777 ], "items": { "type": "number" } }, "getSomeIds": { "type": "object", "properties": { "someIds": { "$ref": "#/definitions/someIds", "type": "array" } } }, validate-0.24.0/fixtures/validation/fixture-1289-good.yaml000066400000000000000000000005431457312750000233000ustar00rootroot00000000000000--- swagger: '2.0' info: title: 'fixture 1289' version: '1.0' produces: - application/json paths: '/fixture': get: operationId: op1 responses: '200': description: 'erroneous response' schema: # Expect clean $ref: '#/definitions/someIds' definitions: someIds: type: string validate-0.24.0/fixtures/validation/fixture-1289.yaml000066400000000000000000000007671457312750000223620ustar00rootroot00000000000000--- swagger: '2.0' info: title: 'fixture 1289' version: '1.0' produces: - application/json paths: '/fixture': get: operationId: op1 responses: '200': description: 'erroneous response' schema: $ref: '#/definitions/getSomeIds' definitions: getSomeIds: type: object properties: # Expect a clear message about $ref siblings someIds: $ref: '#/definitions/someIds' type: array someIds: type: string validate-0.24.0/fixtures/validation/fixture-161-2.json000066400000000000000000000040441457312750000224240ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "", "version": "1.0.0", "title": "issue#161", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/folders": { "post": { "parameters": [{ "name": "requestBody", "in": "body", "description": "body parameter", "required": true, "schema": { "type": "object", "title": "body of creating folder", "description": "body parameter of creating folder", "default": "{\"name\":\"new\",\"parent\":{\"id\":\"0\"}}", "required": ["name", "parent"], "properties": { "name": { "type": "string" }, "parent": { "type": "object", "properties": { "id": { "type": "number" } } } }, "readOnly": false, "externalDocs": { "description": "create a new folder.", "url": "https://box-content.readme.io/#create-a-new-folder" }, "example": { "name": "newname.jpg", "parent": { "id": "0" } } } }], "responses": { "200": { "description": "Some response" } } } } } } validate-0.24.0/fixtures/validation/fixture-161-good.json000066400000000000000000000040741457312750000232160ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "", "version": "1.0.0", "title": "issue#161", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/folders": { "post": { "parameters": [{ "name": "requestBody", "in": "body", "description": "body parameter", "required": true, "schema": { "type": "object", "title": "body of creating folder", "description": "body parameter of creating folder", "default": { "name": "new", "parent":{ "id": 0 } }, "required": ["name", "parent"], "properties": { "name": { "type": "string" }, "parent": { "type": "object", "properties": { "id": { "type": "number" } } } }, "readOnly": false, "externalDocs": { "description": "create a new folder.", "url": "https://box-content.readme.io/#create-a-new-folder" }, "example": { "name": "newname.jpg", "parent": { "id": "0" } } } }], "responses": { "200": { "description": "Some response" } } } } } } validate-0.24.0/fixtures/validation/fixture-161.json000066400000000000000000000040441457312750000222650ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "", "version": "1.0.0", "title": "issue#161", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/folders": { "post": { "parameters": [{ "name": "requestBody", "in": "body", "description": "body parameter", "required": true, "schema": { "type": "object", "title": "body of creating folder", "description": "body parameter of creating folder", "default": "{\"name\":\"new\",\"parent\":{\"id\":\"0\"}}", "required": ["name", "parent"], "properties": { "name": { "type": "object" }, "parent": { "type": "object", "properties": { "id": { "type": "number" } } } }, "readOnly": false, "externalDocs": { "description": "create a new folder.", "url": "https://box-content.readme.io/#create-a-new-folder" }, "example": { "name": "newname.jpg", "parent": { "id": "0" } } } }], "responses": { "200": { "description": "Some response" } } } } } } validate-0.24.0/fixtures/validation/fixture-342-2.yaml000066400000000000000000000011631457312750000224150ustar00rootroot00000000000000swagger: '2.0' info: title: issue-342 description: A variant on issue-342 with an incorrect attempt to fix the $ref sibling issue version: 0.0.1 license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /get_main_object: get: tags: - maindata parameters: # Here, declared as a property and not an item: cannot marshall $ref: "#/parameters/sid" responses: '200': parameters: sid: #name: mysid in: body required: true type: integer format: int64 validate-0.24.0/fixtures/validation/fixture-342.yaml000066400000000000000000000033671457312750000222660ustar00rootroot00000000000000swagger: '2.0' info: title: issue-342 description: | Original issue: a spec which triggers a panic because of invalid type assertion on parameters. Specifically, this tests how validation carries on when references returns an unexpected object. This may happen for parameters and responses and should be accurately reported. version: 0.0.1 license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /get_main_object: get: tags: - maindata parameters: - name: pquery1 in: query required: true $ref: "#/definitions/sample_info/properties/sid" # <-- error: a whole schema replaces the parameter - $ref: "#/parameters/wrong" # <-- error: wrong param props - $ref: "#/parameters/notbetter" # <-- error: wrong param schema - $ref: "#/parameters/stillnogood" # <-- error: wrong param schema - name: pquery2 in: query required: true $ref: "nowhere.yaml#/definitions/sample_info/properties/sid" # <-- error: expand ref error - name: sid in: body required: true $ref: "#/definitions/sample_info/properties/sid" # <-- error: a whole schema replaces the parameter responses: '200': parameters: wrong: theName: wrongNameProperty theType: wrongTypePropery notbetter: type: object properties: whenDidThatHappen: type: string format: date stillnogood: schema: type: object properties: aintnogood: type: integer definitions: sample_info: type: object properties: sid: type: string format: uuid validate-0.24.0/fixtures/validation/fixture-43-2.json000066400000000000000000000033711457312750000223450ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "title": "Test", "description": "Tests issue with examples and nested objects with items properties", "version": "1.0" }, "host": "FooBar", "basePath": "/latest", "schemes": [ "https" ], "produces": [ "application/json" ], "paths": { "/foo/": { "get": { "description": "Tests issue with nested items object properties and examples", "summary": "Tests issue with nested items object properties and examples", "responses": { "200": { "description": "Example should match spec", "schema": { "type": "array", "items": { "type": "object", "properties": { "items": { "type": "array", "maxItems": 255, "items": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" } } } } } } } } } } } } } validate-0.24.0/fixtures/validation/fixture-43.json000066400000000000000000000042511457312750000222040ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "title": "Test", "description": "Tests issue with examples and nested objects with items properties", "version": "1.0" }, "host": "FooBar", "basePath": "/latest", "schemes": [ "https" ], "produces": [ "application/json" ], "paths": { "/foo/": { "get": { "description": "Tests issue with nested items object properties and examples", "summary": "Tests issue with nested items object properties and examples", "responses": { "200": { "description": "Example should match spec", "examples": { "application/json": [ { "item": [ { "id": 1 } ] } ] }, "schema": { "type": "array", "items": { "type": "object", "properties": { "item": { "type": "array", "maxItems": 255, "items": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" } } } } } } } } } } } } } validate-0.24.0/fixtures/validation/fixture-581-good-numbers.yaml000066400000000000000000000035711457312750000246670ustar00rootroot00000000000000--- swagger: '2.0' info: title: 'fixture for issue #581' version: '1.0' description: | This one just to set a minimum/maximum valid case for non regression. It exersises, for numbers: - inline parameters - schema parameters - schema parameters through $ref - schema for response - schema object for response, with object and array - schema for response through $ref produces: - application/json paths: /fixture: get: operationId: op1 parameters: - name: myid in: body schema: $ref: '#/definitions/myId' responses: 200: description: 'response exercising number boundaries' schema: $ref: '#/definitions/someIds' 201: description: 'response exercising number boundaries' schema: type: number minimum: 0 maximum: 100 default: 0 401: description: 'response exercising number boundaries' schema: type: object properties: shortInt: type: number minimum: 0 maximum: 100 default: 0 shortIntList: type: array items: type: number minimum: 0 maximum: 100 default: 0 definitions: myId: type: object properties: smallId: type: number minimum: 0 maximum: 12 default: 10 format: uint64 someIds: type: object properties: smallId: type: number minimum: 0 maximum: 12 default: 10 format: uint64 smallIdList: type: array items: type: number minimum: 0 maximum: 100 default: 0 validate-0.24.0/fixtures/validation/fixture-581-good.yaml000066400000000000000000000036031457312750000232120ustar00rootroot00000000000000--- swagger: '2.0' info: title: 'fixture for issue #581' version: '1.0' description: | This one just to set a minimum/maximum valid case for non regression. It exersises, for integers: - inline parameters - schema parameters - schema parameters through $ref - schema for response - schema object for response, with object and array - schema for response through $ref produces: - application/json paths: /fixture: get: operationId: op1 parameters: - name: myid in: body schema: $ref: '#/definitions/myId' responses: 200: description: 'response exercising integer boundaries' schema: $ref: '#/definitions/someIds' 201: description: 'response exercising integer boundaries' schema: type: integer minimum: 0 maximum: 100 default: 0 401: description: 'response exercising integer boundaries' schema: type: object properties: shortInt: type: integer minimum: 0 maximum: 100 default: 0 shortIntList: type: array items: type: integer minimum: 0 maximum: 100 default: 0 definitions: myId: type: object properties: smallId: type: integer minimum: 0 maximum: 12 default: 10 format: uint64 someIds: type: object properties: smallId: type: integer minimum: 0 maximum: 12 default: 10 format: uint64 smallIdList: type: array items: type: integer minimum: 0 maximum: 100 default: 0 validate-0.24.0/fixtures/validation/fixture-581-inline-param-format.yaml000066400000000000000000000066611457312750000261330ustar00rootroot00000000000000--- swagger: '2.0' info: title: 'fixture for issue #581' version: '1.0' description: | Exercise boundary checks for minimum, maximum and multipleOf For integer parameters with formats int32, uint32 or uint64 - inline - schema objects, with nested array - via $refs produces: - application/json paths: /fixture: get: operationId: op1 parameters: - name: myid in: query schema: $ref: '#/definitions/myId' - name: inlineMaxInt in: query type: integer format: uint64 # Error: boundary inconsistent with format minimum: -100 # Error: Out of bound maximum maximum: 922337203685477580700000000000000000 default: 99 - name: inlineMinInt in: query type: integer format: uint32 # Error: Out of bound minimum minimum: -1 # Error: Out of bound maximum maximum: 4294967296 default: 99 - name: inlineInfiniteInt in: query type: integer format: uint32 minimum: 0 maximum: 2000000 # Errors: invalid default #default: -10000000000000000000000000000000000000000000000000 default: -922 # TODO: not validated since no default value!!! - name: inlineInfiniteInt2 in: query type: integer format: uint32 minimum: 0 maximum: 2000000 # Errors: invalid default default: -4294967296 # TODO: not validated since no default value!!! - name: bigInt in: query type: integer format: int32 # Error: Out of bound factor multipleOf: 4294967296 - name: negFactor in: query type: integer # Allows signed format format: int32 # Error: negative factor (consistent with format) multipleOf: -300 default: -600 - name: negFactor2 in: query type: integer # Allows signed format format: uint32 # Error: consistent with format multipleOf: 3 # Error: fails constraint, but consistent with format default: 2 - name: negFactor3 in: query type: integer # Allows signed format format: uint32 # Error: consistent with format multipleOf: 3 # Error: successful constraint, but inconsistent with format default: -6 responses: 200: responses: 200: description: 'response exercising integer boundaries' schema: $ref: '#/definitions/someIds' definitions: myId: type: object properties: uint8: type: integer minimum: 0 maximum: 255 # Error: default does not validate against boundaries default: 256 int64: type: integer minimum: -9223372036854775808 maximum: 9223372036854775807000 uint64: type: integer minimum: -9223372036854775807000 maximum: 0 # See if detected? default: 1 uint64-wrong: type: integer minimum: 0 maximum: 18446744073709551616 someIds: type: object properties: smallId: type: integer minimum: 0 maximum: 12 validate-0.24.0/fixtures/validation/fixture-581-inline-param.yaml000066400000000000000000000050411457312750000246340ustar00rootroot00000000000000--- swagger: '2.0' info: title: 'fixture for issue #581' version: '1.0' description: | Exercise boundary checks for minimum, maximum and multipleOf For integer parameters (as default int64): - inline - schema objects, with nested array - via $refs produces: - application/json paths: /fixture: get: operationId: op1 parameters: - name: myid in: query schema: $ref: '#/definitions/myId' - name: inlineMaxInt in: query type: integer minimum: 0 #maximum: 100 # Error: Out of bound maximum maximum: 922337203685477580700000000000000000 default: 99 - name: inlineMinInt in: query type: integer minimum: -9223372036854775807000000000000000 # Error: Out of bound minimum maximum: 1 default: 99 - name: inlineInfiniteInt in: query type: integer # Errors: Out of bound minimum and maximum minimum: -92233720368547758070000000000000000000000 maximum: 92233720368547758070000000000000000 default: 99 - name: bigInt in: query type: integer # TODO: not validated since no default value!!! # Error: Out of bound factor multipleOf: 3922337203685477580700000000000000000000000 # ISSUE: does use native method => use number - name: negFactor in: query type: integer # Error: negative factor multipleOf: -300 default: -600 responses: 200: responses: 200: description: 'response exercising integer boundaries' schema: # TODO: should validate here too $ref: '#/definitions/someIds' # TODO: should validate here too definitions: myId: type: object properties: uint8: type: integer minimum: 0 maximum: 255 # Error: default does not validate against boundaries default: 256 int64: type: integer minimum: -9223372036854775808 maximum: 9223372036854775807000 uint64: type: integer minimum: -9223372036854775807000 maximum: 0 # See if detected? default: 1 uint64-wrong: type: integer minimum: 0 maximum: 18446744073709551616 someIds: type: object properties: smallId: type: integer minimum: 0 maximum: 12 validate-0.24.0/fixtures/validation/fixture-581.yaml000066400000000000000000000023601457312750000222630ustar00rootroot00000000000000--- swagger: '2.0' info: title: 'fixture for issue #581' version: '1.0' description: | test verification of overflow on min/max boundary reproduces the initial reported case,with schema and $refs produces: - application/json paths: /fixture: get: operationId: op1 parameters: - name: myid in: query schema: $ref: '#/definitions/myId' responses: 200: description: 'response exercising integer boundaries' schema: $ref: '#/definitions/someIds' definitions: myId: type: object properties: uint8: type: integer minimum: 0 maximum: 255 # Error: default does not validate against boundaries default: 256 int64: type: integer minimum: -9223372036854775808 # Error: maximum is not an int64 maximum: 9223372036854775807000 uint64: type: integer minimum: -9223372036854775807000 maximum: 18446744073709551615 uint64-wrong: type: integer minimum: 0 maximum: 18446744073709551616 someIds: type: object properties: smallId: type: integer minimum: 0 maximum: 12 validate-0.24.0/fixtures/validation/fixture-859-2.yaml000066400000000000000000000025611457312750000224350ustar00rootroot00000000000000--- swagger: "2.0" info: version: "0.1.0" title: issue#859. Reference validation description: more exercising on $ref recursion,default response,items paths: /: post: parameters: - $ref: "#/parameters/rateLimit" responses: 200: description: "Success" get: parameters: - name: myparam in: body schema: $ref: '#/definitions/myparam' responses: default: description: the record schema: $ref: "#/definitions/record" 404: $ref: "#/responses/notFound" 200: description: "Success" schema: $ref: "#definitions/myoutput" 201: description: "Success" schema: $ref: "#definitions/myoutput" parameters: rateLimit: name: X-Rate-Limit in: header type: integer format: int32 responses: notFound: description: Not found schema: $ref: "#/definitions/record" definitions: record: type: object properties: createdAt: type: string format: date-time myparam: type: array items: $ref: "#/definitions/myitems" myoutput: type: array items: # Error: unresolved $ref: "#/definitions/myitem" myitems: type: object properties: ident: type: string validate-0.24.0/fixtures/validation/fixture-859-good.yaml000066400000000000000000000017741457312750000232310ustar00rootroot00000000000000--- swagger: "2.0" info: version: "0.1.0" title: issue#859. Reference validation paths: /: post: parameters: - $ref: "#/parameters/rateLimit" responses: 200: description: "Success" get: parameters: - name: myparam in: body schema: $ref: '#/definitions/myparam' responses: default: description: the record schema: $ref: "#/definitions/record" 404: $ref: "#/responses/notFound" 200: description: "Success" schema: $ref: "#definitions/myoutput" parameters: rateLimit: name: X-Rate-Limit in: header type: integer format: int32 responses: notFound: description: Not found schema: $ref: "#/definitions/record" definitions: record: type: object properties: createdAt: type: string format: date-time myparam: type: string myoutput: type: string validate-0.24.0/fixtures/validation/fixture-859.yaml000066400000000000000000000025661457312750000223030ustar00rootroot00000000000000--- swagger: "2.0" info: version: "0.1.0" title: issue#859. Reference validation paths: /: post: parameters: # error - $ref: "#/parameters/rateLimit" - name: myparam in: query type: string responses: 200: description: "Success" get: parameters: - $ref: "#/parameters/rateLimit" # <-- error: mispelled reference cannot resolve - name: myparam in: query schema: $ref: '#/definitions/myparam' # <- error : mispelled reference cannot resolve responses: default: description: the record schema: $ref: "#/definitions/record" # <- error : mispelled reference cannot resolve 404: $ref: "#/responses/notFound" 200: description: "Success" schema: $ref: "#definitions/myoutput" # <- error : mispelled reference cannot resolve parameters: rateLimits: name: X-Rate-Limit in: header type: integer format: int32 responses: notFound: description: Not found schema: $ref: "#/definitions/record" # <- error : mispelled reference cannot resolve definitions: records: type: object properties: createdAt: type: string format: date-time myparams: type: string myoutputs: type: string validate-0.24.0/fixtures/validation/fixture-additional-items-2.yaml000066400000000000000000000055671457312750000253500ustar00rootroot00000000000000swagger: '2.0' info: title: additionalItems-2 version: '1.0' description: 'this spec exercise the additionalItems property on params and responses, with default and example values. This one is invalid.' license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /servers/getGood: get: operationId: getGoodOp parameters: - name: addItems in: body schema: type: array # Unsupported keyword additionalItems: false items: # inline schema - type: object properties: first: type: string # ref simple schema - $ref: '#/definitions/itemsSchema0' # ref multiple complex schemas - $ref: '#/definitions/itemsSchema1' - $ref: '#/definitions/itemsSchema2' - $ref: '#/definitions/itemsSchema3' default: - first: 'Default string' #<-- validates inline schema - 'Default string' #<-- validates scheme0 - x: 'a' #<-- validates schema1 c: 1 - z: 1 #<-- validate schema2 example: - first: 'Default string' #<-- validates inline schema - 'A string' #<-- validates scheme0 - x: 'a' #<-- validates schema1 c: 1 - z: 1 responses: 200: description: 'ok' definitions: itemsSchema0: type: string itemsSchema1: type: object required: - x - c properties: x: type: string enum: - 'a' - 'b' - 'c' default: 'a' example: 'b' c: type: number default: 1 example: 9 example: x: 'c' c: 12 itemsSchema2: type: object required: - z properties: z: type: number default: 1 example: 9 example: z: 12 itemsSchema3: type: array items: type: array items: type: object properties: a: type: string default: 'a' example: 'A' b: type: string default: 'b' example: 'B' required: [ a, b ] default: a: 'x' b: 'y' example: a: 'u' b: 'v' default: - a: 'u' b: 'v' example: - a: 'u' b: 'v' default: - - a: 'a' - b: 'b' - - a: 'c' - b: 'd' example: - - a: 'a' - b: 'b' - - a: 'c' - b: 'd' validate-0.24.0/fixtures/validation/fixture-additional-items-3.yaml000066400000000000000000000121101457312750000253270ustar00rootroot00000000000000swagger: '2.0' info: title: additionalItems-3 version: '1.0' description: 'this spec exercise the additionalItems property on params and responses, with default and example values. This one is invalid.' license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /servers/getGood: get: operationId: getGoodOp parameters: - name: addItems in: query type: string responses: 200: description: 'ok' schema: type: array # Unsupported keyword additionalItems: type: object properties: v: string items: # inline schema - type: object properties: first: type: string # ref simple schema - $ref: '#/definitions/itemsSchema0' # ref multiple complex schemas - $ref: '#/definitions/itemsSchema1' - $ref: '#/definitions/itemsSchema2' - $ref: '#/definitions/itemsSchema3' default: - first: 'Default string' #<-- validates inline schema - 'Default string' #<-- validates scheme0 - x: 'a' #<-- validates schema1 c: 1 - z: 1 #<-- validate schema2 example: - first: 'Default string' #<-- validates inline schema - 'A string' #<-- validates scheme0 - x: 'a' #<-- validates schema1 c: 1 - z: 1 examples: application/json: - first: 'Default string' #<-- validates inline schema - 'A string' #<-- validates scheme0 - x: 'a' #<-- validates schema1 c: 1 - z: 1 - - - a: 'a' - b: 'b' - - a: 'c' - b: 'd' /servers/edgeCase: get: operationId: getEdgeOp parameters: - name: addItems in: query type: string responses: 200: description: 'ok' schema: type: array # unsupported additionalItems: type: array items: type: array items: type: string items: - type: array additionalItems: type: string items: - type: integer format: int32 - type: string - type: integer default: - 1 - 'ABC' - 32 - 'ABC' example: - 1 - 'ABC' - 32 - 'ABC' - 'DEF' default: - - 1 - 'ABC' - 32 - 'ABC' - - - 'ABC' - - 'ABCD' - - 'ABCDE' example: - - 1 - 'ABC' - 32 - - - 'ABC' - - 'ABCD' - - 'ABCDE' examples: application/json: - - 1 - 'ABC' - 32 - 'XYZ' - - - 'ABC' - - 'ABCD' - - 'ABCDE' definitions: itemsSchema0: type: string itemsSchema1: type: object required: - x - c properties: x: type: string enum: - 'a' - 'b' - 'c' default: 'a' example: 'b' c: type: number default: 1 example: 9 example: x: 'c' c: 12 itemsSchema2: type: object required: - z properties: z: type: number default: 1 example: 9 example: z: 12 itemsSchema3: type: array items: type: array items: type: object properties: a: type: string default: 'a' example: 'A' b: type: string default: 'b' example: 'B' required: [ a, b ] default: a: 'x' b: 'y' example: a: 'u' b: 'v' default: - a: 'u' b: 'v' example: - a: 'u' b: 'v' default: - - a: 'a' - b: 'b' - - a: 'c' - b: 'd' example: - - a: 'a' - b: 'b' - - a: 'c' - b: 'd' validate-0.24.0/fixtures/validation/fixture-additional-items-invalid-values.yaml000066400000000000000000000205511457312750000301200ustar00rootroot00000000000000swagger: '2.0' info: title: additionalItems version: '1.0' description: 'this spec exercise the additionalItems property on params and responses, with default and example values. This one is valid.' license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /servers/getBad1: get: operationId: getGoodOp parameters: - name: addItems in: body schema: type: array # Unsupported keyword #additionalItems: false items: # inline schema - type: object properties: first: type: string # ref simple schema - $ref: '#/definitions/itemsSchema0' # ref multiple complex schemas - $ref: '#/definitions/itemsSchema1' - $ref: '#/definitions/itemsSchema2' - $ref: '#/definitions/itemsSchema3' default: - first: [ 'A' , 'B' ] #<-- error - 'Default string' #<-- validates scheme0 - x: 1 #<-- error c: 'ABC' #<-- error - z: x #<-- error example: - first: 2 #<-- error - 'A string' #<-- validates scheme0 - c: 1 #x: 'a' #<-- error - z: true #<-- error responses: default: schema: type: array # Unsupported keyword #additionalItems: false items: # inline schema - type: object properties: first: type: string # ref simple schema - $ref: '#/definitions/itemsSchema0' # ref multiple complex schemas - $ref: '#/definitions/itemsSchema1' - $ref: '#/definitions/itemsSchema2' - $ref: '#/definitions/itemsSchema3' default: - first: [ 'A' , 'B' ] #<-- error - 'Default string' #<-- validates scheme0 - x: 1 #<-- error c: 'ABC' #<-- error - z: x #<-- error example: - first: 2 #<-- error - 'A string' #<-- validates scheme0 - c: 1 #x: 'a' #<-- error - z: true #<-- error examples: application/json: - first: 2 #<-- error - 'A string' #<-- validates scheme0 - c: 1 #x: 'a' #<-- error - z: true #<-- error 200: description: 'ok' schema: type: array # Unsupported keyword #additionalItems: false items: # inline schema - type: object properties: first: type: string # ref simple schema - $ref: '#/definitions/itemsSchema0' # ref multiple complex schemas - $ref: '#/definitions/itemsSchema1' - $ref: '#/definitions/itemsSchema2' - $ref: '#/definitions/itemsSchema3' default: - first: [ 'A' , 'B' ] #<-- error - 'Default string' #<-- validates scheme0 - x: 1 #<-- error c: 'ABC' #<-- error - z: x #<-- error example: - first: 2 #<-- error - 'A string' #<-- validates scheme0 - c: 1 #x: 'a' #<-- error - z: true #<-- error examples: application/json: - first: 2 #<-- error - 'A string' #<-- validates scheme0 - c: 1 #x: 'a' #<-- error - z: true #<-- error /servers/getBad2: get: operationId: getGoodOp2 parameters: - name: addItems in: body schema: type: array # Unsupported keyword #additionalItems: false items: # inline schema - type: object properties: first: type: string # ref simple schema - $ref: '#/definitions/itemsSchema0' # ref multiple complex schemas - $ref: '#/definitions/itemsSchema1' - $ref: '#/definitions/itemsSchema2' - $ref: '#/definitions/itemsSchema3' default: - first: 'Default string' #<-- validates inline schema - 'Default string' #<-- validates scheme0 - x: 'a' #<-- validates schema1 c: 1 - z: 1 #<-- validate schema2 example: - first: 'Default string' #<-- validates inline schema - 'A string' #<-- validates scheme0 - x: 'a' #<-- validates schema1 c: 1 - z: 1 responses: 200: description: 'ok' /servers/getBad3: get: operationId: getGoodOp3 parameters: - name: addItems in: body schema: type: array # Unsupported keyword #additionalItems: false items: # inline schema - type: object properties: first: type: string # ref simple schema - $ref: '#/definitions/itemsSchema0' # ref multiple complex schemas - $ref: '#/definitions/itemsSchema1' - $ref: '#/definitions/itemsSchema2' - $ref: '#/definitions/itemsSchema3' default: - first: 'Default string' #<-- validates inline schema - 'Default string' #<-- validates scheme0 - x: 'a' #<-- validates schema1 c: 1 - z: 1 #<-- validate schema2 example: - first: 'Default string' #<-- validates inline schema - 'A string' #<-- validates scheme0 - x: 'a' #<-- validates schema1 c: 1 - z: 1 responses: 200: description: 'ok' definitions: itemsSchema0: type: string itemsSchema1: type: object required: - x - c properties: x: type: string enum: - 'a' - 'b' - 'c' default: 'a' example: 'b' c: type: number default: 1 example: 9 example: x: 'c' c: 12 itemsSchema2: type: object required: - z properties: z: type: number default: 1 example: 9 example: z: 12 itemsSchema3: type: array items: type: array items: type: object properties: a: type: string default: 'a' example: 'A' b: type: string default: 'b' example: 'B' required: [ a, b ] default: a: 'x' b: 'y' example: a: 'u' b: 'v' default: - a: 'u' #b: 'v' #<-- error example: - a: 'u' b: 'v' default: - - a: 'a' - b: 'b' - - a: 'c' - b: 'd' example: - #- a: 'a' #<-- error - b: 'b' - - a: 'c' - b: 'd' validate-0.24.0/fixtures/validation/fixture-additional-items.orig000066400000000000000000000047371457312750000252050ustar00rootroot00000000000000swagger: '2.0' info: title: additionalItems version: '1.0' description: this spec exercise the additionalItems property on params and responses, with default and example values. This one is valid. license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /servers/getSomeIds: get: operationId: getSomeIdsOps parameters: - name: addItems1 in: body schema: type: object # Irrelevant: success #additionalItems: true properties: id: type: string default: 'abc' example: 'def' - name: addItems2 in: query schema: type: array # Irrelevant: success #additionalItems: false items: id: type: string default: 'abc' example: 'def' - name: addItems3 in: query schema: type: array # Irrelevant: success #additionalItems: false items: id: type: number default: 1 example: 123 - name: addItems4 in: query schema: type: array # Applies: success #additionalItems: false #minItems: 1 #maxItems: 2 #uniqueItems: true items: - $ref: '#/definitions/itemsSchema1' - $ref: '#/definitions/itemsSchema2' - $ref: '#/definitions/itemsSchema3' default: - x: 'a' y: 1 - t: 1 example: - x: 'a' y: 1 - z: 1 responses: '200': definitions: itemsSchema1: type: object required: - x - y properties: x: type: string enum: - 'a' - 'b' - 'c' default: 'a' example: 'b' y: type: number default: 1 example: 9 example: x: 'c' y: 12 itemsSchema2: type: object required: - z properties: z: type: number default: 1 example: 9 example: z: 12 itemsSchema3: type: object required: - t properties: t: type: number default: 1 example: 9 example: t: 12 validate-0.24.0/fixtures/validation/fixture-additional-items.yaml000066400000000000000000000055641457312750000252060ustar00rootroot00000000000000swagger: '2.0' info: title: additionalItems version: '1.0' description: 'this spec exercise the additionalItems property on params and responses, with default and example values. This one is valid.' license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /servers/getGood: get: operationId: getGoodOp parameters: - name: addItems in: body schema: type: array # Unsupported keyword #additionalItems: false items: # inline schema - type: object properties: first: type: string # ref simple schema - $ref: '#/definitions/itemsSchema0' # ref multiple complex schemas - $ref: '#/definitions/itemsSchema1' - $ref: '#/definitions/itemsSchema2' - $ref: '#/definitions/itemsSchema3' default: - first: 'Default string' #<-- validates inline schema - 'Default string' #<-- validates scheme0 - x: 'a' #<-- validates schema1 c: 1 - z: 1 #<-- validate schema2 example: - first: 'Default string' #<-- validates inline schema - 'A string' #<-- validates scheme0 - x: 'a' #<-- validates schema1 c: 1 - z: 1 responses: 200: description: 'ok' definitions: itemsSchema0: type: string itemsSchema1: type: object required: - x - c properties: x: type: string enum: - 'a' - 'b' - 'c' default: 'a' example: 'b' c: type: number default: 1 example: 9 example: x: 'c' c: 12 itemsSchema2: type: object required: - z properties: z: type: number default: 1 example: 9 example: z: 12 itemsSchema3: type: array items: type: array items: type: object properties: a: type: string default: 'a' example: 'A' b: type: string default: 'b' example: 'B' required: [ a, b ] default: a: 'x' b: 'y' example: a: 'u' b: 'v' default: - a: 'u' b: 'v' example: - a: 'u' b: 'v' default: - - a: 'a' - b: 'b' - - a: 'c' - b: 'd' example: - - a: 'a' - b: 'b' - - a: 'c' - b: 'd' validate-0.24.0/fixtures/validation/fixture-all-formats.yaml000066400000000000000000000336621457312750000242000ustar00rootroot00000000000000--- swagger: '2.0' info: title: 'fixture to tests formats in parameters, schema objects' version: '1.0' description: | This exercises the type and format validation based on complete spec produces: - application/json paths: /fixture/formats-good: get: operationId: op1 parameters: - name: p01 in: query type: string format: byte default: 'ZWxpemFiZXRocG9zZXk=' - name: p02 in: query type: string format: creditcard default: '4111-1111-1111-1111' - name: p03 in: query type: string format: date default: 1970-01-01 - name: p04 in: query type: string format: date-time default: '1963-06-19T08:30:06.283185Z' - name: p05 in: query type: string format: duration default: '3 weeks' - name: p06 in: query type: string format: email default: 'joe.bloggs@example.com' - name: p07 in: query type: string format: hexcolor default: '#FFFFFF' - name: p08 in: query type: string format: hostname default: 'www.example.com' - name: p09 in: query type: string format: ipv4 default: '192.168.0.1' - name: p10 in: query type: string format: ipv6 default: '::1' - name: p11 in: query type: string format: isbn default: '0321751043' - name: p12 in: query type: string format: isbn10 default: '0321751043' - name: p13 in: query type: string format: isbn13 default: '978 3401013190' - name: p14 in: query type: string format: mac default: '01:02:03:04:05:06' - name: p15 in: query type: string format: bsonobjectid default: '507f1f77bcf86cd799439011' - name: p16 in: query type: string format: password default: 'secret' - name: p17 in: query type: string format: rgbcolor default: 'rgb(100,100,100)' - name: p18 in: query type: string format: ssn default: '111-11-1111' - name: p19 in: query type: string format: uri default: 'http://foo.bar/?baz=qux#quux' - name: p20 in: query type: string format: uuid default: 'a8098c1a-f86e-11da-bd1a-00112444be1e' - name: p21 in: query type: string format: uuid3 default: 'bcd02e22-68f0-3046-a512-327cca9def8f' - name: p22 in: query type: string format: uuid4 default: '025b0d74-00a2-4048-bf57-227c5111bb34' - name: p23 in: query type: string format: uuid5 default: '886313e1-3b8a-5372-9b90-0c9aee199e5d' - name: n01 in: query type: number format: float default: 10.01 - name: n02 in: query type: number format: double default: 100.99 - name: n03 in: query type: integer format: int32 default: -12 - name: n04 in: query type: integer format: int64 default: 20 - name: n05 in: query type: integer format: uint32 default: 20 - name: n06 in: query type: integer format: uint64 default: 30 # TODO: check format aliases responses: 200: description: 'response exercising formats' # TODO: check format in headers schema: $ref: '#/definitions/allformats' /fixture/formats-bad: get: operationId: op2 parameters: - name: p01 in: query type: string format: byte default: 'ZWxpemFiZXRocG9zZXk' - name: p02 in: query type: string format: creditcard default: '4111-1X11-1111-1111' - name: p03 in: query type: string format: date default: 1970-13-01 - name: p04 in: query type: string format: date-time default: '1963-13-19T08:30:06.283185Z' - name: p05 in: query type: string format: duration default: 'three weeks' - name: p06 in: query type: string format: email default: 'joe.bloggs-example.com' - name: p07 in: query type: string format: hexcolor default: 'xFFFFFF' - name: p08 in: query type: string format: hostname default: 'not_a_valid_hostname' - name: p09 in: query type: string format: ipv4 default: '192.168.0.256' - name: p10 in: query type: string format: ipv6 default: 'o::1' - name: p11 in: query type: string format: isbn default: 'abc-0321751043' - name: p12 in: query type: string format: isbn10 default: 'abc-0321751043' - name: p13 in: query type: string format: isbn13 default: '978|3401013190' - name: p14 in: query type: string format: mac default: '01:02:03:04:05:06:07' - name: p15 in: query type: string format: bsonobjectid default: 'x07f1f77bcf86cd799439011' - name: p16 in: query type: string format: password default: 0 - name: p17 in: query type: string format: rgbcolor default: 'rgb(100,100)' - name: p18 in: query type: string format: ssn default: '111-11111' - name: p19 in: query type: string format: uri default: 'httz://foo.bar/?baz=qux#quux' - name: p20 in: query type: string format: uuid default: 'a8098c1a+f86e+11da+bd1a+00112444be1e' - name: p21 in: query type: string format: uuid3 default: 'bcd02e22+68f0+3046+a512+327cca9def8f' - name: p22 in: query type: string format: uuid4 default: '025b0d74+00a2+4048+bf57+227c5111bb34' - name: p23 in: query type: string format: uuid5 default: '886313e1+3b8a+5372+9b90+0c9aee199e5d' - name: n01 in: query type: number format: float default: abc - name: n02 in: query type: number format: double default: 100.99 - name: n03 in: query type: integer format: int32 default: -12.05 - name: n04 in: query type: integer format: int64 default: 20.05 - name: n05 in: query type: integer format: uint32 default: -20 - name: n06 in: query type: integer format: uint64 default: -30 responses: 200: description: 'response exercising formats' schema: $ref: '#/definitions/allformats-bad' /fixture/body: post: operationId: op3 parameters: - name: allformat in: body schema: $ref: '#/definitions/allformats' responses: 200: description: 'response exercising formats' # TODO: check format in headers schema: $ref: '#/definitions/allformats' /fixture/file: post: operationId: op4 consumes: - multipart/form-data parameters: - name: f01 in: formData type: file required: true - name: f02 in: formData type: file required: false responses: 200: description: 'response exercising formats' definitions: allformats: type: object properties: prop01: type: string format: byte default: 'ZWxpemFiZXRocG9zZXk=' prop02: type: string format: creditcard default: '4111-1111-1111-1111' prop03: type: string format: date default: 1970-01-01 prop04: type: string format: date-time default: '1963-06-19T08:30:06.283185Z' prop05: type: string format: duration default: '3 weeks' prop06: type: string format: email default: 'joe.bloggs@example.com' prop07: type: string format: hexcolor default: '#FFFFFF' prop08: type: string format: hostname default: 'www.example.com' prop09: type: string format: ipv4 default: '192.168.0.1' prop10: type: string format: ipv6 default: '::1' prop11: type: string format: isbn default: '0321751043' prop12: type: string format: isbn10 default: '0321751043' prop13: type: string format: isbn13 default: '978 3401013190' prop14: type: string format: mac default: '01:02:03:04:05:06' prop15: type: string format: bsonobjectid default: '507f1f77bcf86cd799439011' prop16: type: string format: password default: 'secret' prop17: type: string format: rgbcolor default: 'rgb(100,100,100)' prop18: type: string format: ssn default: '111-11-1111' prop19: type: string format: uri default: 'http://foo.bar/?baz=qux#quux' prop20: type: string format: uuid default: 'a8098c1a-f86e-11da-bd1a-00112444be1e' prop21: type: string format: uuid3 default: 'bcd02e22-68f0-3046-a512-327cca9def8f' prop22: type: string format: uuid4 default: '025b0d74-00a2-4048-bf57-227c5111bb34' prop23: type: string format: uuid5 default: '886313e1-3b8a-5372-9b90-0c9aee199e5d' propn01: type: number format: float default: 10.01 propn02: type: number format: double default: 100.99 propn03: type: integer format: int32 default: -12 propn04: type: integer format: int64 default: 20 propn05: type: integer format: uint32 default: 20 propn06: type: integer format: uint64 default: 30 allformats-bad: type: object properties: prop01: type: string format: byte default: 'ZWxpemFiZXRocG9zZXk' prop02: type: string format: creditcard default: '4111-1111-1111-111K' prop03: type: string format: date default: 1970-01-32 prop04: type: string format: date-time default: '1963-06-19T99:30:06.283185Z' prop05: type: string format: duration default: 'weeks' prop06: type: string format: email default: 'joe.bloggs-example.com' prop07: type: string format: hexcolor default: 1 prop08: type: string format: hostname default: '---invalid-hostname---' prop09: type: string format: ipv4 default: '192.2.0.1.45' prop10: type: string format: ipv6 default: 'x::1' prop11: type: string format: isbn default: 'X0321751043' prop12: type: string format: isbn10 default: 'X0321751043' prop13: type: string format: isbn13 default: 'X978 3401013190' prop14: type: string format: mac default: 'X1:02:03:04:05:06' prop15: type: string format: bsonobjectid default: 'X507f1f77bcf86cd799439011' prop16: type: string format: password default: 10 prop17: type: string format: rgbcolor default: 'gb(100,100,100)' prop18: type: string format: ssn default: 'Z111-11-1111' prop19: type: string format: uri default: 'xttp://foo.bar/?baz=qux#quux' prop20: type: string format: uuid default: 'a8098c1a+f86e+11da+bd1a+00112444be1e' prop21: type: string format: uuid3 default: 'bcd02e22+68f0+3046+a512+327cca9def8f' prop22: type: string format: uuid4 default: '025b0d74+00a2+4048+bf57+227c5111bb34' prop23: type: string format: uuid5 default: '886313e1+3b8a+5372+9b90+0c9aee199e5d' propn01: type: number format: float default: abc propn02: type: number format: double default: abc propn03: type: integer format: int32 default: -12.05 propn04: type: integer format: int64 default: 20.99 propn05: type: integer format: uint32 default: 20.05 propn06: type: integer format: uint64 default: 30.05 validate-0.24.0/fixtures/validation/fixture-bad-response.yaml000066400000000000000000000011471457312750000243320ustar00rootroot00000000000000--- swagger: '2.0' info: title: checking $ref siblings in response version: '1.0' description: | This one checks that wrong response declaraion with $ref sibling is correcly handled and reported produces: - application/json paths: /fixture: get: operationId: op1 parameters: - name: myid in: body schema: $ref: '#/definitions/myId' responses: 200: description: 'response with $ref sibling' schema: $ref: '#/definitions/someIds' definitions: myId: type: string someIds: type: integer validate-0.24.0/fixtures/validation/fixture-collisions.yaml000066400000000000000000000072731457312750000241340ustar00rootroot00000000000000--- swagger: "2.0" info: title: "Spec with many duplicate things" description: | Check the following rules: - params in path are unique - no more than one param in body - paths stripped from params are unique - operationId is Unique - params in operation are unique version: "20170115" basePath: /20170115 paths: # Error: path params not unique /loadBalancers/{loadBalancerId}/backendSets/{loadBalancerId}/get: get: description: Lists all backend sets associated with a given load balancer. operationId: ope1 parameters: - name: loadBalancerId in: path type: string required: true produces: - "application/json" responses: 200: description: The list is being retrieved. headers: opc-response-id: description: | Unique identifier for the response. type: string # Error more than 1 param in body /bigbody/get: get: description: Lists all backend sets associated with a given load balancer. operationId: ope2 parameters: - name: loadBalancerId2 in: body type: string required: true - name: loadBalancerId3 in: body type: string required: true produces: - "application/json" responses: 200: # Error duplicate path /duplpath/{id1}/get: get: description: Lists all backend sets associated with a given load balancer. operationId: ope3 parameters: - name: id1 in: path type: string required: true produces: - "application/json" responses: 200: /duplpath/{id2}/get: get: operationId: ope4 parameters: - name: id2 in: path type: string required: true produces: - "application/json" responses: 200: # Error duplicate operationId (paths are different) /duplope/{id1}/get: get: description: Lists all backend sets associated with a given load balancer (dupl). operationId: ope5 parameters: - name: id1 in: path type: string required: true produces: - "application/json" responses: 200: /duplope/{id2}/getThemAll: get: description: Lists all backend sets associated with a given load balancer (dupl). operationId: ope5 parameters: - name: id2 in: path type: string required: true produces: - "application/json" responses: 200: # Error duplicate operationId (same path, different methods) /duplope2/{id1}/get: get: description: Lists all backend sets associated with a given load balancer (dupl). operationId: ope6 parameters: - name: id1 in: path type: string required: true produces: - "application/json" responses: 200: post: description: Lists all backend sets associated with a given load balancer (dupl). operationId: ope6 parameters: - name: id1 in: path type: string required: true produces: - "application/json" responses: 200: # Error : duplicate params /dupparam/get: get: description: Lists all backend sets associated with a given load balancer (dupl). operationId: ope7 parameters: - name: id2 in: query type: string - name: id2 in: query type: string produces: - "application/json" responses: 200: validate-0.24.0/fixtures/validation/fixture-constraints-on-numbers.yaml000066400000000000000000000054711457312750000264060ustar00rootroot00000000000000--- swagger: '2.0' info: title: 'fixture for issue #581' version: '1.0' description: | Exercise boundary checks for minimum, maximum and multipleOf This provides supplementary test cases not tested in the fixture-581 series - multipleOf - maximum with native type check - minimum with native type check produces: - application/json paths: /fixture: get: operationId: op1 parameters: # MultipleOf value not compatible with format # => still performs default value check as float64, and fails - name: param1 in: query type: integer format: int32 # maxInt32+1 multipleOf: 2147483648 default: 99 # => still performs default value check as float64, and succeeds - name: param2 in: query type: integer format: int32 # maxInt32+1 multipleOf: 2147483648 default: 4294967296 # MultipleOf. Default value not compatible with format # => still performs default value check as float64, and fails - name: param3 in: query type: integer format: int32 multipleOf: 10 default: 2147483648 # MultipleOf. Default value not compatible with format # => still performs default value check as float64, and succeeds - name: param4 in: query type: integer format: int32 multipleOf: 2 default: 2147483648 # Maximum. Default value not compatible with format # => still performs default value check as float64, and fails - name: param5 in: query type: integer format: int32 # maxInt32 maximum: 2147483647 # maxInt32+1 default: 2147483648 # Maximum. Default value not compatible with format # => still performs default value check as float64, and succeeds - name: param6 in: query type: integer format: uint32 # maxInt32 maximum: 2147483647 # maxInt32+1 default: -1 # Minimum. Default value not compatible with format # => still performs default value check as float64, and succeeds - name: param7 in: query type: integer format: int32 # maxInt32 minimum: 2147483647 # maxInt32+1 default: 2147483648 # Minimum. Default value not compatible with format # => still performs default value check as float64, and fails - name: param8 in: query type: integer format: uint32 # maxInt32 minimum: 2147483647 # maxInt32+1 default: -1 responses: 200: validate-0.24.0/fixtures/validation/fixture-empty-paths.json000066400000000000000000000007031457312750000242270ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "", "version": "1.0.0", "title": "issue#161", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": {} } validate-0.24.0/fixtures/validation/fixture-invalid-example-property.yaml000066400000000000000000000010011457312750000266760ustar00rootroot00000000000000swagger: '2.0' info: title: issue-1231 version: '1.0' license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /servers/getSomeIds: get: operationId: getSomeIdsOps parameters: - name: getSomeIds in: body schema: type: object properties: id: type: number example: ABC responses: '200': validate-0.24.0/fixtures/validation/fixture-items-items.yaml000066400000000000000000000064611457312750000242140ustar00rootroot00000000000000swagger: '2.0' info: title: items of items in simple schema version: '1.0' description: i describe license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /servers/getGood: get: operationId: getGoodOp parameters: - name: addItems in: body schema: type: array # Unsupported keyword #additionalItems: false items: # inline schema - type: object properties: first: type: string # ref simple schema - $ref: '#/definitions/itemsSchema0' # ref multiple complex schemas - $ref: '#/definitions/itemsSchema1' - $ref: '#/definitions/itemsSchema2' - $ref: '#/definitions/itemsSchema3' default: - first: 'Default string' #<-- validates inline schema - 'Default string' #<-- validates scheme0 - x: 'a' #<-- validates schema1 c: 1 - z: 1 #<-- validate schema2 example: - first: 'Default string' #<-- validates inline schema - 'A string' #<-- validates scheme0 - x: 'a' #<-- validates schema1 c: 1 - z: 1 responses: 200: description: 'ok' /servers/getUp/{soSimple}: get: operationId: getOnTheGoodFoot parameters: - name: soSimple in: path type: array required: true items: type: array items: type: integer default: - 1 - 2 #example: #- 1 #- 2 default: - - 1 - 2 - - 1 - 2 responses: 200: description: 'ok' definitions: itemsSchema0: type: string itemsSchema1: type: object required: - x - c properties: x: type: string enum: - 'a' - 'b' - 'c' default: 'a' example: 'b' c: type: number default: 1 example: 9 example: x: 'c' c: 12 itemsSchema2: type: object required: - z properties: z: type: number default: 1 example: 9 example: z: 12 itemsSchema3: type: array items: type: array items: type: object properties: a: type: string default: 'a' example: 'A' b: type: string default: 'b' example: 'B' required: [ a, b ] default: a: 'x' b: 'y' example: a: 'u' b: 'v' default: - a: 'u' b: 'v' example: - a: 'u' b: 'v' default: - - a: 'a' - b: 'b' - - a: 'c' - b: 'd' example: - - a: 'a' - b: 'b' - - a: 'c' - b: 'd' validate-0.24.0/fixtures/validation/fixture-no-json-example.yaml000066400000000000000000000062701457312750000247660ustar00rootroot00000000000000swagger: '2.0' info: title: additionalItems version: '1.0' description: 'this spec exercise the additionalItems property on params and responses, with default and example values. This one is valid.' license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /servers/getGood: get: operationId: getGoodOp parameters: - name: addItems in: body schema: type: array # Unsupported keyword #additionalItems: false items: # inline schema - type: object properties: first: type: string # ref simple schema - $ref: '#/definitions/itemsSchema0' # ref multiple complex schemas - $ref: '#/definitions/itemsSchema1' - $ref: '#/definitions/itemsSchema2' - $ref: '#/definitions/itemsSchema3' default: - first: 'Default string' #<-- validates inline schema - 'Default string' #<-- validates scheme0 - x: 'a' #<-- validates schema1 c: 1 - z: 1 #<-- validate schema2 example: - first: 'Default string' #<-- validates inline schema - 'A string' #<-- validates scheme0 - x: 'a' #<-- validates schema1 c: 1 - z: 1 responses: default: description: 'default' schema: type: string examples: #<-- warning application/xml: a: "" 200: description: 'ok' examples: #<-- warning examples without schema application/json: - 'A' - 'B' definitions: itemsSchema0: type: string itemsSchema1: type: object required: - x - c properties: x: type: string enum: - 'a' - 'b' - 'c' default: 'a' example: 'b' c: type: number default: 1 example: 9 example: x: 'c' c: 12 itemsSchema2: type: object required: - z properties: z: type: number default: 1 example: 9 example: z: 12 itemsSchema3: type: array items: type: array items: type: object properties: a: type: string default: 'a' example: 'A' b: type: string default: 'b' example: 'B' required: [ a, b ] default: a: 'x' b: 'y' example: a: 'u' b: 'v' default: - a: 'u' b: 'v' example: - a: 'u' b: 'v' default: - - a: 'a' - b: 'b' - - a: 'c' - b: 'd' example: - - a: 'a' - b: 'b' - - a: 'c' - b: 'd' validate-0.24.0/fixtures/validation/fixture-no-response.yaml000066400000000000000000000012311457312750000242120ustar00rootroot00000000000000--- swagger: "2.0" info: title: "Load Balancing Service API" description: API for the Load Balancing Service version: "20170115" basePath: /20170115 paths: /loadBalancers/{loadBalancerId}/backendSets: get: summary: "ListBackendSets" tags: ['loadBalancer'] description: Lists all backend sets associated with a given load balancer. operationId: "ListBackendSets" # fixed that: Missing parameter in path parameters: - name: loadBalancerId in: path type: string # fixed that: should be required required: true produces: - "application/json" responses: validate-0.24.0/fixtures/validation/fixture-patternProperties.json000066400000000000000000000072561457312750000255200ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "badtags": { "type": "array", "items": { "$ref": "#/definitions/TagWrong" } }, "invalidDefault": { "$ref": "#/definitions/TagInvalidDefault" }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "patternProperties": { "nb-.*": { "type": "integer", "format": "int64", "default": 20 } } }, "TagInvalidDefault": { "type": "object", "description": "An object with default value not matching pattern properties", "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "patternProperties": { "nb-.*": { "type": "integer", "format": "int64" } }, "default" : { "id": "myid", "name": "myname", "nb-1": "a string", "nb-2": "10" } }, "TagWrong": { "type": "object", "description": "An object with with a bad regexp in pattern properties", "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "patternProperties": { "nb-.*": { "type": "integer", "format": "int64", "default": 20 } } } } } validate-0.24.0/fixtures/validation/fixture-valid-example-property.yaml000066400000000000000000000010011457312750000263470ustar00rootroot00000000000000swagger: '2.0' info: title: issue-1231 version: '1.0' license: name: MIT host: localhost:8081 basePath: /api/v1 schemes: - http consumes: - application/json produces: - application/json paths: /servers/getSomeIds: get: operationId: getSomeIdsOps parameters: - name: getSomeIds in: body schema: type: object properties: id: type: number example: 123 responses: '200': validate-0.24.0/fixtures/validation/gentest.yaml000066400000000000000000000371161457312750000217420ustar00rootroot00000000000000swagger: '2.0' info: title: code generation test fixture for parameters, with default values version: '1.0.0' host: localhost basePath: / consumes: - application/json produces: - application/json schemes: - http paths: /required/params: get: operationId: getRequired parameters: - name: notAnOption1 in: query type: string format: date required: true - name: notAnOption2 in: query type: string format: password pattern: '^[a-z]$' required: true - name: notAnOption3 in: query type: integer format: int32 required: true - name: notAnOption4 in: query type: integer format: int32 required: true minimum: 10 maximum: 100 multipleOf: 10 - name: notAnOption5 in: query type: array required: true maxItems: 2 items: type: string format: uuid - name: notAnOption6 in: query type: array collectionFormat: pipes required: true uniqueItems: true items: type: integer format: int32 minimum: 10 maximum: 100 multipleOf: 10 - name: notAnOption7 in: query type: array collectionFormat: pipes required: true uniqueItems: false items: type: array collectionFormat: csv uniqueItems: true items: type: string format: date responses: &stdResponses 200: description: simple type schema: type: string format: date 201: description: simple type schema: type: string format: uuid default: description: schema type schema: $ref: '#/definitions/ContainerConfig' /optional/params: get: operationId: getOptional parameters: - name: sanityCheck1 in: query type: string required: false default: sanity check one passed for primitive type - name: sanityCheck2 in: query type: number required: false default: 99.9 - name: sanityCheck3 in: query type: integer required: false default: 1000 - name: sanityCheck4 in: query type: integer format: uint32 required: false default: 100 - name: sanityCheckFormat1 in: query type: string format: uuid required: false default: a8098c1a-f86e-11da-bd1a-00112444be1e - name: isAnOption1 in: query type: string format: date required: false default: '1970-01-01' - name: isAnOption2 in: query type: string format: password pattern: '^[a-z]$' required: false default: z - name: isAnOption3 in: query type: integer format: int32 required: false default: 32 - name: isAnOption4 in: query type: integer format: int32 required: false minimum: 10 maximum: 100 multipleOf: 10 default: 60 - name: isAnOption5 in: query type: array maxItems: 2 items: type: string format: uuid default: - a8098c1a-f86e-11da-bd1a-00112444be1e - name: isAnOption6 in: query type: array collectionFormat: pipes required: false items: type: integer format: int32 minimum: 10 maximum: 100 multipleOf: 10 default: - 10 - 20 - 30 - 40 - name: isAnOption7 in: query type: array collectionFormat: pipes required: false items: type: array collectionFormat: csv items: type: string format: date default: - '2018-01-01' - '2018-01-02' - '2018-01-03' - '2018-01-04' default: - - '2012-01-01' - '2014-01-02' - '2016-01-03' - '2018-01-04' - - '2011-01-01' - '2013-01-02' - '2015-01-03' - '2017-01-04' - name: isAnOption8 in: query type: array maxItems: 2 uniqueItems: true items: type: string default: - default unformatted string array item 1 - default unformatted string array item 2 - name: isAnOption9 in: query type: array collectionFormat: pipes required: false items: type: array collectionFormat: csv items: type: string format: duration default: - 1d - 1w - 1h - 2w default: - - 1s - 1h - 1d - 1w - - 2s - 2h - 2d - 2w responses: *stdResponses /path/params/{notAnOption1}/{notAnOption2}/{notAnOption3}/{notAnOption4}/{notAnOption5}/{notAnOption6}/{notAnOption7}: get: operationId: getRequiredInPath parameters: - name: notAnOption1 in: path type: string format: date required: true - name: notAnOption2 in: path type: string format: password pattern: '^[a-z]$' required: true - name: notAnOption3 in: path type: integer format: int32 required: true - name: notAnOption4 in: path type: integer format: int32 required: true minimum: 10 maximum: 100 multipleOf: 10 - name: notAnOption5 in: path type: array maxItems: 2 required: true items: type: string format: uuid - name: notAnOption6 in: path type: array collectionFormat: pipes required: true items: type: integer format: int32 minimum: 10 maximum: 100 multipleOf: 10 - name: notAnOption7 in: path type: array collectionFormat: pipes required: true items: type: array collectionFormat: csv items: type: string format: date responses: *stdResponses /optional/headers: get: operationId: getInHeaders parameters: - name: isAnOption1 in: header type: string format: date required: false default: '1970-01-01' - name: isAnOption2 in: header type: string format: password pattern: '^[a-z]$' required: false default: z - name: isAnOption3 in: header type: integer format: int32 required: false default: 32 - name: isAnOption4 in: header type: integer format: int32 required: false minimum: 10 maximum: 100 multipleOf: 10 default: 60 - name: isAnOption5 in: header type: array maxItems: 2 items: type: string format: uuid default: - a8098c1a-f86e-11da-bd1a-00112444be1e - name: isAnOption6 in: header type: array collectionFormat: pipes required: false items: type: integer format: int32 minimum: 10 maximum: 100 multipleOf: 10 default: - 10 - 20 - 30 - 40 - name: isAnOption7 in: header type: array collectionFormat: pipes required: false items: type: array collectionFormat: csv items: type: string format: date default: - '2018-01-01' - '2018-01-02' - '2018-01-03' - '2018-01-04' default: - - '2012-01-01' - '2014-01-02' - '2016-01-03' - '2018-01-04' - - '2011-01-01' - '2013-01-02' - '2015-01-03' - '2017-01-04' responses: *stdResponses /mixed/deepnested: get: operationId: getInDepth parameters: - name: deepNested1 in: query type: array collectionFormat: pipes required: true maxItems: 2 items: type: array collectionFormat: csv minItems: 2 items: type: array collectionFormat: ssv uniqueItems: true items: type: string pattern: '^[a-z]$' default: - a - b - c default: - - x - 'y' - z - - u - v - w default: - - - h - i - j - - k - l - m - - - h - i - j - - k - l - m - name: deepNested2 in: header type: array collectionFormat: pipes required: false maxItems: 2 items: type: array collectionFormat: csv minItems: 2 items: type: array collectionFormat: ssv uniqueItems: true items: type: string pattern: '^[a-z]$' default: - a - b - c default: - - x - 'y' - z - - u - v - w default: - - - h - i - j - - k - l - m - - - h - i - j - - k - l - m responses: *stdResponses /mixed/mixedBody/{pathParam1}: post: operationId: getInBody parameters: - name: bodyBuilding in: body schema: $ref: '#/definitions/ContainerConfig' - name: queryParam1 in: query type: integer required: false allowEmptyValue: true default: 100 maximum: 1000 - name: queryParam2 in: query type: string format: date required: false default: '1970-01-01' - name: queryParam3 in: query type: integer format: uint32 minimum: 12 exclusiveMinimum: true allowEmptyValue: true required: true - name: queryParam4 in: query collectionFormat: multi maxItems: 2 type: array items: type: string format: uuid default: - a8098c1a-f86e-11da-bd1a-00112444be1e - a8098c1a-f86e-11da-bd1a-00112444be1e - name: query_issue_863 in: query type: array items: type: string enum: - enum1 - enum2 - enum3 - name: pathParam1 in: path type: string pattern: '^\w+$' required: true - name: headerParam1 in: header type: array items: type: number default: - 1.1 - 2.75 required: false responses: *stdResponses /mixed/mixedBody2/{pathParam1}: post: operationId: getInBody2 parameters: - name: bodyBuilding in: body required: true schema: $ref: '#/definitions/errorResponseMsg' - name: queryParam1 in: query type: integer required: false allowEmptyValue: true default: 100 maximum: 1000 - name: queryParam2 in: query type: string format: date required: true default: '1970-01-01' - name: queryParam3 in: query type: integer format: uint32 minimum: 12 exclusiveMinimum: true allowEmptyValue: true required: true - name: queryParam4 in: query collectionFormat: multi maxItems: 2 type: array items: type: string format: uuid default: - a8098c1a-f86e-11da-bd1a-00112444be1e - name: pathParam1 in: path type: string pattern: '^\w+$' required: true - name: headerParam1 in: header type: array items: type: number default: - 1.1 - 2.75 required: false responses: *stdResponses /mixed/mixedBody3/{pathParam1}: post: operationId: getInBody3 parameters: - name: bodyBuilding in: body required: false schema: $ref: '#/definitions/errorResponseMsg' - name: queryParam1 in: query type: integer required: false allowEmptyValue: true default: 100 maximum: 1000 - name: queryParam2 in: query type: string format: date required: true default: 1970-01-01 - name: queryParam3 in: query type: integer format: uint32 minimum: 12 exclusiveMinimum: true allowEmptyValue: true required: true - name: queryParam4 in: query collectionFormat: multi maxItems: 2 type: array items: type: string format: uuid default: - a8098c1a-f86e-11da-bd1a-00112444be1e - name: pathParam1 in: path type: string pattern: '^\w+$' required: true - name: headerParam1 in: header type: array items: type: number default: - 1.1 - 2.75 required: false responses: *stdResponses /form/{pathParam1}: post: operationId: getInForm consumes: - multipart/formData parameters: - name: pathParam1 in: path type: string maxLength: 10 required: true - name: docname in: formData type: string pattern: '^\w+\.doc$' required: true - name: docAuthor in: formData type: string - name: attachment in: formData type: file required: true - name: addendum in: formData type: file required: false responses: *stdResponses definitions: ContainerConfig: type: object required: [config1] properties: config1: type: string format: date config2: type: string format: date default: '1999-09-09' default: config1: '2019-09-09' config2: '2018-09-09' errorResponseMsg: type: object required: [ errorCode, reason ] properties: errorCode: type: integer reason: type: string severity: type: string enum: [ FATAL, CRITICAL, ERROR, WARNING, INFO ] additional: type: string enum: [ FATAL, CRITICAL, ERROR, WARNING, INFO ] default: INFO default: errorCode: 501 reason: not implemented severity: FATAL validate-0.24.0/fixtures/validation/gentest2.yaml000066400000000000000000000371201457312750000220170ustar00rootroot00000000000000swagger: '2.0' info: title: code generation test fixture for parameters, with default values version: '1.0.0' host: localhost basePath: / consumes: - application/json produces: - application/json schemes: - http paths: /required/params: get: operationId: getRequired parameters: - name: notAnOption1 in: query type: string format: date required: true - name: notAnOption2 in: query type: string format: password pattern: '^[a-z]$' required: true - name: notAnOption3 in: query type: integer format: int32 required: true - name: notAnOption4 in: query type: integer format: int32 required: true minimum: 10 maximum: 100 multipleOf: 10 - name: notAnOption5 in: query type: array required: true maxItems: 2 items: type: string format: uuid - name: notAnOption6 in: query type: array collectionFormat: pipes required: true uniqueItems: true items: type: integer format: int32 minimum: 10 maximum: 100 multipleOf: 10 - name: notAnOption7 in: query type: array collectionFormat: pipes required: true uniqueItems: false items: type: array collectionFormat: csv uniqueItems: true items: type: string format: date responses: &stdResponses 200: description: simple type schema: type: string format: date 201: description: simple type schema: type: string format: uuid default: description: schema type schema: $ref: '#/definitions/ContainerConfig' /optional/params: get: operationId: getOptional parameters: - name: sanityCheck1 in: query type: string required: false default: sanity check one passed for primitive type - name: sanityCheck2 in: query type: number required: false default: 99.9 - name: sanityCheck3 in: query type: integer required: false default: 1000 - name: sanityCheck4 in: query type: integer format: uint32 required: false default: 100 - name: sanityCheckFormat1 in: query type: string format: uuid required: false default: a8098c1a-f86e-11da-bd1a-00112444be1e - name: isAnOption1 in: query type: string format: date required: false default: '1970-01-01' - name: isAnOption2 in: query type: string format: password pattern: '^[a-z]$' required: false default: z - name: isAnOption3 in: query type: integer format: int32 required: false default: 32 - name: isAnOption4 in: query type: integer format: int32 required: false minimum: 10 maximum: 100 multipleOf: 10 default: 60 - name: isAnOption5 in: query type: array maxItems: 2 items: type: string format: uuid default: - a8098c1a-f86e-11da-bd1a-00112444be1e - name: isAnOption6 in: query type: array collectionFormat: pipes required: false items: type: integer format: int32 minimum: 10 maximum: 100 multipleOf: 10 default: - 10 - 20 - 30 - 40 - name: isAnOption7 in: query type: array collectionFormat: pipes required: false items: type: array collectionFormat: csv items: type: string format: date default: - '2018-01-01' - '2018-01-02' - '2018-01-03' - '2018-01-04' default: - - '2012-01-01' - '2014-01-02' - '2016-01-03' - '2018-01-04' - - '2011-01-01' - '2013-01-02' - '2015-01-03' - '2017-01-04' - name: isAnOption8 in: query type: array maxItems: 2 uniqueItems: true items: type: string default: - default unformatted string array item 1 - default unformatted string array item 2 - name: isAnOption9 in: query type: array collectionFormat: pipes required: false items: type: array collectionFormat: csv items: type: string format: duration default: - 1d - 1w - 1h - 2w default: - - 1s - 1h - 1d - 1w - - 2s - 2h - 2d - 2w responses: *stdResponses /path/params/{notAnOption1}/{notAnOption2}/{notAnOption3}/{notAnOption4}/{notAnOption5}/{notAnOption6}/{notAnOption7}: get: operationId: getRequiredInPath parameters: - name: notAnOption1 in: path type: string format: date required: true - name: notAnOption2 in: path type: string format: password pattern: '^[a-z]$' required: true - name: notAnOption3 in: path type: integer format: int32 required: true - name: notAnOption4 in: path type: integer format: int32 required: true minimum: 10 maximum: 100 multipleOf: 10 - name: notAnOption5 in: path type: array maxItems: 2 required: true items: type: string format: uuid - name: notAnOption6 in: path type: array collectionFormat: pipes required: true items: type: integer format: int32 minimum: 10 maximum: 100 multipleOf: 10 - name: notAnOption7 in: path type: array collectionFormat: pipes required: true items: type: array collectionFormat: csv items: type: string format: date responses: *stdResponses /optional/headers: get: operationId: getInHeaders parameters: - name: isAnOption1 in: header type: string format: date required: false default: '1970-01-01' - name: isAnOption2 in: header type: string format: password pattern: '^[a-z]$' required: false default: z - name: isAnOption3 in: header type: integer format: int32 required: false default: 32 - name: isAnOption4 in: header type: integer format: int32 required: false minimum: 10 maximum: 100 multipleOf: 10 default: 60 - name: isAnOption5 in: header type: array maxItems: 2 items: type: string format: uuid default: - a8098c1a-f86e-11da-bd1a-00112444be1e - name: isAnOption6 in: header type: array collectionFormat: pipes required: false items: type: integer format: int32 minimum: 10 maximum: 100 multipleOf: 10 default: - 10 - 20 - 30 - 40 - name: isAnOption7 in: header type: array collectionFormat: pipes required: false items: type: array collectionFormat: csv items: type: string format: date default: - '2018-01-01' - '2018-01-02' - '2018-01-03' - '2018-01-04' default: - - '2012-01-01' - '2014-01-02' - '2016-01-03' - '2018-01-04' - - '2011-01-01' - '2013-01-02' - '2015-01-03' - '2017-01-04' responses: *stdResponses /mixed/deepnested: get: operationId: getInDepth parameters: - name: deepNested1 in: query type: array collectionFormat: pipes required: true maxItems: 2 items: type: array collectionFormat: csv minItems: 2 items: type: array collectionFormat: ssv uniqueItems: true items: type: string pattern: '^[a-z]$' default: - a - b - c default: - - x - 'y' - z - - u - v - w default: - - - h - i - j - - k - l - m - - - h - i - j - - k - l - m - name: deepNested2 in: header type: array collectionFormat: pipes required: false maxItems: 2 items: type: array collectionFormat: csv minItems: 2 items: type: array collectionFormat: ssv uniqueItems: true items: type: string pattern: '^[a-z]$' default: - a - b - c default: - - x - 'y' - z - - u - v - w default: - - - h - i - j - - k - l - m - - - h - i - j - - k - l - m responses: *stdResponses /mixed/mixedBody/{pathParam1}: post: operationId: getInBody parameters: - name: bodyBuilding in: body schema: $ref: '#/definitions/ContainerConfig' - name: queryParam1 in: query type: integer required: false allowEmptyValue: true default: 100 maximum: 1000 - name: queryParam2 in: query type: string format: date required: false default: '1970-01-01' - name: queryParam3 in: query type: integer format: uint32 minimum: 12 exclusiveMinimum: true allowEmptyValue: true required: true - name: queryParam4 in: query collectionFormat: multi maxItems: 2 type: array items: type: string format: uuid default: - a8098c1a-f86e-11da-bd1a-00112444be1e - a8098c1a-f86e-11da-bd1a-00112444be1e - name: query_issue_863 in: query type: array items: type: string enum: - enum1 - enum2 - enum3 - name: pathParam1 in: path type: string pattern: '^\w+$' required: true - name: headerParam1 in: header type: array items: type: number default: - 1.1 - 2.75 required: false responses: *stdResponses /mixed/mixedBody2/{pathParam1}: post: operationId: getInBody2 parameters: - name: bodyBuilding in: body required: true schema: $ref: '#/definitions/errorResponseMsg' - name: queryParam1 in: query type: integer required: false allowEmptyValue: true default: 100 maximum: 1000 - name: queryParam2 in: query type: string format: date required: true default: '1970-01-01' - name: queryParam3 in: query type: integer format: uint32 minimum: 12 exclusiveMinimum: true allowEmptyValue: true required: true - name: queryParam4 in: query collectionFormat: multi maxItems: 2 type: array items: type: string format: uuid default: - a8098c1a-f86e-11da-bd1a-00112444be1e - name: pathParam1 in: path type: string pattern: '^\w+$' required: true - name: headerParam1 in: header type: array items: type: number default: - 1.1 - 2.75 required: false responses: *stdResponses /mixed/mixedBody3/{pathParam1}: post: operationId: getInBody3 parameters: - name: bodyBuilding in: body required: false schema: $ref: '#/definitions/errorResponseMsg' - name: queryParam1 in: query type: integer required: false allowEmptyValue: true default: 100 maximum: 1000 - name: queryParam2 in: query type: string format: date required: true default: '1970-01-01' - name: queryParam3 in: query type: integer format: uint32 minimum: 12 exclusiveMinimum: true allowEmptyValue: true required: true - name: queryParam4 in: query collectionFormat: multi maxItems: 2 type: array items: type: string format: uuid default: - a8098c1a-f86e-11da-bd1a-00112444be1e - name: pathParam1 in: path type: string pattern: '^\w+$' required: true - name: headerParam1 in: header type: array items: type: number default: - 1.1 - 2.75 required: false responses: *stdResponses /form/{pathParam1}: post: operationId: getInForm consumes: - multipart/formData parameters: - name: pathParam1 in: path type: string maxLength: 10 required: true - name: docname in: formData type: string pattern: '^\w+\.doc$' required: true - name: docAuthor in: formData type: string - name: attachment in: formData type: file required: true - name: addendum in: formData type: file required: false responses: *stdResponses definitions: ContainerConfig: type: object required: [config1] properties: config1: type: string format: date config2: type: string format: date default: '1999-09-09' default: config1: '2019-09-09' config2: '2018-09-09' errorResponseMsg: type: object required: [ errorCode, reason ] properties: errorCode: type: integer reason: type: string severity: type: string enum: [ FATAL, CRITICAL, ERROR, WARNING, INFO ] additional: type: string enum: [ FATAL, CRITICAL, ERROR, WARNING, INFO ] default: INFO default: errorCode: 501 reason: not implemented severity: FATAL validate-0.24.0/fixtures/validation/gentest3.yaml000066400000000000000000000131531457312750000220200ustar00rootroot00000000000000swagger: '2.0' info: title: code generation test fixture for parameters, with default values version: '1.0.0' host: localhost basePath: / consumes: - application/json produces: - application/json schemes: - http paths: /headon: get: operationId: gimmeLottaHeaders parameters: - name: sampleParam in: query type: string responses: &stdResponses 200: description: sanity check name mangling for headers headers: &myHeaders sanity_check_header_1: type: string format: uuid sanity-check-header-2: type: string format: date sanityCheckHeader3: type: integer format: uint32 sanityCheckHeader3: type: integer format: uint32 X-sanityCheckHeader4: type: string format: password pattern: '^\w+$' # headers with collections X-DeepHeader1: type: array # implicit: collectionFormat=csv items: type: integer format: uint64 maximum: 50 X-DeepHeader2: type: array collectionFormat: pipes items: type: array collectionFormat: csv uniqueItems: true items: type: array collectionFormat: tsv maxItems: 10 items: type: string format: duration schema: type: string format: date 201: description: headers with default values headers: &myDefaultHeaders sanity_check_header_0: type: string default: simple string sanity_check_header_float: type: number default: 9.99 sanity_check_header_1: type: string format: uuid default: a8098c1a-f86e-11da-bd1a-00112444be1e sanity-check-header-2: type: string format: date default: x1972-01-01 sanityCheckHeader3: type: integer format: uint32 default: 100 sanityCheckHeader3: type: number format: float32 default: 1.45 X-sanityCheckHeader4: type: string format: password pattern: '^\w+$' default: abc # headers with collections X-DeepHeader1: type: array # implicit: collectionFormat=csv items: type: integer format: uint64 maximum: 50 default: - 1 - 2 - 3 X-DeepHeader2: type: array collectionFormat: pipes items: type: array collectionFormat: csv uniqueItems: true items: type: array collectionFormat: tsv maxItems: 10 items: type: string format: duration default: - - - 1s - 2s - 3s - - 1w - 2w - 3w - - - 4s - 5s - 6s - - 4w - 5w - 6w X-DeepHeader3: type: array collectionFormat: pipes items: type: array collectionFormat: csv uniqueItems: true items: type: array collectionFormat: tsv maxItems: 10 items: type: string format: date default: - - - 1999-01-01 - 1999-01-02 - 1999-01-03 - - 1999-02-01 - 1999-02-02 - 1999-02-03 - - - 2000-01-01 - 2000-01-02 - 2000-01-03 - - 2000-02-01 - 2000-02-02 - 2000-02-03 X-DeepHeader4: type: array collectionFormat: pipes uniqueItems: true items: type: string default: - this - is - a song schema: type: string format: date default: description: headers in default response headers: *myHeaders schema: $ref: '#/definitions/errorResponseMsg' definitions: errorResponseMsg: type: object required: [ errorCode, reason ] properties: errorCode: type: integer reason: type: string severity: type: string enum: [ FATAL, CRITICAL, ERROR, WARNING, INFO ] additional: type: string enum: [ FATAL, CRITICAL, ERROR, WARNING, INFO ] default: INFO default: errorCode: 501 reason: not implemented severity: FATAL validate-0.24.0/fixtures/validation/indirect-circular-ancestor.json000066400000000000000000000070311457312750000255100ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Circular2": { "allOf": [{ "$ref": "#/definitions/Circular1" }, { "properties": { "createdAt": { "type": "string", "format": "date-time" } } }] }, "Parent": { "allOf": [{ "$ref": "#/definitions/Circular2" }] }, "Circular1": { "allOf": [{ "$ref": "#/definitions/Parent" }, { "properties": { "age": { "type": "integer", "format": "int32" } } }] }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/invalid-formdata-body-params.json000066400000000000000000000072211457312750000257270ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "parameters": [{ "name": "limit", "in": "formData", "description": "number of items to return in the result", "type": "array", "collectionFormat": "csv", "items": { "type": "integer", "format": "int32", "default": 20 } }, { "name": "bodyParam", "in": "body", "description": "number of items to return in the result", "schema": { "type": "integer", "format": "int32", "default": 20 } }], "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/invalid-ref.json000066400000000000000000000057021457312750000224740ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/DoesNotExist" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/invalid-referenced.yml000066400000000000000000000006751457312750000236560ustar00rootroot00000000000000--- swagger: "2.0" info: version: "0.1.0" title: referenced validation invalid paths: /: get: responses: default: description: the record parameters: rateLimit: name: X-Rate-Limit in: header type: integer format: int32 responses: notFound: description: Not found definitions: record: type: object properties: createdAt: type: string format: date-time validate-0.24.0/fixtures/validation/nestedduplicateprops.json000066400000000000000000000071561457312750000245420ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "ValidChild": { "allOf": [{ "$ref": "#/definitions/Parent" }, { "properties": { "age": { "type": "integer", "format": "int32" } } }] }, "InvalidChild": { "allOf": [{ "$ref": "#/definitions/ValidChild" }, { "properties": { "name": { "type": "string" } } }] }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/petstore-expanded.json000066400000000000000000000123631457312750000237300ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Swagger Petstore", "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "Wordnik API Team", "email": "foo@example.com", "url": "http://madskristensen.net" }, "license": { "name": "MIT", "url": "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/api", "schemes": [ "http" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/pets": { "get": { "description": "Returns all pets from the system that the user has access to", "operationId": "findPets", "produces": [ "application/json", "application/xml", "text/xml", "text/html" ], "parameters": [ { "name": "tags", "in": "query", "description": "tags to filter by", "required": false, "type": "array", "items": { "type": "string" }, "collectionFormat": "csv" }, { "name": "limit", "in": "query", "description": "maximum number of results to return", "required": false, "type": "integer", "format": "int32" } ], "responses": { "200": { "description": "pet response", "schema": { "type": "array", "items": { "$ref": "#/definitions/pet" } } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } }, "post": { "description": "Creates a new pet in the store. Duplicates are allowed", "operationId": "addPet", "produces": [ "application/json" ], "parameters": [ { "name": "pet", "in": "body", "description": "Pet to add to the store", "required": true, "schema": { "$ref": "#/definitions/newPet" } } ], "responses": { "200": { "description": "pet response", "schema": { "$ref": "#/definitions/pet" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } } }, "/pets/{id}": { "get": { "description": "Returns a user based on a single ID, if the user does not have access to the pet", "operationId": "findPetById", "produces": [ "application/json", "application/xml", "text/xml", "text/html" ], "parameters": [ { "name": "id", "in": "path", "description": "ID of pet to fetch", "required": true, "type": "integer", "format": "int64" } ], "responses": { "200": { "description": "pet response", "schema": { "$ref": "#/definitions/pet" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } }, "delete": { "description": "deletes a single pet based on the ID supplied", "operationId": "deletePet", "parameters": [ { "name": "id", "in": "path", "description": "ID of pet to delete", "required": true, "type": "integer", "format": "int64" } ], "responses": { "204": { "description": "pet deleted" }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/errorModel" } } } } } }, "definitions": { "pet": { "required": [ "id", "name" ], "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "tag": { "type": "string" } } }, "newPet": { "allOf": [ { "$ref": "pet" }, { "required": [ "name" ], "properties": { "id": { "type": "integer", "format": "int64" } } } ] }, "errorModel": { "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/recursive-circular-ancestor.json000066400000000000000000000067641457312750000257320ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Circular2": { "allOf": [{ "$ref": "#/definitions/Circular1" }, { "properties": { "createdAt": { "type": "string", "format": "date-time" } } }] }, "Parent": { "$ref": "#/definitions/Circular2" }, "Circular1": { "allOf": [{ "$ref": "#/definitions/Parent" }, { "properties": { "age": { "type": "integer", "format": "int32" } } }] }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/type-keyword-mismatch.yaml000066400000000000000000000020761457312750000245340ustar00rootroot00000000000000swagger: '2.0' info: description: Validation keyword type mismatch version: 0.0.1 title: test paths: /test/{id}/string: get: parameters: - name: id in: path required: true type: string minimum: 1 maximum: 5 multipleOf: 33 responses: '200': description: successful operation '500': description: Operation error /test/{id}/integer: get: parameters: - name: id in: path required: true type: integer minItems: 1 maxItems: 5 uniqueItems: true responses: '200': description: successful operation '500': description: Operation error /test/{id}/array: get: parameters: - name: id in: path required: true type: array minLength: 1 maxLength: 5 responses: '200': description: successful operation '500': description: Operation error validate-0.24.0/fixtures/validation/valid-ref.json000066400000000000000000000056761457312750000221570ustar00rootroot00000000000000{ "swagger": "2.0", "info": { "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n", "version": "1.0.0", "title": "Swagger Petstore", "termsOfService": "http://helloreverb.com/terms/", "contact": { "name": "apiteam@wordnik.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "petstore.swagger.wordnik.com", "basePath": "/v2", "schemes": [ "http" ], "paths": { "/pets": { "get": { "tags": ["pet"], "summary": "list the pets", "operationId": "getPets", "responses": { "default": { "description": "Generic Error" }, "200": { "description": "Pets list", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } } } } } }, "definitions": { "Parent": { "$ref": "#/definitions/Category" }, "Category": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } }, "Pet": { "required": [ "name", "photoUrls" ], "properties": { "id": { "type": "integer", "format": "int64" }, "category": { "$ref": "#/definitions/Category" }, "name": { "type": "string", "example": "doggie" }, "photoUrls": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "status": { "type": "string", "description": "pet status in the store" } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } } } } } validate-0.24.0/fixtures/validation/valid-referenced-variants.yaml000066400000000000000000000066551457312750000253210ustar00rootroot00000000000000--- swagger: "2.0" info: version: "0.1.0" title: referenced validation paths: /: get: parameters: - $ref: "#/parameters/rateLimit" - $ref: "#/parameters/requiredPatternProps" responses: default: description: the record schema: $ref: "#/definitions/record" 404: $ref: "#/responses/notFound" 403: $ref: "#/responses/wrongMe" /greatAgain: get: parameters: - $ref: "#/parameters/rateLimit" - $ref: "#/parameters/requiredPatternItems" responses: default: description: the record schema: $ref: "#/definitions/record" 404: $ref: "#/responses/notFound" 403: $ref: "#/responses/despicableMeItems" parameters: rateLimit: name: X-Rate-Limit in: header type: integer #<--- try error with $ref in header format: int32 requiredPatternProps: name: badPattern in: body schema: $ref: '#/definitions/record' #<--- patternProperties in parameters requiredPatternItems: name: badPatternInItems in: body schema: type: array items: $ref: '#/definitions/lotOfErrors2' #<--- patternProperties in parameters responses: notFound: description: Not found schema: $ref: "#/definitions/record" wrongMe: description: wrong me schema: $ref: "#/definitions/lotOfErrors" despicableMeItems: description: despicable me schema: type: array items: $ref: "#/definitions/lotOfErrors2" definitions: record: type: object additionalProperties: true required: [ createdAt, oneMore ] properties: createdAt: type: string format: date-time lotOfErrors: type: object required: [ a, b-1, x, z-1, bug ] properties: a: type: integer format: int32 readOnly: true #<--- warning default: 3 example: 5 additionalProperties: #type: object properties: x: type: integer z: type: integer additionalProperties: false patternProperties: #<-- unsupported: patternProperties in schema '^z-.*$': type: integer format: int32 readOnly: true #<-- warning default: 3 example: 5 patternProperties: #<-- unsupported: patternProperties in schema '^b-.*$': type: integer format: int32 default: 3 example: 5 '^)b-InvalidRegexp1.(*$': #<-- invalid regexp type: integer format: int32 default: 3 example: 5 lotOfErrors2: #<-- note the missing type to declare in items required: [ a , b-8] properties: a: type: integer format: int32 default: 3 example: 5 patternProperties: #<-- unsupported: patternProperties in schema '^b-.*$': type: integer format: int32 readOnly: true #<--- warning default: 3 example: 5 '^)b-InvalidRegexp2.(*$': #<-- invalid regexp type: integer format: int32 default: 3 example: 5 validate-0.24.0/fixtures/validation/valid-referenced.yml000066400000000000000000000012161457312750000233170ustar00rootroot00000000000000--- swagger: "2.0" info: version: "0.1.0" title: referenced validation paths: /: get: parameters: - $ref: "#/parameters/rateLimit" responses: default: description: the record schema: $ref: "#/definitions/record" 404: $ref: "#/responses/notFound" parameters: rateLimit: name: X-Rate-Limit in: header type: integer format: int32 responses: notFound: description: Not found schema: $ref: "#/definitions/record" definitions: record: type: object properties: createdAt: type: string format: date-time validate-0.24.0/formats.go000066400000000000000000000046351457312750000154040ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "reflect" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" ) type formatValidator struct { Path string In string Format string KnownFormats strfmt.Registry Options *SchemaValidatorOptions } func newFormatValidator(path, in, format string, formats strfmt.Registry, opts *SchemaValidatorOptions) *formatValidator { if opts == nil { opts = new(SchemaValidatorOptions) } var f *formatValidator if opts.recycleValidators { f = pools.poolOfFormatValidators.BorrowValidator() } else { f = new(formatValidator) } f.Path = path f.In = in f.Format = format f.KnownFormats = formats f.Options = opts return f } func (f *formatValidator) SetPath(path string) { f.Path = path } func (f *formatValidator) Applies(source interface{}, kind reflect.Kind) bool { if source == nil || f.KnownFormats == nil { return false } switch source := source.(type) { case *spec.Items: return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) case *spec.Parameter: return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) case *spec.Schema: return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) case *spec.Header: return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) default: return false } } func (f *formatValidator) Validate(val interface{}) *Result { if f.Options.recycleValidators { defer func() { f.redeem() }() } var result *Result if f.Options.recycleResult { result = pools.poolOfResults.BorrowResult() } else { result = new(Result) } if err := FormatOf(f.Path, f.In, f.Format, val.(string), f.KnownFormats); err != nil { result.AddErrors(err) } return result } func (f *formatValidator) redeem() { pools.poolOfFormatValidators.RedeemValidator(f) } validate-0.24.0/formats_test.go000066400000000000000000000027441457312750000164420ustar00rootroot00000000000000package validate import ( "fmt" "reflect" "testing" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/stretchr/testify/assert" ) // Validator for string formats func TestFormatValidator_EdgeCases(t *testing.T) { // Apply v := newFormatValidator( "", "", "", strfmt.Default, nil, ) v.SetPath("a.b.c") // formatValidator applies to: Items, Parameter,Schema p := spec.Parameter{} p.Typed(stringType, "email") s := spec.Schema{} s.Typed(stringType, "uuid") i := spec.Items{} i.Typed(stringType, "datetime") sources := []interface{}{&p, &s, &i} for _, source := range sources { // Default formats for strings assert.True(t, v.Applies(source, reflect.String)) // Do not apply for number formats assert.False(t, v.Applies(source, reflect.Int)) } assert.False(t, v.Applies("A string", reflect.String)) assert.False(t, v.Applies(nil, reflect.String)) } func TestStringValidation(t *testing.T) { type testParams struct { format string obj fmt.Stringer } testCases := []*testParams{ { format: "datetime", obj: strfmt.NewDateTime(), }, { format: "uuid", obj: strfmt.UUID("00000000-0000-0000-0000-000000000000"), }, { format: "email", obj: strfmt.Email("name@domain.tld"), }, { format: "bsonobjectid", obj: strfmt.NewObjectId("60a7903427a1e6666d2b998c"), }, } for _, v := range testCases { err := FormatOf(testID, "body", v.format, v.obj.String(), strfmt.Default) assert.Nil(t, err) } } validate-0.24.0/go.mod000066400000000000000000000016151457312750000145030ustar00rootroot00000000000000module github.com/go-openapi/validate require ( github.com/davecgh/go-spew v1.1.1 github.com/go-openapi/analysis v0.23.0 github.com/go-openapi/errors v0.22.0 github.com/go-openapi/jsonpointer v0.21.0 github.com/go-openapi/loads v0.22.0 github.com/go-openapi/spec v0.21.0 github.com/go-openapi/strfmt v0.23.0 github.com/go-openapi/swag v0.23.0 github.com/stretchr/testify v1.9.0 gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.mongodb.org/mongo-driver v1.14.0 // indirect ) go 1.20 validate-0.24.0/go.sum000066400000000000000000000074761457312750000145430ustar00rootroot00000000000000github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-openapi/analysis v0.23.0 h1:aGday7OWupfMs+LbmLZG4k0MYXIANxcuBTYUC03zFCU= github.com/go-openapi/analysis v0.23.0/go.mod h1:9mz9ZWaSlV8TvjQHLl2mUW2PbZtemkE8yA5v22ohupo= github.com/go-openapi/errors v0.22.0 h1:c4xY/OLxUBSTiepAg3j/MHuAv5mJhnf53LLMWFB+u/w= github.com/go-openapi/errors v0.22.0/go.mod h1:J3DmZScxCDufmIMsdOuDHxJbdOGC0xtUynjIx092vXE= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= github.com/go-openapi/loads v0.22.0 h1:ECPGd4jX1U6NApCGG1We+uEozOAvXvJSF4nnwHZ8Aco= github.com/go-openapi/loads v0.22.0/go.mod h1:yLsaTCS92mnSAZX5WWoxszLj0u+Ojl+Zs5Stn1oF+rs= github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY= github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= github.com/go-openapi/strfmt v0.23.0 h1:nlUS6BCqcnAk0pyhi9Y+kdDVZdZMHfEKQiS4HaMgO/c= github.com/go-openapi/strfmt v0.23.0/go.mod h1:NrtIpfKtWIygRkKVsxh7XQMDQW5HKQl6S5ik2elW+K4= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= validate-0.24.0/helpers.go000066400000000000000000000246511457312750000153730ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate // TODO: define this as package validate/internal // This must be done while keeping CI intact with all tests and test coverage import ( "reflect" "strconv" "strings" "github.com/go-openapi/errors" "github.com/go-openapi/spec" ) const ( swaggerBody = "body" swaggerExample = "example" swaggerExamples = "examples" ) const ( objectType = "object" arrayType = "array" stringType = "string" integerType = "integer" numberType = "number" booleanType = "boolean" fileType = "file" nullType = "null" ) const ( jsonProperties = "properties" jsonItems = "items" jsonType = "type" // jsonSchema = "schema" jsonDefault = "default" ) const ( stringFormatDate = "date" stringFormatDateTime = "date-time" stringFormatPassword = "password" stringFormatByte = "byte" // stringFormatBinary = "binary" stringFormatCreditCard = "creditcard" stringFormatDuration = "duration" stringFormatEmail = "email" stringFormatHexColor = "hexcolor" stringFormatHostname = "hostname" stringFormatIPv4 = "ipv4" stringFormatIPv6 = "ipv6" stringFormatISBN = "isbn" stringFormatISBN10 = "isbn10" stringFormatISBN13 = "isbn13" stringFormatMAC = "mac" stringFormatBSONObjectID = "bsonobjectid" stringFormatRGBColor = "rgbcolor" stringFormatSSN = "ssn" stringFormatURI = "uri" stringFormatUUID = "uuid" stringFormatUUID3 = "uuid3" stringFormatUUID4 = "uuid4" stringFormatUUID5 = "uuid5" integerFormatInt32 = "int32" integerFormatInt64 = "int64" integerFormatUInt32 = "uint32" integerFormatUInt64 = "uint64" numberFormatFloat32 = "float32" numberFormatFloat64 = "float64" numberFormatFloat = "float" numberFormatDouble = "double" ) // Helpers available at the package level var ( pathHelp *pathHelper valueHelp *valueHelper errorHelp *errorHelper paramHelp *paramHelper responseHelp *responseHelper ) type errorHelper struct { // A collection of unexported helpers for error construction } func (h *errorHelper) sErr(err errors.Error, recycle bool) *Result { // Builds a Result from standard errors.Error var result *Result if recycle { result = pools.poolOfResults.BorrowResult() } else { result = new(Result) } result.Errors = []error{err} return result } func (h *errorHelper) addPointerError(res *Result, err error, ref string, fromPath string) *Result { // Provides more context on error messages // reported by the jsoinpointer package by altering the passed Result if err != nil { res.AddErrors(cannotResolveRefMsg(fromPath, ref, err)) } return res } type pathHelper struct { // A collection of unexported helpers for path validation } func (h *pathHelper) stripParametersInPath(path string) string { // Returns a path stripped from all path parameters, with multiple or trailing slashes removed. // // Stripping is performed on a slash-separated basis, e.g '/a{/b}' remains a{/b} and not /a. // - Trailing "/" make a difference, e.g. /a/ !~ /a (ex: canary/bitbucket.org/swagger.json) // - presence or absence of a parameter makes a difference, e.g. /a/{log} !~ /a/ (ex: canary/kubernetes/swagger.json) // Regexp to extract parameters from path, with surrounding {}. // NOTE: important non-greedy modifier rexParsePathParam := mustCompileRegexp(`{[^{}]+?}`) strippedSegments := []string{} for _, segment := range strings.Split(path, "/") { strippedSegments = append(strippedSegments, rexParsePathParam.ReplaceAllString(segment, "X")) } return strings.Join(strippedSegments, "/") } func (h *pathHelper) extractPathParams(path string) (params []string) { // Extracts all params from a path, with surrounding "{}" rexParsePathParam := mustCompileRegexp(`{[^{}]+?}`) for _, segment := range strings.Split(path, "/") { for _, v := range rexParsePathParam.FindAllStringSubmatch(segment, -1) { params = append(params, v...) } } return } type valueHelper struct { // A collection of unexported helpers for value validation } func (h *valueHelper) asInt64(val interface{}) int64 { // Number conversion function for int64, without error checking // (implements an implicit type upgrade). v := reflect.ValueOf(val) switch v.Kind() { //nolint:exhaustive case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return v.Int() case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: return int64(v.Uint()) case reflect.Float32, reflect.Float64: return int64(v.Float()) default: // panic("Non numeric value in asInt64()") return 0 } } func (h *valueHelper) asUint64(val interface{}) uint64 { // Number conversion function for uint64, without error checking // (implements an implicit type upgrade). v := reflect.ValueOf(val) switch v.Kind() { //nolint:exhaustive case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return uint64(v.Int()) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: return v.Uint() case reflect.Float32, reflect.Float64: return uint64(v.Float()) default: // panic("Non numeric value in asUint64()") return 0 } } // Same for unsigned floats func (h *valueHelper) asFloat64(val interface{}) float64 { // Number conversion function for float64, without error checking // (implements an implicit type upgrade). v := reflect.ValueOf(val) switch v.Kind() { //nolint:exhaustive case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return float64(v.Int()) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: return float64(v.Uint()) case reflect.Float32, reflect.Float64: return v.Float() default: // panic("Non numeric value in asFloat64()") return 0 } } type paramHelper struct { // A collection of unexported helpers for parameters resolution } func (h *paramHelper) safeExpandedParamsFor(path, method, operationID string, res *Result, s *SpecValidator) (params []spec.Parameter) { operation, ok := s.expandedAnalyzer().OperationFor(method, path) if ok { // expand parameters first if necessary resolvedParams := []spec.Parameter{} for _, ppr := range operation.Parameters { resolvedParam, red := h.resolveParam(path, method, operationID, &ppr, s) //#nosec res.Merge(red) if resolvedParam != nil { resolvedParams = append(resolvedParams, *resolvedParam) } } // remove params with invalid expansion from Slice operation.Parameters = resolvedParams for _, ppr := range s.expandedAnalyzer().SafeParamsFor(method, path, func(_ spec.Parameter, err error) bool { // since params have already been expanded, there are few causes for error res.AddErrors(someParametersBrokenMsg(path, method, operationID)) // original error from analyzer res.AddErrors(err) return true }) { params = append(params, ppr) } } return } func (h *paramHelper) resolveParam(path, method, operationID string, param *spec.Parameter, s *SpecValidator) (*spec.Parameter, *Result) { // Ensure parameter is expanded var err error res := new(Result) isRef := param.Ref.String() != "" if s.spec.SpecFilePath() == "" { err = spec.ExpandParameterWithRoot(param, s.spec.Spec(), nil) } else { err = spec.ExpandParameter(param, s.spec.SpecFilePath()) } if err != nil { // Safeguard // NOTE: we may enter here when the whole parameter is an unresolved $ref refPath := strings.Join([]string{"\"" + path + "\"", method}, ".") errorHelp.addPointerError(res, err, param.Ref.String(), refPath) return nil, res } res.Merge(h.checkExpandedParam(param, param.Name, param.In, operationID, isRef)) return param, res } func (h *paramHelper) checkExpandedParam(pr *spec.Parameter, path, in, operation string, isRef bool) *Result { // Secure parameter structure after $ref resolution res := new(Result) simpleZero := spec.SimpleSchema{} // Try to explain why... best guess switch { case pr.In == swaggerBody && (pr.SimpleSchema != simpleZero && pr.SimpleSchema.Type != objectType): if isRef { // Most likely, a $ref with a sibling is an unwanted situation: in itself this is a warning... // but we detect it because of the following error: // schema took over Parameter for an unexplained reason res.AddWarnings(refShouldNotHaveSiblingsMsg(path, operation)) } res.AddErrors(invalidParameterDefinitionMsg(path, in, operation)) case pr.In != swaggerBody && pr.Schema != nil: if isRef { res.AddWarnings(refShouldNotHaveSiblingsMsg(path, operation)) } res.AddErrors(invalidParameterDefinitionAsSchemaMsg(path, in, operation)) case (pr.In == swaggerBody && pr.Schema == nil) || (pr.In != swaggerBody && pr.SimpleSchema == simpleZero): // Other unexpected mishaps res.AddErrors(invalidParameterDefinitionMsg(path, in, operation)) } return res } type responseHelper struct { // A collection of unexported helpers for response resolution } func (r *responseHelper) expandResponseRef( response *spec.Response, path string, s *SpecValidator) (*spec.Response, *Result) { // Ensure response is expanded var err error res := new(Result) if s.spec.SpecFilePath() == "" { // there is no physical document to resolve $ref in response err = spec.ExpandResponseWithRoot(response, s.spec.Spec(), nil) } else { err = spec.ExpandResponse(response, s.spec.SpecFilePath()) } if err != nil { // Safeguard // NOTE: we may enter here when the whole response is an unresolved $ref. errorHelp.addPointerError(res, err, response.Ref.String(), path) return nil, res } return response, res } func (r *responseHelper) responseMsgVariants( responseType string, responseCode int) (responseName, responseCodeAsStr string) { // Path variants for messages if responseType == jsonDefault { responseCodeAsStr = jsonDefault responseName = "default response" } else { responseCodeAsStr = strconv.Itoa(responseCode) responseName = "response " + responseCodeAsStr } return } validate-0.24.0/helpers_test.go000066400000000000000000000043731457312750000164310ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "errors" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestHelpers_addPointerError(t *testing.T) { res := new(Result) r := errorHelp.addPointerError(res, errors.New("my error"), "my ref", "path") require.NotEmpty(t, r.Errors) msg := r.Errors[0].Error() assert.Contains(t, msg, "could not resolve reference in path to $ref my ref: my error") } func integerFactory(base int) []interface{} { return []interface{}{ base, int8(base), int16(base), int32(base), int64(base), uint(base), uint8(base), uint16(base), uint32(base), uint64(base), float32(base), float64(base), } } // Test cases in private method asInt64() func TestHelpers_asInt64(t *testing.T) { for _, v := range integerFactory(3) { assert.Equal(t, int64(3), valueHelp.asInt64(v)) } // Non numeric if assert.NotPanics(t, func() { valueHelp.asInt64("123") }) { assert.Equal(t, int64(0), valueHelp.asInt64("123")) } } // Test cases in private method asUint64() func TestHelpers_asUint64(t *testing.T) { for _, v := range integerFactory(3) { assert.Equal(t, uint64(3), valueHelp.asUint64(v)) } // Non numeric if assert.NotPanics(t, func() { valueHelp.asUint64("123") }) { assert.Equal(t, uint64(0), valueHelp.asUint64("123")) } } // Test cases in private method asFloat64() func TestHelpers_asFloat64(t *testing.T) { const epsilon = 1e-9 for _, v := range integerFactory(3) { assert.InDelta(t, float64(3), valueHelp.asFloat64(v), epsilon) } // Non numeric if assert.NotPanics(t, func() { valueHelp.asFloat64("123") }) { assert.InDelta(t, float64(0), valueHelp.asFloat64("123"), epsilon) } } validate-0.24.0/items_validator_test.go000066400000000000000000000224551457312750000201560ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "encoding/json" "fmt" "log" "os" "path/filepath" "testing" "github.com/go-openapi/errors" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) var ( // PetStore20 json doc for swagger 2.0 pet store PetStore20 string // PetStoreJSONMessage json raw message for Petstore20 PetStoreJSONMessage json.RawMessage ) func init() { petstoreFixture := filepath.Join("fixtures", "petstore", "swagger.json") petstore, err := os.ReadFile(petstoreFixture) if err != nil { log.Fatalf("could not initialize fixture: %s: %v", petstoreFixture, err) } PetStoreJSONMessage = json.RawMessage(petstore) PetStore20 = string(petstore) } func stringItems() *spec.Items { return spec.NewItems().Typed(stringType, "") } func requiredError(param *spec.Parameter, data interface{}) *errors.Validation { return errors.Required(param.Name, param.In, data) } func maxErrorItems(path, in string, items *spec.Items, data interface{}) *errors.Validation { return errors.ExceedsMaximum(path, in, *items.Maximum, items.ExclusiveMaximum, data) } func minErrorItems(path, in string, items *spec.Items, data interface{}) *errors.Validation { return errors.ExceedsMinimum(path, in, *items.Minimum, items.ExclusiveMinimum, data) } func multipleOfErrorItems(path, in string, items *spec.Items, data interface{}) *errors.Validation { return errors.NotMultipleOf(path, in, *items.MultipleOf, data) } /* func requiredErrorItems(path, in string) *errors.Validation { return errors.Required(path, in) } */ func maxLengthErrorItems(path, in string, items *spec.Items, data interface{}) *errors.Validation { return errors.TooLong(path, in, *items.MaxLength, data) } func minLengthErrorItems(path, in string, items *spec.Items, data interface{}) *errors.Validation { return errors.TooShort(path, in, *items.MinLength, data) } func patternFailItems(path, in string, items *spec.Items, data interface{}) *errors.Validation { return errors.FailedPattern(path, in, items.Pattern, data) } func enumFailItems(path, in string, items *spec.Items, data interface{}) *errors.Validation { return errors.EnumFail(path, in, data, items.Enum) } func minItemsErrorItems(path, in string, items *spec.Items, data interface{}) *errors.Validation { return errors.TooFewItems(path, in, *items.MinItems, data) } func maxItemsErrorItems(path, in string, items *spec.Items, data interface{}) *errors.Validation { return errors.TooManyItems(path, in, *items.MaxItems, data) } func duplicatesErrorItems(path, in string) *errors.Validation { return errors.DuplicateItems(path, in) } func TestNumberItemsValidation(t *testing.T) { values := [][]interface{}{ {23, 49, 56, 21, 14, 35, 28, 7, 42}, {uint(23), uint(49), uint(56), uint(21), uint(14), uint(35), uint(28), uint(7), uint(42)}, {float64(23), float64(49), float64(56), float64(21), float64(14), float64(35), float64(28), float64(7), float64(42)}, } for i, v := range values { items := spec.NewItems() items.WithMaximum(makeFloat(v[1]), false) items.WithMinimum(makeFloat(v[3]), false) items.WithMultipleOf(makeFloat(v[7])) items.WithEnum(v[3], v[6], v[8], v[1]) items.Typed("integer", "int32") parent := spec.QueryParam("factors").CollectionOf(items, "") path := fmt.Sprintf("factors.%d", i) validator := newItemsValidator(parent.Name, parent.In, items, parent, strfmt.Default, nil) // MultipleOf err := validator.Validate(i, v[0]) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, multipleOfErrorItems(path, validator.in, items, v[0]), err.Errors[0].Error()) // Maximum err = validator.Validate(i, v[1]) assert.True(t, err == nil || err.IsValid()) err = validator.Validate(i, v[2]) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, maxErrorItems(path, validator.in, items, v[2]), err.Errors[0].Error()) // ExclusiveMaximum items.ExclusiveMaximum = true // requires a new items validator because this is set a creation time validator = newItemsValidator(parent.Name, parent.In, items, parent, strfmt.Default, nil) err = validator.Validate(i, v[1]) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, maxErrorItems(path, validator.in, items, v[1]), err.Errors[0].Error()) // Minimum err = validator.Validate(i, v[3]) assert.True(t, err == nil || err.IsValid()) err = validator.Validate(i, v[4]) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, minErrorItems(path, validator.in, items, v[4]), err.Errors[0].Error()) // ExclusiveMinimum items.ExclusiveMinimum = true // requires a new items validator because this is set a creation time validator = newItemsValidator(parent.Name, parent.In, items, parent, strfmt.Default, nil) err = validator.Validate(i, v[3]) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, minErrorItems(path, validator.in, items, v[3]), err.Errors[0].Error()) // Enum err = validator.Validate(i, v[5]) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, enumFailItems(path, validator.in, items, v[5]), err.Errors[0].Error()) // Valid passes err = validator.Validate(i, v[6]) assert.True(t, err == nil || err.IsValid()) } } func TestStringItemsValidation(t *testing.T) { items := spec.NewItems().WithMinLength(3).WithMaxLength(5).WithPattern(`^[a-z]+$`).Typed(stringType, "") items.WithEnum("aaa", "bbb", "ccc") parent := spec.QueryParam("tags").CollectionOf(items, "") path := parent.Name + ".1" validator := newItemsValidator(parent.Name, parent.In, items, parent, strfmt.Default, nil) // required data := "" err := validator.Validate(1, data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, minLengthErrorItems(path, validator.in, items, data), err.Errors[0].Error()) // MaxLength data = "abcdef" err = validator.Validate(1, data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, maxLengthErrorItems(path, validator.in, items, data), err.Errors[0].Error()) // MinLength data = "a" err = validator.Validate(1, data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, minLengthErrorItems(path, validator.in, items, data), err.Errors[0].Error()) // Pattern data = "a394" err = validator.Validate(1, data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, patternFailItems(path, validator.in, items, data), err.Errors[0].Error()) // Enum data = "abcde" err = validator.Validate(1, data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, enumFailItems(path, validator.in, items, data), err.Errors[0].Error()) // Valid passes err = validator.Validate(1, "bbb") assert.True(t, err == nil || err.IsValid()) } func TestArrayItemsValidation(t *testing.T) { items := spec.NewItems().CollectionOf(stringItems(), "").WithMinItems(1).WithMaxItems(5).UniqueValues() items.WithEnum("aaa", "bbb", "ccc") parent := spec.QueryParam("tags").CollectionOf(items, "") path := parent.Name + ".1" validator := newItemsValidator(parent.Name, parent.In, items, parent, strfmt.Default, nil) // MinItems data := []string{} err := validator.Validate(1, data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, minItemsErrorItems(path, validator.in, items, len(data)), err.Errors[0].Error()) // MaxItems data = []string{"a", "b", "c", "d", "e", "f"} err = validator.Validate(1, data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, maxItemsErrorItems(path, validator.in, items, len(data)), err.Errors[0].Error()) // UniqueItems err = validator.Validate(1, []string{"a", "a"}) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, duplicatesErrorItems(path, validator.in), err.Errors[0].Error()) // Enum data = []string{"a", "b", "c"} err = validator.Validate(1, data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, enumFailItems(path, validator.in, items, data), err.Errors[0].Error()) // Items strItems := spec.NewItems().WithMinLength(3).WithMaxLength(5).WithPattern(`^[a-z]+$`).Typed(stringType, "") items = spec.NewItems().CollectionOf(strItems, "").WithMinItems(1).WithMaxItems(5).UniqueValues() validator = newItemsValidator(parent.Name, parent.In, items, parent, strfmt.Default, nil) data = []string{"aa", "bbb", "ccc"} err = validator.Validate(1, data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, minLengthErrorItems(path+".0", parent.In, strItems, data[0]), err.Errors[0].Error()) } validate-0.24.0/jsonschema_test.go000066400000000000000000000147421457312750000171220ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "encoding/json" "net/http" "os" "path/filepath" "strings" "testing" "time" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Data structure for jsonschema-suite fixtures type schemaTestT struct { Description string `json:"description"` Schema *spec.Schema `json:"schema"` Tests []struct { Description string `json:"description"` Data interface{} `json:"data"` Valid bool `json:"valid"` } } var jsonSchemaFixturesPath = filepath.Join("fixtures", "jsonschema_suite") var schemaFixturesPath = filepath.Join("fixtures", "schemas") var formatFixturesPath = filepath.Join("fixtures", "formats") func enabled() []string { // Standard fixtures from JSON schema suite return []string{ "minLength", "maxLength", "pattern", "type", "minimum", "maximum", "multipleOf", "enum", "default", "dependencies", "items", "maxItems", "maxProperties", "minItems", "minProperties", "patternProperties", "required", "additionalItems", "uniqueItems", "properties", "additionalProperties", "allOf", "not", "oneOf", "anyOf", "ref", "definitions", "refRemote", "format", } } var optionalFixtures = []string{ // Optional fixtures from JSON schema suite: at the moment, these are disabled // "zeroTerminatedFloats", // "format", /* error on strict URI formatting */ // "bignum", // "ecmascript-regex", } var extendedFixtures = []string{ "extended-format", } func isEnabled(nm string) bool { return swag.ContainsStringsCI(enabled(), nm) } func isOptionalEnabled(nm string) bool { return swag.ContainsStringsCI(optionalFixtures, nm) } func isExtendedEnabled(nm string) bool { return swag.ContainsStringsCI(extendedFixtures, nm) } func TestJSONSchemaSuite(t *testing.T) { // Internal local server to serve remote $ref go func() { svr := &http.Server{ ReadTimeout: 5 * time.Second, WriteTimeout: 10 * time.Second, Addr: "localhost:1234", Handler: http.FileServer(http.Dir(jsonSchemaFixturesPath + "/remotes")), } err := svr.ListenAndServe() if err != nil { panic(err.Error()) } }() files, err := os.ReadDir(jsonSchemaFixturesPath) if err != nil { t.Fatal(err) } for _, f := range files { if f.IsDir() { continue } fileName := f.Name() t.Run(fileName, func(t *testing.T) { t.Parallel() specName := strings.TrimSuffix(fileName, filepath.Ext(fileName)) if !isEnabled(specName) { t.Logf("WARNING: fixture from jsonschema-test-suite not enabled: %s", specName) return } t.Log("Running " + specName) b, _ := os.ReadFile(filepath.Join(jsonSchemaFixturesPath, fileName)) doTestSchemaSuite(t, b) }) } } func TestSchemaFixtures(t *testing.T) { files, err := os.ReadDir(schemaFixturesPath) if err != nil { t.Fatal(err) } for _, f := range files { if f.IsDir() { continue } fileName := f.Name() t.Run(fileName, func(t *testing.T) { t.Parallel() specName := strings.TrimSuffix(fileName, filepath.Ext(fileName)) t.Log("Running " + specName) b, _ := os.ReadFile(filepath.Join(schemaFixturesPath, fileName)) doTestSchemaSuite(t, b) }) } } func expandOpts(base string) *spec.ExpandOptions { return &spec.ExpandOptions{ RelativeBase: base, SkipSchemas: false, ContinueOnError: false, } } func TestOptionalJSONSchemaSuite(t *testing.T) { jsonOptionalSchemaFixturesPath := filepath.Join(jsonSchemaFixturesPath, "optional") files, err := os.ReadDir(jsonOptionalSchemaFixturesPath) if err != nil { t.Fatal(err) } for _, f := range files { if f.IsDir() { continue } fileName := f.Name() t.Run(fileName, func(t *testing.T) { t.Parallel() specName := strings.TrimSuffix(fileName, filepath.Ext(fileName)) if !isOptionalEnabled(specName) { t.Logf("INFO: fixture from jsonschema-test-suite [optional] not enabled: %s", specName) return } t.Log("Running [optional] " + specName) b, _ := os.ReadFile(filepath.Join(jsonOptionalSchemaFixturesPath, fileName)) doTestSchemaSuite(t, b) }) } } // Further testing with all formats recognized by strfmt func TestFormat_JSONSchemaExtended(t *testing.T) { files, err := os.ReadDir(formatFixturesPath) if err != nil { t.Fatal(err) } for _, f := range files { if f.IsDir() { continue } fileName := f.Name() t.Run(fileName, func(t *testing.T) { t.Parallel() specName := strings.TrimSuffix(fileName, filepath.Ext(fileName)) if !isExtendedEnabled(specName) { t.Logf("INFO: fixture from extended tests suite [formats] not enabled: %s", specName) return } t.Log("Running [extended formats] " + specName) b, _ := os.ReadFile(filepath.Join(formatFixturesPath, fileName)) doTestSchemaSuite(t, b) }) } } func doTestSchemaSuite(t *testing.T, doc []byte) { // run a test formatted as per jsonschema-test-suite var testDescriptions []schemaTestT eru := json.Unmarshal(doc, &testDescriptions) require.NoError(t, eru) for _, testDescription := range testDescriptions { b, _ := testDescription.Schema.MarshalJSON() tmpFile, err := os.CreateTemp(os.TempDir(), "validate-test") require.NoError(t, err) _, _ = tmpFile.Write(b) tmpFile.Close() defer func() { _ = os.Remove(tmpFile.Name()) }() err = spec.ExpandSchemaWithBasePath(testDescription.Schema, nil, expandOpts(tmpFile.Name())) require.NoError(t, err, testDescription.Description+" should expand cleanly") validator := NewSchemaValidator(testDescription.Schema, nil, "data", strfmt.Default) for _, test := range testDescription.Tests { result := validator.Validate(test.Data) assert.NotNil(t, result, test.Description+" should validate") if test.Valid { assert.Empty(t, result.Errors, test.Description+" should not have errors") } else { assert.NotEmpty(t, result.Errors, test.Description+" should have errors") } } } } validate-0.24.0/messages_test.go000066400000000000000000000337301457312750000165750ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "fmt" "os" "path/filepath" "regexp" "sort" "strings" "testing" "github.com/go-openapi/loads" "github.com/go-openapi/strfmt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" ) var ( // This debug environment variable allows to report and capture actual validation messages // during testing. It should be disabled (undefined) during CI tests. DebugTest = os.Getenv("SWAGGER_DEBUG_TEST") != "" ) type ExpectedMessage struct { Message string `yaml:"message"` WithContinueOnErrors bool `yaml:"withContinueOnErrors"` // should be expected only when SetContinueOnErrors(true) IsRegexp bool `yaml:"isRegexp"` // expected message is interpreted as regexp (with regexp.MatchString()) } type ExpectedFixture struct { Comment string `yaml:"comment,omitempty"` Todo string `yaml:"todo,omitempty"` ExpectedLoadError bool `yaml:"expectedLoadError"` // expect error on load: skip validate step ExpectedValid bool `yaml:"expectedValid"` // expect valid spec ExpectedMessages []ExpectedMessage `yaml:"expectedMessages"` ExpectedWarnings []ExpectedMessage `yaml:"expectedWarnings"` Tested bool `yaml:"-"` Failed bool `yaml:"-"` } type ExpectedMap map[string]*ExpectedFixture func (m ExpectedMap) Get(key string) (*ExpectedFixture, bool) { v, ok := m[key] // no need to lock this map for now return v, ok } // Test message improvements, issue #44 and some more // ContinueOnErrors mode on // WARNING: this test is very demanding and constructed with varied scenarios, // which are not necessarily "unitary". Expect multiple changes in messages whenever // altering the validator. func Test_MessageQualityContinueOnErrors_Issue44(t *testing.T) { if !enableLongTests { skipNotify(t) t.SkipNow() } errs := testMessageQuality(t, true, true) /* set haltOnErrors=true to iterate spec by spec */ assert.Zero(t, errs, "Message testing didn't match expectations") } // ContinueOnErrors mode off func Test_MessageQualityStopOnErrors_Issue44(t *testing.T) { if !enableLongTests { skipNotify(t) t.SkipNow() } errs := testMessageQuality(t, true, false) /* set haltOnErrors=true to iterate spec by spec */ assert.Zero(t, errs, "Message testing didn't match expectations") } func loadTestConfig(t *testing.T, fp string) ExpectedMap { expectedConfig, err := os.ReadFile(fp) require.NoErrorf(t, err, "cannot read expected messages config file: %v", err) tested := make(ExpectedMap, 200) err = yaml.Unmarshal(expectedConfig, &tested) require.NoErrorf(t, err, "cannot unmarshall expected messages from config file : %v", err) // Check config for fixture, expected := range tested { require.Nil(t, UniqueItems("", "", expected.ExpectedMessages), "duplicate error messages configured for %s", fixture) require.Nil(t, UniqueItems("", "", expected.ExpectedWarnings), "duplicate warning messages configured for %s", fixture) } return tested } func testMessageQuality(t *testing.T, haltOnErrors bool, continueOnErrors bool) int { // Verifies the production of validation error messages in multiple // spec scenarios. // // The objective is to demonstrate that: // - messages are stable // - validation continues as much as possible, even in presence of many errors // // haltOnErrors is used in dev mode to study and fix testcases step by step (output is pretty verbose) // // set SWAGGER_DEBUG_TEST=1 env to get a report of messages at the end of each test. // expectedMessage{"", false, false}, // // expected messages and warnings are configured in ./fixtures/validation/expected_messages.yaml // var errs int // error count tested := loadTestConfig(t, filepath.Join("fixtures", "validation", "expected_messages.yaml")) if err := filepath.Walk(filepath.Join("fixtures", "validation"), testWalkSpecs(t, tested, haltOnErrors, continueOnErrors)); err != nil { t.Logf("%v", err) errs++ } recapTest(t, tested) return errs } func testDebugLog(t *testing.T, thisTest *ExpectedFixture) { if DebugTest { if thisTest.Comment != "" { t.Logf("\tDEVMODE: Comment: %s", thisTest.Comment) } if thisTest.Todo != "" { t.Logf("\tDEVMODE: Todo: %s", thisTest.Todo) } } } func expectInvalid(t *testing.T, path string, thisTest *ExpectedFixture, continueOnErrors bool) { // Checking invalid specs t.Logf("Testing messages for invalid spec: %s", path) testDebugLog(t, thisTest) doc, err := loads.Spec(path) // Check specs with load errors (error is located in pkg loads or spec) if thisTest.ExpectedLoadError { // Expect a load error: no further validation may possibly be conducted. require.Error(t, err, "expected this spec to return a load error") assert.Equal(t, 0, verifyLoadErrors(t, err, thisTest.ExpectedMessages)) return } require.NoError(t, err, "expected this spec to load properly") // Validate the spec document validator := NewSpecValidator(doc.Schema(), strfmt.Default) validator.SetContinueOnErrors(continueOnErrors) res, warn := validator.Validate(doc) // Check specs with load errors (error is located in pkg loads or spec) require.False(t, res.IsValid(), "expected this spec to be invalid") errs := verifyErrorsVsWarnings(t, res, warn) errs += verifyErrors(t, res, thisTest.ExpectedMessages, "error", continueOnErrors) errs += verifyErrors(t, warn, thisTest.ExpectedWarnings, "warning", continueOnErrors) assert.Equal(t, 0, errs) if errs > 0 { t.Logf("Message qualification on spec validation failed for %s", path) // DEVMODE allows developers to experiment and tune expected results if DebugTest { reportTest(t, path, res, thisTest.ExpectedMessages, "error", continueOnErrors) reportTest(t, path, warn, thisTest.ExpectedWarnings, "warning", continueOnErrors) } } } func expectValid(t *testing.T, path string, thisTest *ExpectedFixture, continueOnErrors bool) { // Expecting no message (e.g.valid spec): 0 message expected t.Logf("Testing valid spec: %s", path) testDebugLog(t, thisTest) doc, err := loads.Spec(path) require.NoError(t, err, "expected this spec to load without error") validator := NewSpecValidator(doc.Schema(), strfmt.Default) validator.SetContinueOnErrors(continueOnErrors) res, warn := validator.Validate(doc) assert.True(t, res.IsValid(), "expected this spec to be valid") assert.Emptyf(t, res.Errors, "expected no returned errors") // check warnings errs := verifyErrors(t, warn, thisTest.ExpectedWarnings, "warning", continueOnErrors) assert.Equal(t, 0, errs) if DebugTest && errs > 0 { reportTest(t, path, res, thisTest.ExpectedMessages, "error", continueOnErrors) reportTest(t, path, warn, thisTest.ExpectedWarnings, "warning", continueOnErrors) } } func checkMustHalt(t *testing.T, haltOnErrors bool) { if t.Failed() && haltOnErrors { assert.FailNow(t, "test halted: stop testing on message checking error mode") return } } func testWalkSpecs(t *testing.T, tested ExpectedMap, haltOnErrors, continueOnErrors bool) filepath.WalkFunc { return func(path string, info os.FileInfo, _ error) error { thisTest, found := tested.Get(info.Name()) if info.IsDir() || !found { // skip return nil } t.Run(path, func(t *testing.T) { if !DebugTest { // when running in dev mode, run serially t.Parallel() } defer func() { thisTest.Tested = true thisTest.Failed = t.Failed() }() if !thisTest.ExpectedValid { expectInvalid(t, path, thisTest, continueOnErrors) checkMustHalt(t, haltOnErrors) } else { expectValid(t, path, thisTest, continueOnErrors) checkMustHalt(t, haltOnErrors) } }) return nil } } func recapTest(t *testing.T, config ExpectedMap) { recapFailed := false for k, v := range config { if !v.Tested { t.Logf("WARNING: %s configured but not tested (fixture not found)", k) recapFailed = true } else if v.Failed { t.Logf("ERROR: %s failed passing messages verification", k) recapFailed = true } } if !recapFailed { t.Log("INFO:We are good") } } func reportTest(t *testing.T, path string, res *Result, expectedMessages []ExpectedMessage, msgtype string, continueOnErrors bool) { const expected = "Expected " // Prints out a recap of error messages. To be enabled during development / test iterations verifiedErrors := make([]string, 0, 50) lines := make([]string, 0, 50) for _, e := range res.Errors { verifiedErrors = append(verifiedErrors, e.Error()) } t.Logf("DEVMODE:Recap of returned %s messages while validating %s ", msgtype, path) for _, v := range verifiedErrors { status := "Unexpected " + msgtype for _, s := range expectedMessages { if (s.WithContinueOnErrors && continueOnErrors) || !s.WithContinueOnErrors { if s.IsRegexp { if matched, _ := regexp.MatchString(s.Message, v); matched { status = expected + msgtype break } } else { if strings.Contains(v, s.Message) { status = expected + msgtype break } } } } lines = append(lines, fmt.Sprintf("[%s]%s", status, v)) } for _, s := range expectedMessages { if (s.WithContinueOnErrors && continueOnErrors) || !s.WithContinueOnErrors { status := "Missing " + msgtype for _, v := range verifiedErrors { if s.IsRegexp { if matched, _ := regexp.MatchString(s.Message, v); matched { status = expected + msgtype break } } else { if strings.Contains(v, s.Message) { status = expected + msgtype break } } } if status != expected+msgtype { lines = append(lines, fmt.Sprintf("[%s]%s", status, s.Message)) } } } if len(lines) > 0 { sort.Strings(lines) for _, line := range lines { t.Logf(line) } } } func verifyErrorsVsWarnings(t *testing.T, res, warn *Result) int { // First verification of result conventions: results are redundant, just a matter of presentation w := len(warn.Errors) if !assert.Len(t, res.Warnings, w) || !assert.Empty(t, warn.Warnings) || !assert.Subset(t, res.Warnings, warn.Errors) || !assert.Subset(t, warn.Errors, res.Warnings) { t.Log("Result equivalence errors vs warnings not verified") return 1 } return 0 } func verifyErrors(t *testing.T, res *Result, expectedMessages []ExpectedMessage, msgtype string, continueOnErrors bool) int { var numExpected, errs int verifiedErrors := make([]string, 0, 50) for _, e := range res.Errors { verifiedErrors = append(verifiedErrors, e.Error()) } for _, s := range expectedMessages { if (s.WithContinueOnErrors == true && continueOnErrors == true) || s.WithContinueOnErrors == false { numExpected++ } } // We got the expected number of messages (e.g. no duplicates, no uncontrolled side-effect, ...) if !assert.Len(t, verifiedErrors, numExpected, "unexpected number of %s messages returned. Wanted %d, got %d", msgtype, numExpected, len(verifiedErrors)) { errs++ } // Check that all expected messages are here for _, s := range expectedMessages { found := false if (s.WithContinueOnErrors == true && continueOnErrors == true) || s.WithContinueOnErrors == false { for _, v := range verifiedErrors { if s.IsRegexp { if matched, _ := regexp.MatchString(s.Message, v); matched { found = true break } } else { if strings.Contains(v, s.Message) { found = true break } } } if !assert.True(t, found, "Missing expected %s message: %s", msgtype, s.Message) { errs++ } } } // Check for no unexpected message for _, v := range verifiedErrors { found := false for _, s := range expectedMessages { if (s.WithContinueOnErrors == true && continueOnErrors == true) || s.WithContinueOnErrors == false { if s.IsRegexp { if matched, _ := regexp.MatchString(s.Message, v); matched { found = true break } } else { if strings.Contains(v, s.Message) { found = true break } } } } if !assert.True(t, found, "unexpected %s message: %s", msgtype, v) { errs++ } } return errs } func verifyLoadErrors(t *testing.T, err error, expectedMessages []ExpectedMessage) int { var errs int // Perform several matches on single error message // Process here error messages from loads (normally unit tested in the load package: // we just want to figure out how all this is captured at the validate package level. v := err.Error() for _, s := range expectedMessages { var found bool if s.IsRegexp { if found, _ = regexp.MatchString(s.Message, v); found { break } } else { if found = strings.Contains(v, s.Message); found { break } } if !assert.True(t, found, "unexpected load error: %s", v) { t.Logf("Expecting one of the following:") for _, s := range expectedMessages { smode := "Contains" if s.IsRegexp { smode = "MatchString" } t.Logf("[%s]:%s", smode, s.Message) } errs++ } } return errs } func testIssue(t *testing.T, path string, expectedNumErrors, expectedNumWarnings int) { res, _ := loadAndValidate(t, path) if expectedNumErrors > -1 && !assert.Len(t, res.Errors, expectedNumErrors) { t.Log("Returned errors:") for _, e := range res.Errors { t.Logf("%v", e) } } if expectedNumWarnings > -1 && !assert.Len(t, res.Warnings, expectedNumWarnings) { t.Log("Returned warnings:") for _, e := range res.Warnings { t.Logf("%v", e) } } } // Test unitary fixture for dev and bug fixing func Test_SingleFixture(t *testing.T) { t.SkipNow() path := filepath.Join("fixtures", "validation", "fixture-1231.yaml") testIssue(t, path, -1, -1) } validate-0.24.0/object_validator.go000066400000000000000000000267421457312750000172470ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "fmt" "reflect" "strings" "github.com/go-openapi/errors" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" ) type objectValidator struct { Path string In string MaxProperties *int64 MinProperties *int64 Required []string Properties map[string]spec.Schema AdditionalProperties *spec.SchemaOrBool PatternProperties map[string]spec.Schema Root interface{} KnownFormats strfmt.Registry Options *SchemaValidatorOptions splitPath []string } func newObjectValidator(path, in string, maxProperties, minProperties *int64, required []string, properties spec.SchemaProperties, additionalProperties *spec.SchemaOrBool, patternProperties spec.SchemaProperties, root interface{}, formats strfmt.Registry, opts *SchemaValidatorOptions) *objectValidator { if opts == nil { opts = new(SchemaValidatorOptions) } var v *objectValidator if opts.recycleValidators { v = pools.poolOfObjectValidators.BorrowValidator() } else { v = new(objectValidator) } v.Path = path v.In = in v.MaxProperties = maxProperties v.MinProperties = minProperties v.Required = required v.Properties = properties v.AdditionalProperties = additionalProperties v.PatternProperties = patternProperties v.Root = root v.KnownFormats = formats v.Options = opts v.splitPath = strings.Split(v.Path, ".") return v } func (o *objectValidator) SetPath(path string) { o.Path = path o.splitPath = strings.Split(path, ".") } func (o *objectValidator) Applies(source interface{}, kind reflect.Kind) bool { // TODO: this should also work for structs // there is a problem in the type validator where it will be unhappy about null values // so that requires more testing _, isSchema := source.(*spec.Schema) return isSchema && (kind == reflect.Map || kind == reflect.Struct) } func (o *objectValidator) isProperties() bool { p := o.splitPath return len(p) > 1 && p[len(p)-1] == jsonProperties && p[len(p)-2] != jsonProperties } func (o *objectValidator) isDefault() bool { p := o.splitPath return len(p) > 1 && p[len(p)-1] == jsonDefault && p[len(p)-2] != jsonDefault } func (o *objectValidator) isExample() bool { p := o.splitPath return len(p) > 1 && (p[len(p)-1] == swaggerExample || p[len(p)-1] == swaggerExamples) && p[len(p)-2] != swaggerExample } func (o *objectValidator) checkArrayMustHaveItems(res *Result, val map[string]interface{}) { // for swagger 2.0 schemas, there is an additional constraint to have array items defined explicitly. // with pure jsonschema draft 4, one may have arrays with undefined items (i.e. any type). if val == nil { return } t, typeFound := val[jsonType] if !typeFound { return } tpe, isString := t.(string) if !isString || tpe != arrayType { return } item, itemsKeyFound := val[jsonItems] if itemsKeyFound { return } res.AddErrors(errors.Required(jsonItems, o.Path, item)) } func (o *objectValidator) checkItemsMustBeTypeArray(res *Result, val map[string]interface{}) { if val == nil { return } if o.isProperties() || o.isDefault() || o.isExample() { return } _, itemsKeyFound := val[jsonItems] if !itemsKeyFound { return } t, typeFound := val[jsonType] if !typeFound { // there is no type res.AddErrors(errors.Required(jsonType, o.Path, t)) } if tpe, isString := t.(string); !isString || tpe != arrayType { res.AddErrors(errors.InvalidType(o.Path, o.In, arrayType, nil)) } } func (o *objectValidator) precheck(res *Result, val map[string]interface{}) { if o.Options.EnableArrayMustHaveItemsCheck { o.checkArrayMustHaveItems(res, val) } if o.Options.EnableObjectArrayTypeCheck { o.checkItemsMustBeTypeArray(res, val) } } func (o *objectValidator) Validate(data interface{}) *Result { if o.Options.recycleValidators { defer func() { o.redeem() }() } var val map[string]interface{} if data != nil { var ok bool val, ok = data.(map[string]interface{}) if !ok { return errorHelp.sErr(invalidObjectMsg(o.Path, o.In), o.Options.recycleResult) } } numKeys := int64(len(val)) if o.MinProperties != nil && numKeys < *o.MinProperties { return errorHelp.sErr(errors.TooFewProperties(o.Path, o.In, *o.MinProperties), o.Options.recycleResult) } if o.MaxProperties != nil && numKeys > *o.MaxProperties { return errorHelp.sErr(errors.TooManyProperties(o.Path, o.In, *o.MaxProperties), o.Options.recycleResult) } var res *Result if o.Options.recycleResult { res = pools.poolOfResults.BorrowResult() } else { res = new(Result) } o.precheck(res, val) // check validity of field names if o.AdditionalProperties != nil && !o.AdditionalProperties.Allows { // Case: additionalProperties: false o.validateNoAdditionalProperties(val, res) } else { // Cases: empty additionalProperties (implying: true), or additionalProperties: true, or additionalProperties: { <> } o.validateAdditionalProperties(val, res) } o.validatePropertiesSchema(val, res) // Check patternProperties // TODO: it looks like we have done that twice in many cases for key, value := range val { _, regularProperty := o.Properties[key] matched, _, patterns := o.validatePatternProperty(key, value, res) // applies to regular properties as well if regularProperty || !matched { continue } for _, pName := range patterns { if v, ok := o.PatternProperties[pName]; ok { r := newSchemaValidator(&v, o.Root, o.Path+"."+key, o.KnownFormats, o.Options).Validate(value) res.mergeForField(data.(map[string]interface{}), key, r) } } } return res } func (o *objectValidator) validateNoAdditionalProperties(val map[string]interface{}, res *Result) { for k := range val { if k == "$schema" || k == "id" { // special properties "$schema" and "id" are ignored continue } _, regularProperty := o.Properties[k] if regularProperty { continue } matched := false for pk := range o.PatternProperties { re, err := compileRegexp(pk) if err != nil { continue } if matches := re.MatchString(k); matches { matched = true break } } if matched { continue } res.AddErrors(errors.PropertyNotAllowed(o.Path, o.In, k)) // BUG(fredbi): This section should move to a part dedicated to spec validation as // it will conflict with regular schemas where a property "headers" is defined. // // Croaks a more explicit message on top of the standard one // on some recognized cases. // // NOTE: edge cases with invalid type assertion are simply ignored here. // NOTE: prefix your messages here by "IMPORTANT!" so there are not filtered // by higher level callers (the IMPORTANT! tag will be eventually // removed). if k != "headers" || val[k] == nil { continue } // $ref is forbidden in header headers, mapOk := val[k].(map[string]interface{}) if !mapOk { continue } for headerKey, headerBody := range headers { if headerBody == nil { continue } headerSchema, mapOfMapOk := headerBody.(map[string]interface{}) if !mapOfMapOk { continue } _, found := headerSchema["$ref"] if !found { continue } refString, stringOk := headerSchema["$ref"].(string) if !stringOk { continue } msg := strings.Join([]string{", one may not use $ref=\":", refString, "\""}, "") res.AddErrors(refNotAllowedInHeaderMsg(o.Path, headerKey, msg)) /* case "$ref": if val[k] != nil { // TODO: check context of that ref: warn about siblings, check against invalid context } */ } } } func (o *objectValidator) validateAdditionalProperties(val map[string]interface{}, res *Result) { for key, value := range val { _, regularProperty := o.Properties[key] if regularProperty { continue } // Validates property against "patternProperties" if applicable // BUG(fredbi): succeededOnce is always false // NOTE: how about regular properties which do not match patternProperties? matched, succeededOnce, _ := o.validatePatternProperty(key, value, res) if matched || succeededOnce { continue } if o.AdditionalProperties == nil || o.AdditionalProperties.Schema == nil { continue } // Cases: properties which are not regular properties and have not been matched by the PatternProperties validator // AdditionalProperties as Schema r := newSchemaValidator(o.AdditionalProperties.Schema, o.Root, o.Path+"."+key, o.KnownFormats, o.Options).Validate(value) res.mergeForField(val, key, r) } // Valid cases: additionalProperties: true or undefined } func (o *objectValidator) validatePropertiesSchema(val map[string]interface{}, res *Result) { createdFromDefaults := map[string]struct{}{} // Property types: // - regular Property pSchema := pools.poolOfSchemas.BorrowSchema() // recycle a spec.Schema object which lifespan extends only to the validation of properties defer func() { pools.poolOfSchemas.RedeemSchema(pSchema) }() for pName := range o.Properties { *pSchema = o.Properties[pName] var rName string if o.Path == "" { rName = pName } else { rName = o.Path + "." + pName } // Recursively validates each property against its schema v, ok := val[pName] if ok { r := newSchemaValidator(pSchema, o.Root, rName, o.KnownFormats, o.Options).Validate(v) res.mergeForField(val, pName, r) continue } if pSchema.Default != nil { // if a default value is defined, creates the property from defaults // NOTE: JSON schema does not enforce default values to be valid against schema. Swagger does. createdFromDefaults[pName] = struct{}{} if !o.Options.skipSchemataResult { res.addPropertySchemata(val, pName, pSchema) // this shallow-clones the content of the pSchema pointer } } } if len(o.Required) == 0 { return } // Check required properties for _, k := range o.Required { v, ok := val[k] if ok { continue } _, isCreatedFromDefaults := createdFromDefaults[k] if isCreatedFromDefaults { continue } res.AddErrors(errors.Required(fmt.Sprintf("%s.%s", o.Path, k), o.In, v)) } } // TODO: succeededOnce is not used anywhere func (o *objectValidator) validatePatternProperty(key string, value interface{}, result *Result) (bool, bool, []string) { if len(o.PatternProperties) == 0 { return false, false, nil } matched := false succeededOnce := false patterns := make([]string, 0, len(o.PatternProperties)) schema := pools.poolOfSchemas.BorrowSchema() defer func() { pools.poolOfSchemas.RedeemSchema(schema) }() for k := range o.PatternProperties { re, err := compileRegexp(k) if err != nil { continue } match := re.MatchString(key) if !match { continue } *schema = o.PatternProperties[k] patterns = append(patterns, k) matched = true validator := newSchemaValidator(schema, o.Root, fmt.Sprintf("%s.%s", o.Path, key), o.KnownFormats, o.Options) res := validator.Validate(value) result.Merge(res) } return matched, succeededOnce, patterns } func (o *objectValidator) redeem() { pools.poolOfObjectValidators.RedeemValidator(o) } validate-0.24.0/object_validator_test.go000066400000000000000000000234711457312750000203020ustar00rootroot00000000000000// Copyright 2017 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "reflect" "strings" "testing" "github.com/go-openapi/spec" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func itemsFixture() map[string]interface{} { return map[string]interface{}{ "type": "array", "items": "dummy", } } func expectAllValid(t *testing.T, ov EntityValidator, dataValid, dataInvalid map[string]interface{}) { res := ov.Validate(dataValid) assert.Empty(t, res.Errors) res = ov.Validate(dataInvalid) assert.Empty(t, res.Errors) } func expectOnlyInvalid(t *testing.T, ov EntityValidator, dataValid, dataInvalid map[string]interface{}) { res := ov.Validate(dataValid) assert.Empty(t, res.Errors) res = ov.Validate(dataInvalid) assert.NotEmpty(t, res.Errors) } func TestItemsMustBeTypeArray(t *testing.T) { ov := newObjectValidator("", "", nil, nil, nil, nil, nil, nil, nil, nil, nil) dataValid := itemsFixture() dataInvalid := map[string]interface{}{ "type": "object", "items": "dummy", } expectAllValid(t, ov, dataValid, dataInvalid) ov.Options.EnableObjectArrayTypeCheck = true expectOnlyInvalid(t, ov, dataValid, dataInvalid) } func TestItemsMustHaveType(t *testing.T) { ov := newObjectValidator("", "", nil, nil, nil, nil, nil, nil, nil, nil, nil) dataValid := itemsFixture() dataInvalid := map[string]interface{}{ "items": "dummy", } expectAllValid(t, ov, dataValid, dataInvalid) ov.Options.EnableObjectArrayTypeCheck = true expectOnlyInvalid(t, ov, dataValid, dataInvalid) } func TestTypeArrayMustHaveItems(t *testing.T) { ov := newObjectValidator("", "", nil, nil, nil, nil, nil, nil, nil, nil, nil) dataValid := itemsFixture() dataInvalid := map[string]interface{}{ "type": "array", "key": "dummy", } expectAllValid(t, ov, dataValid, dataInvalid) ov.Options.EnableArrayMustHaveItemsCheck = true expectOnlyInvalid(t, ov, dataValid, dataInvalid) } // Test edge cases in object_validator which are difficult // to simulate with specs // (this one is a trivial, just to check all methods are filled) func TestObjectValidator_EdgeCases(t *testing.T) { s := newObjectValidator("", "", nil, nil, nil, nil, nil, nil, nil, nil, nil) s.SetPath("path") assert.Equal(t, "path", s.Path) } func TestObjectValidatorApply(t *testing.T) { s := newObjectValidator("", "", nil, nil, nil, nil, nil, nil, nil, nil, nil) require.True(t, s.Applies(&spec.Schema{}, reflect.Map)) require.False(t, s.Applies(&spec.Response{}, reflect.Map)) require.False(t, s.Applies(&struct{}{}, reflect.Map)) } func TestObjectValidatorPatternProperties(t *testing.T) { patternWithValid := spec.SchemaProperties{ "valid": spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, }, }, "#(.((garbled": spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, }, }, } patternGarbled := spec.SchemaProperties{ "#(.((garbled": spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, }, }, } t.Run("should ignore invalid regexp in pattern properties", func(t *testing.T) { s := newObjectValidator("test", "body", nil, nil, nil, nil, nil, patternWithValid, nil, nil, nil) res := s.Validate(map[string]interface{}{"valid": "test_string"}) require.NotNil(t, res) require.Empty(t, res.Errors) }) t.Run("should report forbidden property when invalid regexp in pattern properties", func(t *testing.T) { s := newObjectValidator("test", "body", nil, nil, nil, nil, nil, patternGarbled, nil, nil, nil) res := s.Validate(map[string]interface{}{"valid": "test_string"}) require.NotNil(t, res) require.Empty(t, res.Errors) }) t.Run("should ignore invalid regexp in pattern properties of additional properties", func(t *testing.T) { s := newObjectValidator("test", "body", nil, nil, nil, nil, &spec.SchemaOrBool{ Schema: &spec.Schema{}, Allows: false, }, patternWithValid, nil, nil, nil) res := s.Validate(map[string]interface{}{"valid": "test_string"}) require.NotNil(t, res) require.Empty(t, res.Errors) }) t.Run("should report forbidden property when invalid regexp in pattern properties of additional properties", func(t *testing.T) { s := newObjectValidator("test", "body", nil, nil, nil, nil, &spec.SchemaOrBool{ Schema: &spec.Schema{}, Allows: false, }, patternGarbled, nil, nil, nil) res := s.Validate(map[string]interface{}{"valid": "test_string"}) require.NotNil(t, res) require.Len(t, res.Errors, 1) require.ErrorContains(t, res.Errors[0], "forbidden property") }) } func TestObjectValidatorNilData(t *testing.T) { t.Run("object Validate should NOT panic on nil data", func(t *testing.T) { s := newObjectValidator("", "", nil, nil, nil, nil, nil, nil, nil, nil, nil) require.NotPanics(t, func() { _ = s.Validate(nil) }) res := s.Validate(nil) require.NotNil(t, res) require.Empty(t, res.Errors) }) t.Run("object Validate should validate required on nil data", func(t *testing.T) { s := newObjectValidator("", "", nil, nil, []string{"wanted"}, nil, nil, nil, nil, nil, nil) res := s.Validate(nil) require.NotNil(t, res) require.NotEmpty(t, res.Errors) }) t.Run("object Validate should NOT panic on unexpected input", func(t *testing.T) { s := newObjectValidator("", "", nil, nil, []string{"wanted"}, nil, nil, nil, nil, nil, nil) res := s.Validate(map[string]string{"wanted": "not expected"}) require.NotNil(t, res) require.Len(t, res.Errors, 1) require.ErrorContains(t, res.Errors[0], "expected an object") }) t.Run("object Validate should NOT panic on nil input (with array type check)", func(t *testing.T) { s := newObjectValidator("", "", nil, nil, []string{"wanted"}, nil, nil, nil, nil, nil, &SchemaValidatorOptions{ EnableArrayMustHaveItemsCheck: true, EnableObjectArrayTypeCheck: true, }) res := s.Validate(nil) require.NotNil(t, res) require.Len(t, res.Errors, 1) require.ErrorContains(t, res.Errors[0], "wanted is required") }) } func TestObjectValidatorWithHeaderProperty(t *testing.T) { t.Run("should report extra information about forbidden $ref in this context", func(t *testing.T) { s := newObjectValidator("test", "body", nil, nil, nil, nil, &spec.SchemaOrBool{ Schema: &spec.Schema{}, Allows: false, }, nil, nil, nil, nil) res := s.Validate(map[string]interface{}{ "headers": map[string]interface{}{ "X-Custom": map[string]interface{}{ "$ref": "#/definitions/myHeader", }, }, }) require.NotNil(t, res) require.Len(t, res.Errors, 2) found := 0 for _, err := range res.Errors { switch { case strings.Contains(err.Error(), "forbidden property"): found++ case strings.Contains(err.Error(), "$ref are not allowed in headers"): found++ } } require.Equal(t, 2, found) }) t.Run("should NOT report extra information when header is not detected", func(t *testing.T) { s := newObjectValidator("test", "body", nil, nil, nil, nil, &spec.SchemaOrBool{ Schema: &spec.Schema{}, Allows: false, }, nil, nil, nil, nil) t.Run("when key is not headers", func(t *testing.T) { res := s.Validate(map[string]interface{}{ "Headers": map[string]interface{}{ "X-Custom": map[string]interface{}{ "$ref": "#/definitions/myHeader", }, }, }) require.NotNil(t, res) require.Len(t, res.Errors, 1) }) t.Run("when key is not the expected map", func(t *testing.T) { res := s.Validate(map[string]interface{}{ "headers": map[string]string{ "X-Custom": "#/definitions/myHeader", }, }) require.NotNil(t, res) require.Len(t, res.Errors, 1) }) t.Run("when key content not the expected map", func(t *testing.T) { res := s.Validate(map[string]interface{}{ "headers": map[string]interface{}{ "X-Custom": 1, }, }) require.NotNil(t, res) require.Len(t, res.Errors, 1) }) t.Run("when key content not the expected map", func(t *testing.T) { res := s.Validate(map[string]interface{}{ "headers": map[string]interface{}{ "X-Custom": nil, }, }) require.NotNil(t, res) require.Len(t, res.Errors, 1) }) t.Run("when header is not a valid $ref", func(t *testing.T) { res := s.Validate(map[string]interface{}{ "headers": map[string]interface{}{ "X-Custom": map[string]interface{}{ "$ref": 1, }, }, }) require.NotNil(t, res) require.Len(t, res.Errors, 1) }) t.Run("when header is not a $ref", func(t *testing.T) { res := s.Validate(map[string]interface{}{ "headers": map[string]interface{}{ "X-Custom": map[string]interface{}{ "ref": "#/definitions/myHeader", }, }, }) require.NotNil(t, res) require.Len(t, res.Errors, 1) }) }) } func TestObjectValidatorWithDefault(t *testing.T) { /* maxProperties, minProperties *int64, required []string, properties spec.SchemaProperties, additionalProperties *spec.SchemaOrBool, patternProperties spec.SchemaProperties, root interface{}, formats strfmt.Registry, opts *SchemaValidatorOptions) *objectValidator { */ t.Run("should accept required populated with a default", func(t *testing.T) { s := newObjectValidator("test", "body", nil, nil, []string{"wanted"}, spec.SchemaProperties{ "wanted": spec.Schema{ SchemaProps: spec.SchemaProps{ Default: "default_value"}, }, }, nil, nil, nil, nil, nil) res := s.Validate(nil) require.NotNil(t, res) require.Empty(t, res.Errors) }) } validate-0.24.0/options.go000066400000000000000000000043441457312750000154210ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import "sync" // Opts specifies validation options for a SpecValidator. // // NOTE: other options might be needed, for example a go-swagger specific mode. type Opts struct { ContinueOnErrors bool // true: continue reporting errors, even if spec is invalid // StrictPathParamUniqueness enables a strict validation of paths that include // path parameters. When true, it will enforce that for each method, the path // is unique, regardless of path parameters such that GET:/petstore/{id} and // GET:/petstore/{pet} anre considered duplicate paths. // // Consider disabling if path parameters can include slashes such as // GET:/v1/{shelve} and GET:/v1/{book}, where the IDs are "shelve/*" and // /"shelve/*/book/*" respectively. StrictPathParamUniqueness bool SkipSchemataResult bool } var ( defaultOpts = Opts{ // default is to stop validation on errors ContinueOnErrors: false, // StrictPathParamUniqueness is defaulted to true. This maintains existing // behavior. StrictPathParamUniqueness: true, } defaultOptsMutex = &sync.Mutex{} ) // SetContinueOnErrors sets global default behavior regarding spec validation errors reporting. // // For extended error reporting, you most likely want to set it to true. // For faster validation, it's better to give up early when a spec is detected as invalid: set it to false (this is the default). // // Setting this mode does NOT affect the validation status. // // NOTE: this method affects global defaults. It is not suitable for a concurrent usage. func SetContinueOnErrors(c bool) { defer defaultOptsMutex.Unlock() defaultOptsMutex.Lock() defaultOpts.ContinueOnErrors = c } validate-0.24.0/options_test.go000066400000000000000000000002531457312750000164530ustar00rootroot00000000000000package validate import ( "testing" ) // This test must be synchronized to avoid issues with -race // TODO(TEST) func TestOptions_SetContinueOnErrors(_ *testing.T) { } validate-0.24.0/parameter_validator_test.go000066400000000000000000000207231457312750000210110ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "reflect" "testing" "github.com/go-openapi/errors" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // common validations: enum, allOf, anyOf, oneOf, not, definitions func maxError(param *spec.Parameter, data interface{}) *errors.Validation { return errors.ExceedsMaximum(param.Name, param.In, *param.Maximum, param.ExclusiveMaximum, data) } func minError(param *spec.Parameter, data interface{}) *errors.Validation { return errors.ExceedsMinimum(param.Name, param.In, *param.Minimum, param.ExclusiveMinimum, data) } func multipleOfError(param *spec.Parameter, data interface{}) *errors.Validation { return errors.NotMultipleOf(param.Name, param.In, *param.MultipleOf, data) } func makeFloat(data interface{}) float64 { val := reflect.ValueOf(data) knd := val.Kind() switch { case knd >= reflect.Int && knd <= reflect.Int64: return float64(val.Int()) case knd >= reflect.Uint && knd <= reflect.Uint64: return float64(val.Uint()) default: return val.Float() } } func TestNumberParameterValidation(t *testing.T) { values := [][]interface{}{ {23, 49, 56, 21, 14, 35, 28, 7, 42}, {uint(23), uint(49), uint(56), uint(21), uint(14), uint(35), uint(28), uint(7), uint(42)}, {float64(23), float64(49), float64(56), float64(21), float64(14), float64(35), float64(28), float64(7), float64(42)}, } for _, v := range values { factorParam := spec.QueryParam("factor") factorParam.WithMaximum(makeFloat(v[1]), false) factorParam.WithMinimum(makeFloat(v[3]), false) factorParam.WithMultipleOf(makeFloat(v[7])) factorParam.WithEnum(v[3], v[6], v[8], v[1]) factorParam.Typed("number", "double") validator := NewParamValidator(factorParam, strfmt.Default) // MultipleOf err := validator.Validate(v[0]) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, multipleOfError(factorParam, v[0]), err.Errors[0].Error()) // Maximum err = validator.Validate(v[1]) assert.True(t, err == nil || err.IsValid()) if err != nil { assert.Empty(t, err.Errors) } err = validator.Validate(v[2]) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, maxError(factorParam, v[1]), err.Errors[0].Error()) // ExclusiveMaximum factorParam.ExclusiveMaximum = true // requires a new items validator because this is set a creation time validator = NewParamValidator(factorParam, strfmt.Default) err = validator.Validate(v[1]) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, maxError(factorParam, v[1]), err.Errors[0].Error()) // Minimum err = validator.Validate(v[3]) assert.True(t, err == nil || err.IsValid()) err = validator.Validate(v[4]) assert.True(t, err.HasErrors()) require.EqualError(t, minError(factorParam, v[4]), err.Errors[0].Error()) // ExclusiveMinimum factorParam.ExclusiveMinimum = true // requires a new items validator because this is set a creation time validator = NewParamValidator(factorParam, strfmt.Default) err = validator.Validate(v[3]) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, minError(factorParam, v[3]), err.Errors[0].Error()) // Enum err = validator.Validate(v[5]) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, enumFail(factorParam, v[5]), err.Errors[0].Error()) err = validator.Validate(v[6]) assert.True(t, err == nil || err.IsValid()) } // Not required in a parameter or items // AllOf // AnyOf // OneOf // Not // Definitions } func maxLengthError(param *spec.Parameter, data interface{}) *errors.Validation { return errors.TooLong(param.Name, param.In, *param.MaxLength, data) } func minLengthError(param *spec.Parameter, data interface{}) *errors.Validation { return errors.TooShort(param.Name, param.In, *param.MinLength, data) } func patternFail(param *spec.Parameter, data interface{}) *errors.Validation { return errors.FailedPattern(param.Name, param.In, param.Pattern, data) } func enumFail(param *spec.Parameter, data interface{}) *errors.Validation { return errors.EnumFail(param.Name, param.In, data, param.Enum) } func TestStringParameterValidation(t *testing.T) { nameParam := spec.QueryParam("name").AsRequired().WithMinLength(3).WithMaxLength(5).WithPattern(`^[a-z]+$`).Typed(stringType, "") nameParam.WithEnum("aaa", "bbb", "ccc") validator := NewParamValidator(nameParam, strfmt.Default) // required data := "" err := validator.Validate(data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, requiredError(nameParam, data), err.Errors[0].Error()) // MaxLength data = "abcdef" err = validator.Validate(data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, maxLengthError(nameParam, data), err.Errors[0].Error()) // MinLength data = "a" err = validator.Validate(data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, minLengthError(nameParam, data), err.Errors[0].Error()) // Pattern data = "a394" err = validator.Validate(data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, patternFail(nameParam, data), err.Errors[0].Error()) // Enum data = "abcde" err = validator.Validate(data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, enumFail(nameParam, data), err.Errors[0].Error()) // Valid passes err = validator.Validate("bbb") assert.True(t, err == nil || err.IsValid()) // Not required in a parameter or items // AllOf // AnyOf // OneOf // Not // Definitions } func minItemsError(param *spec.Parameter, data interface{}) *errors.Validation { return errors.TooFewItems(param.Name, param.In, *param.MinItems, data) } func maxItemsError(param *spec.Parameter, data interface{}) *errors.Validation { return errors.TooManyItems(param.Name, param.In, *param.MaxItems, data) } func duplicatesError(param *spec.Parameter) *errors.Validation { return errors.DuplicateItems(param.Name, param.In) } func TestArrayParameterValidation(t *testing.T) { tagsParam := spec.QueryParam("tags").CollectionOf(stringItems(), "").WithMinItems(1).WithMaxItems(5).UniqueValues() tagsParam.WithEnum([]string{"a", "a", "a"}, []string{"b", "b", "b"}, []string{"c", "c", "c"}) validator := NewParamValidator(tagsParam, strfmt.Default) // MinItems data := []string{} err := validator.Validate(data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, minItemsError(tagsParam, len(data)), err.Errors[0].Error()) // MaxItems data = []string{"a", "b", "c", "d", "e", "f"} err = validator.Validate(data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, maxItemsError(tagsParam, len(data)), err.Errors[0].Error()) // UniqueItems err = validator.Validate([]string{"a", "a"}) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, duplicatesError(tagsParam), err.Errors[0].Error()) // Enum err = validator.Validate([]string{"a", "b", "c"}) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, enumFail(tagsParam, []string{"a", "b", "c"}), err.Errors[0].Error()) // Items strItems := spec.NewItems().WithMinLength(3).WithMaxLength(5).WithPattern(`^[a-z]+$`).Typed(stringType, "") tagsParam = spec.QueryParam("tags").CollectionOf(strItems, "").WithMinItems(1).WithMaxItems(5).UniqueValues() validator = NewParamValidator(tagsParam, strfmt.Default) data = []string{"aa", "bbb", "ccc"} err = validator.Validate(data) assert.True(t, err.HasErrors()) require.NotEmpty(t, err.Errors) require.EqualError(t, minLengthErrorItems("tags.0", tagsParam.In, strItems, data[0]), err.Errors[0].Error()) // Not required in a parameter or items // Additional items // AllOf // AnyOf // OneOf // Not // Definitions } validate-0.24.0/pools.go000066400000000000000000000157741457312750000150730ustar00rootroot00000000000000//go:build !validatedebug package validate import ( "sync" "github.com/go-openapi/spec" ) var pools allPools func init() { resetPools() } func resetPools() { // NOTE: for testing purpose, we might want to reset pools after calling Validate twice. // The pool is corrupted in that case: calling Put twice inserts a duplicate in the pool // and further calls to Get are mishandled. pools = allPools{ poolOfSchemaValidators: schemaValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &SchemaValidator{} return s }, }, }, poolOfObjectValidators: objectValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &objectValidator{} return s }, }, }, poolOfSliceValidators: sliceValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &schemaSliceValidator{} return s }, }, }, poolOfItemsValidators: itemsValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &itemsValidator{} return s }, }, }, poolOfBasicCommonValidators: basicCommonValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &basicCommonValidator{} return s }, }, }, poolOfHeaderValidators: headerValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &HeaderValidator{} return s }, }, }, poolOfParamValidators: paramValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &ParamValidator{} return s }, }, }, poolOfBasicSliceValidators: basicSliceValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &basicSliceValidator{} return s }, }, }, poolOfNumberValidators: numberValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &numberValidator{} return s }, }, }, poolOfStringValidators: stringValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &stringValidator{} return s }, }, }, poolOfSchemaPropsValidators: schemaPropsValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &schemaPropsValidator{} return s }, }, }, poolOfFormatValidators: formatValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &formatValidator{} return s }, }, }, poolOfTypeValidators: typeValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &typeValidator{} return s }, }, }, poolOfSchemas: schemasPool{ Pool: &sync.Pool{ New: func() any { s := &spec.Schema{} return s }, }, }, poolOfResults: resultsPool{ Pool: &sync.Pool{ New: func() any { s := &Result{} return s }, }, }, } } type ( allPools struct { // memory pools for all validator objects. // // Each pool can be borrowed from and redeemed to. poolOfSchemaValidators schemaValidatorsPool poolOfObjectValidators objectValidatorsPool poolOfSliceValidators sliceValidatorsPool poolOfItemsValidators itemsValidatorsPool poolOfBasicCommonValidators basicCommonValidatorsPool poolOfHeaderValidators headerValidatorsPool poolOfParamValidators paramValidatorsPool poolOfBasicSliceValidators basicSliceValidatorsPool poolOfNumberValidators numberValidatorsPool poolOfStringValidators stringValidatorsPool poolOfSchemaPropsValidators schemaPropsValidatorsPool poolOfFormatValidators formatValidatorsPool poolOfTypeValidators typeValidatorsPool poolOfSchemas schemasPool poolOfResults resultsPool } schemaValidatorsPool struct { *sync.Pool } objectValidatorsPool struct { *sync.Pool } sliceValidatorsPool struct { *sync.Pool } itemsValidatorsPool struct { *sync.Pool } basicCommonValidatorsPool struct { *sync.Pool } headerValidatorsPool struct { *sync.Pool } paramValidatorsPool struct { *sync.Pool } basicSliceValidatorsPool struct { *sync.Pool } numberValidatorsPool struct { *sync.Pool } stringValidatorsPool struct { *sync.Pool } schemaPropsValidatorsPool struct { *sync.Pool } formatValidatorsPool struct { *sync.Pool } typeValidatorsPool struct { *sync.Pool } schemasPool struct { *sync.Pool } resultsPool struct { *sync.Pool } ) func (p schemaValidatorsPool) BorrowValidator() *SchemaValidator { return p.Get().(*SchemaValidator) } func (p schemaValidatorsPool) RedeemValidator(s *SchemaValidator) { // NOTE: s might be nil. In that case, Put is a noop. p.Put(s) } func (p objectValidatorsPool) BorrowValidator() *objectValidator { return p.Get().(*objectValidator) } func (p objectValidatorsPool) RedeemValidator(s *objectValidator) { p.Put(s) } func (p sliceValidatorsPool) BorrowValidator() *schemaSliceValidator { return p.Get().(*schemaSliceValidator) } func (p sliceValidatorsPool) RedeemValidator(s *schemaSliceValidator) { p.Put(s) } func (p itemsValidatorsPool) BorrowValidator() *itemsValidator { return p.Get().(*itemsValidator) } func (p itemsValidatorsPool) RedeemValidator(s *itemsValidator) { p.Put(s) } func (p basicCommonValidatorsPool) BorrowValidator() *basicCommonValidator { return p.Get().(*basicCommonValidator) } func (p basicCommonValidatorsPool) RedeemValidator(s *basicCommonValidator) { p.Put(s) } func (p headerValidatorsPool) BorrowValidator() *HeaderValidator { return p.Get().(*HeaderValidator) } func (p headerValidatorsPool) RedeemValidator(s *HeaderValidator) { p.Put(s) } func (p paramValidatorsPool) BorrowValidator() *ParamValidator { return p.Get().(*ParamValidator) } func (p paramValidatorsPool) RedeemValidator(s *ParamValidator) { p.Put(s) } func (p basicSliceValidatorsPool) BorrowValidator() *basicSliceValidator { return p.Get().(*basicSliceValidator) } func (p basicSliceValidatorsPool) RedeemValidator(s *basicSliceValidator) { p.Put(s) } func (p numberValidatorsPool) BorrowValidator() *numberValidator { return p.Get().(*numberValidator) } func (p numberValidatorsPool) RedeemValidator(s *numberValidator) { p.Put(s) } func (p stringValidatorsPool) BorrowValidator() *stringValidator { return p.Get().(*stringValidator) } func (p stringValidatorsPool) RedeemValidator(s *stringValidator) { p.Put(s) } func (p schemaPropsValidatorsPool) BorrowValidator() *schemaPropsValidator { return p.Get().(*schemaPropsValidator) } func (p schemaPropsValidatorsPool) RedeemValidator(s *schemaPropsValidator) { p.Put(s) } func (p formatValidatorsPool) BorrowValidator() *formatValidator { return p.Get().(*formatValidator) } func (p formatValidatorsPool) RedeemValidator(s *formatValidator) { p.Put(s) } func (p typeValidatorsPool) BorrowValidator() *typeValidator { return p.Get().(*typeValidator) } func (p typeValidatorsPool) RedeemValidator(s *typeValidator) { p.Put(s) } func (p schemasPool) BorrowSchema() *spec.Schema { return p.Get().(*spec.Schema) } func (p schemasPool) RedeemSchema(s *spec.Schema) { p.Put(s) } func (p resultsPool) BorrowResult() *Result { return p.Get().(*Result).cleared() } func (p resultsPool) RedeemResult(s *Result) { if s == emptyResult { return } p.Put(s) } validate-0.24.0/pools_debug.go000066400000000000000000000605061457312750000162320ustar00rootroot00000000000000//go:build validatedebug package validate import ( "fmt" "runtime" "sync" "testing" "github.com/go-openapi/spec" ) // This version of the pools is to be used for debugging and testing, with build tag "validatedebug". // // In this mode, the pools are tracked for allocation and redemption of borrowed objects, so we can // verify a few behaviors of the validators. The debug pools panic when an invalid usage pattern is detected. var pools allPools func init() { resetPools() } func resetPools() { // NOTE: for testing purpose, we might want to reset pools after calling Validate twice. // The pool is corrupted in that case: calling Put twice inserts a duplicate in the pool // and further calls to Get are mishandled. pools = allPools{ poolOfSchemaValidators: schemaValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &SchemaValidator{} return s }, }, debugMap: make(map[*SchemaValidator]status), allocMap: make(map[*SchemaValidator]string), redeemMap: make(map[*SchemaValidator]string), }, poolOfObjectValidators: objectValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &objectValidator{} return s }, }, debugMap: make(map[*objectValidator]status), allocMap: make(map[*objectValidator]string), redeemMap: make(map[*objectValidator]string), }, poolOfSliceValidators: sliceValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &schemaSliceValidator{} return s }, }, debugMap: make(map[*schemaSliceValidator]status), allocMap: make(map[*schemaSliceValidator]string), redeemMap: make(map[*schemaSliceValidator]string), }, poolOfItemsValidators: itemsValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &itemsValidator{} return s }, }, debugMap: make(map[*itemsValidator]status), allocMap: make(map[*itemsValidator]string), redeemMap: make(map[*itemsValidator]string), }, poolOfBasicCommonValidators: basicCommonValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &basicCommonValidator{} return s }, }, debugMap: make(map[*basicCommonValidator]status), allocMap: make(map[*basicCommonValidator]string), redeemMap: make(map[*basicCommonValidator]string), }, poolOfHeaderValidators: headerValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &HeaderValidator{} return s }, }, debugMap: make(map[*HeaderValidator]status), allocMap: make(map[*HeaderValidator]string), redeemMap: make(map[*HeaderValidator]string), }, poolOfParamValidators: paramValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &ParamValidator{} return s }, }, debugMap: make(map[*ParamValidator]status), allocMap: make(map[*ParamValidator]string), redeemMap: make(map[*ParamValidator]string), }, poolOfBasicSliceValidators: basicSliceValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &basicSliceValidator{} return s }, }, debugMap: make(map[*basicSliceValidator]status), allocMap: make(map[*basicSliceValidator]string), redeemMap: make(map[*basicSliceValidator]string), }, poolOfNumberValidators: numberValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &numberValidator{} return s }, }, debugMap: make(map[*numberValidator]status), allocMap: make(map[*numberValidator]string), redeemMap: make(map[*numberValidator]string), }, poolOfStringValidators: stringValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &stringValidator{} return s }, }, debugMap: make(map[*stringValidator]status), allocMap: make(map[*stringValidator]string), redeemMap: make(map[*stringValidator]string), }, poolOfSchemaPropsValidators: schemaPropsValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &schemaPropsValidator{} return s }, }, debugMap: make(map[*schemaPropsValidator]status), allocMap: make(map[*schemaPropsValidator]string), redeemMap: make(map[*schemaPropsValidator]string), }, poolOfFormatValidators: formatValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &formatValidator{} return s }, }, debugMap: make(map[*formatValidator]status), allocMap: make(map[*formatValidator]string), redeemMap: make(map[*formatValidator]string), }, poolOfTypeValidators: typeValidatorsPool{ Pool: &sync.Pool{ New: func() any { s := &typeValidator{} return s }, }, debugMap: make(map[*typeValidator]status), allocMap: make(map[*typeValidator]string), redeemMap: make(map[*typeValidator]string), }, poolOfSchemas: schemasPool{ Pool: &sync.Pool{ New: func() any { s := &spec.Schema{} return s }, }, debugMap: make(map[*spec.Schema]status), allocMap: make(map[*spec.Schema]string), redeemMap: make(map[*spec.Schema]string), }, poolOfResults: resultsPool{ Pool: &sync.Pool{ New: func() any { s := &Result{} return s }, }, debugMap: make(map[*Result]status), allocMap: make(map[*Result]string), redeemMap: make(map[*Result]string), }, } } const ( statusFresh status = iota + 1 statusRecycled statusRedeemed ) func (s status) String() string { switch s { case statusFresh: return "fresh" case statusRecycled: return "recycled" case statusRedeemed: return "redeemed" default: panic(fmt.Errorf("invalid status: %d", s)) } } type ( // Debug status uint8 allPools struct { // memory pools for all validator objects. // // Each pool can be borrowed from and redeemed to. poolOfSchemaValidators schemaValidatorsPool poolOfObjectValidators objectValidatorsPool poolOfSliceValidators sliceValidatorsPool poolOfItemsValidators itemsValidatorsPool poolOfBasicCommonValidators basicCommonValidatorsPool poolOfHeaderValidators headerValidatorsPool poolOfParamValidators paramValidatorsPool poolOfBasicSliceValidators basicSliceValidatorsPool poolOfNumberValidators numberValidatorsPool poolOfStringValidators stringValidatorsPool poolOfSchemaPropsValidators schemaPropsValidatorsPool poolOfFormatValidators formatValidatorsPool poolOfTypeValidators typeValidatorsPool poolOfSchemas schemasPool poolOfResults resultsPool } schemaValidatorsPool struct { *sync.Pool debugMap map[*SchemaValidator]status allocMap map[*SchemaValidator]string redeemMap map[*SchemaValidator]string mx sync.Mutex } objectValidatorsPool struct { *sync.Pool debugMap map[*objectValidator]status allocMap map[*objectValidator]string redeemMap map[*objectValidator]string mx sync.Mutex } sliceValidatorsPool struct { *sync.Pool debugMap map[*schemaSliceValidator]status allocMap map[*schemaSliceValidator]string redeemMap map[*schemaSliceValidator]string mx sync.Mutex } itemsValidatorsPool struct { *sync.Pool debugMap map[*itemsValidator]status allocMap map[*itemsValidator]string redeemMap map[*itemsValidator]string mx sync.Mutex } basicCommonValidatorsPool struct { *sync.Pool debugMap map[*basicCommonValidator]status allocMap map[*basicCommonValidator]string redeemMap map[*basicCommonValidator]string mx sync.Mutex } headerValidatorsPool struct { *sync.Pool debugMap map[*HeaderValidator]status allocMap map[*HeaderValidator]string redeemMap map[*HeaderValidator]string mx sync.Mutex } paramValidatorsPool struct { *sync.Pool debugMap map[*ParamValidator]status allocMap map[*ParamValidator]string redeemMap map[*ParamValidator]string mx sync.Mutex } basicSliceValidatorsPool struct { *sync.Pool debugMap map[*basicSliceValidator]status allocMap map[*basicSliceValidator]string redeemMap map[*basicSliceValidator]string mx sync.Mutex } numberValidatorsPool struct { *sync.Pool debugMap map[*numberValidator]status allocMap map[*numberValidator]string redeemMap map[*numberValidator]string mx sync.Mutex } stringValidatorsPool struct { *sync.Pool debugMap map[*stringValidator]status allocMap map[*stringValidator]string redeemMap map[*stringValidator]string mx sync.Mutex } schemaPropsValidatorsPool struct { *sync.Pool debugMap map[*schemaPropsValidator]status allocMap map[*schemaPropsValidator]string redeemMap map[*schemaPropsValidator]string mx sync.Mutex } formatValidatorsPool struct { *sync.Pool debugMap map[*formatValidator]status allocMap map[*formatValidator]string redeemMap map[*formatValidator]string mx sync.Mutex } typeValidatorsPool struct { *sync.Pool debugMap map[*typeValidator]status allocMap map[*typeValidator]string redeemMap map[*typeValidator]string mx sync.Mutex } schemasPool struct { *sync.Pool debugMap map[*spec.Schema]status allocMap map[*spec.Schema]string redeemMap map[*spec.Schema]string mx sync.Mutex } resultsPool struct { *sync.Pool debugMap map[*Result]status allocMap map[*Result]string redeemMap map[*Result]string mx sync.Mutex } ) func (p *schemaValidatorsPool) BorrowValidator() *SchemaValidator { s := p.Get().(*SchemaValidator) p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { p.debugMap[s] = statusFresh } else { if x != statusRedeemed { panic("recycled schema should have been redeemed") } p.debugMap[s] = statusRecycled } p.allocMap[s] = caller() return s } func (p *schemaValidatorsPool) RedeemValidator(s *SchemaValidator) { // NOTE: s might be nil. In that case, Put is a noop. p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { panic("redeemed schema should have been allocated") } if x != statusRecycled && x != statusFresh { panic("redeemed schema should have been allocated from a fresh or recycled pointer") } p.debugMap[s] = statusRedeemed p.redeemMap[s] = caller() p.Put(s) } func (p *objectValidatorsPool) BorrowValidator() *objectValidator { s := p.Get().(*objectValidator) p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { p.debugMap[s] = statusFresh } else { if x != statusRedeemed { panic("recycled object should have been redeemed") } p.debugMap[s] = statusRecycled } p.allocMap[s] = caller() return s } func (p *objectValidatorsPool) RedeemValidator(s *objectValidator) { p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { panic("redeemed object should have been allocated") } if x != statusRecycled && x != statusFresh { panic("redeemed object should have been allocated from a fresh or recycled pointer") } p.debugMap[s] = statusRedeemed p.redeemMap[s] = caller() p.Put(s) } func (p *sliceValidatorsPool) BorrowValidator() *schemaSliceValidator { s := p.Get().(*schemaSliceValidator) p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { p.debugMap[s] = statusFresh } else { if x != statusRedeemed { panic("recycled schemaSliceValidator should have been redeemed") } p.debugMap[s] = statusRecycled } p.allocMap[s] = caller() return s } func (p *sliceValidatorsPool) RedeemValidator(s *schemaSliceValidator) { p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { panic("redeemed schemaSliceValidator should have been allocated") } if x != statusRecycled && x != statusFresh { panic("redeemed schemaSliceValidator should have been allocated from a fresh or recycled pointer") } p.debugMap[s] = statusRedeemed p.redeemMap[s] = caller() p.Put(s) } func (p *itemsValidatorsPool) BorrowValidator() *itemsValidator { s := p.Get().(*itemsValidator) p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { p.debugMap[s] = statusFresh } else { if x != statusRedeemed { panic("recycled itemsValidator should have been redeemed") } p.debugMap[s] = statusRecycled } p.allocMap[s] = caller() return s } func (p *itemsValidatorsPool) RedeemValidator(s *itemsValidator) { p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { panic("redeemed itemsValidator should have been allocated") } if x != statusRecycled && x != statusFresh { panic("redeemed itemsValidator should have been allocated from a fresh or recycled pointer") } p.debugMap[s] = statusRedeemed p.redeemMap[s] = caller() p.Put(s) } func (p *basicCommonValidatorsPool) BorrowValidator() *basicCommonValidator { s := p.Get().(*basicCommonValidator) p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { p.debugMap[s] = statusFresh } else { if x != statusRedeemed { panic("recycled basicCommonValidator should have been redeemed") } p.debugMap[s] = statusRecycled } p.allocMap[s] = caller() return s } func (p *basicCommonValidatorsPool) RedeemValidator(s *basicCommonValidator) { p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { panic("redeemed basicCommonValidator should have been allocated") } if x != statusRecycled && x != statusFresh { panic("redeemed basicCommonValidator should have been allocated from a fresh or recycled pointer") } p.debugMap[s] = statusRedeemed p.redeemMap[s] = caller() p.Put(s) } func (p *headerValidatorsPool) BorrowValidator() *HeaderValidator { s := p.Get().(*HeaderValidator) p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { p.debugMap[s] = statusFresh } else { if x != statusRedeemed { panic("recycled HeaderValidator should have been redeemed") } p.debugMap[s] = statusRecycled } p.allocMap[s] = caller() return s } func (p *headerValidatorsPool) RedeemValidator(s *HeaderValidator) { p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { panic("redeemed header should have been allocated") } if x != statusRecycled && x != statusFresh { panic("redeemed header should have been allocated from a fresh or recycled pointer") } p.debugMap[s] = statusRedeemed p.redeemMap[s] = caller() p.Put(s) } func (p *paramValidatorsPool) BorrowValidator() *ParamValidator { s := p.Get().(*ParamValidator) p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { p.debugMap[s] = statusFresh } else { if x != statusRedeemed { panic("recycled param should have been redeemed") } p.debugMap[s] = statusRecycled } p.allocMap[s] = caller() return s } func (p *paramValidatorsPool) RedeemValidator(s *ParamValidator) { p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { panic("redeemed param should have been allocated") } if x != statusRecycled && x != statusFresh { panic("redeemed param should have been allocated from a fresh or recycled pointer") } p.debugMap[s] = statusRedeemed p.redeemMap[s] = caller() p.Put(s) } func (p *basicSliceValidatorsPool) BorrowValidator() *basicSliceValidator { s := p.Get().(*basicSliceValidator) p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { p.debugMap[s] = statusFresh } else { if x != statusRedeemed { panic("recycled basicSliceValidator should have been redeemed") } p.debugMap[s] = statusRecycled } p.allocMap[s] = caller() return s } func (p *basicSliceValidatorsPool) RedeemValidator(s *basicSliceValidator) { p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { panic("redeemed basicSliceValidator should have been allocated") } if x != statusRecycled && x != statusFresh { panic("redeemed basicSliceValidator should have been allocated from a fresh or recycled pointer") } p.debugMap[s] = statusRedeemed p.redeemMap[s] = caller() p.Put(s) } func (p *numberValidatorsPool) BorrowValidator() *numberValidator { s := p.Get().(*numberValidator) p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { p.debugMap[s] = statusFresh } else { if x != statusRedeemed { panic("recycled number should have been redeemed") } p.debugMap[s] = statusRecycled } p.allocMap[s] = caller() return s } func (p *numberValidatorsPool) RedeemValidator(s *numberValidator) { p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { panic("redeemed number should have been allocated") } if x != statusRecycled && x != statusFresh { panic("redeemed number should have been allocated from a fresh or recycled pointer") } p.debugMap[s] = statusRedeemed p.redeemMap[s] = caller() p.Put(s) } func (p *stringValidatorsPool) BorrowValidator() *stringValidator { s := p.Get().(*stringValidator) p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { p.debugMap[s] = statusFresh } else { if x != statusRedeemed { panic("recycled string should have been redeemed") } p.debugMap[s] = statusRecycled } p.allocMap[s] = caller() return s } func (p *stringValidatorsPool) RedeemValidator(s *stringValidator) { p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { panic("redeemed string should have been allocated") } if x != statusRecycled && x != statusFresh { panic("redeemed string should have been allocated from a fresh or recycled pointer") } p.debugMap[s] = statusRedeemed p.redeemMap[s] = caller() p.Put(s) } func (p *schemaPropsValidatorsPool) BorrowValidator() *schemaPropsValidator { s := p.Get().(*schemaPropsValidator) p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { p.debugMap[s] = statusFresh } else { if x != statusRedeemed { panic("recycled param should have been redeemed") } p.debugMap[s] = statusRecycled } p.allocMap[s] = caller() return s } func (p *schemaPropsValidatorsPool) RedeemValidator(s *schemaPropsValidator) { p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { panic("redeemed schemaProps should have been allocated") } if x != statusRecycled && x != statusFresh { panic("redeemed schemaProps should have been allocated from a fresh or recycled pointer") } p.debugMap[s] = statusRedeemed p.redeemMap[s] = caller() p.Put(s) } func (p *formatValidatorsPool) BorrowValidator() *formatValidator { s := p.Get().(*formatValidator) p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { p.debugMap[s] = statusFresh } else { if x != statusRedeemed { panic("recycled format should have been redeemed") } p.debugMap[s] = statusRecycled } p.allocMap[s] = caller() return s } func (p *formatValidatorsPool) RedeemValidator(s *formatValidator) { p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { panic("redeemed format should have been allocated") } if x != statusRecycled && x != statusFresh { panic("redeemed format should have been allocated from a fresh or recycled pointer") } p.debugMap[s] = statusRedeemed p.redeemMap[s] = caller() p.Put(s) } func (p *typeValidatorsPool) BorrowValidator() *typeValidator { s := p.Get().(*typeValidator) p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { p.debugMap[s] = statusFresh } else { if x != statusRedeemed { panic("recycled type should have been redeemed") } p.debugMap[s] = statusRecycled } p.allocMap[s] = caller() return s } func (p *typeValidatorsPool) RedeemValidator(s *typeValidator) { p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { panic("redeemed type should have been allocated") } if x != statusRecycled && x != statusFresh { panic(fmt.Errorf("redeemed type should have been allocated from a fresh or recycled pointer. Got status %s, already redeamed at: %s", x, p.redeemMap[s])) } p.debugMap[s] = statusRedeemed p.redeemMap[s] = caller() p.Put(s) } func (p *schemasPool) BorrowSchema() *spec.Schema { s := p.Get().(*spec.Schema) p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { p.debugMap[s] = statusFresh } else { if x != statusRedeemed { panic("recycled spec.Schema should have been redeemed") } p.debugMap[s] = statusRecycled } p.allocMap[s] = caller() return s } func (p *schemasPool) RedeemSchema(s *spec.Schema) { p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { panic("redeemed spec.Schema should have been allocated") } if x != statusRecycled && x != statusFresh { panic("redeemed spec.Schema should have been allocated from a fresh or recycled pointer") } p.debugMap[s] = statusRedeemed p.redeemMap[s] = caller() p.Put(s) } func (p *resultsPool) BorrowResult() *Result { s := p.Get().(*Result).cleared() p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { p.debugMap[s] = statusFresh } else { if x != statusRedeemed { panic("recycled result should have been redeemed") } p.debugMap[s] = statusRecycled } p.allocMap[s] = caller() return s } func (p *resultsPool) RedeemResult(s *Result) { if s == emptyResult { if len(s.Errors) > 0 || len(s.Warnings) > 0 { panic("empty result should not mutate") } return } p.mx.Lock() defer p.mx.Unlock() x, ok := p.debugMap[s] if !ok { panic("redeemed Result should have been allocated") } if x != statusRecycled && x != statusFresh { panic("redeemed Result should have been allocated from a fresh or recycled pointer") } p.debugMap[s] = statusRedeemed p.redeemMap[s] = caller() p.Put(s) } func (p *allPools) allIsRedeemed(t testing.TB) bool { outcome := true for k, v := range p.poolOfSchemaValidators.debugMap { if v == statusRedeemed { continue } t.Logf("schemaValidator should be redeemed. Allocated by: %s", p.poolOfSchemaValidators.allocMap[k]) outcome = false } for k, v := range p.poolOfObjectValidators.debugMap { if v == statusRedeemed { continue } t.Logf("objectValidator should be redeemed. Allocated by: %s", p.poolOfObjectValidators.allocMap[k]) outcome = false } for k, v := range p.poolOfSliceValidators.debugMap { if v == statusRedeemed { continue } t.Logf("sliceValidator should be redeemed. Allocated by: %s", p.poolOfSliceValidators.allocMap[k]) outcome = false } for k, v := range p.poolOfItemsValidators.debugMap { if v == statusRedeemed { continue } t.Logf("itemsValidator should be redeemed. Allocated by: %s", p.poolOfItemsValidators.allocMap[k]) outcome = false } for k, v := range p.poolOfBasicCommonValidators.debugMap { if v == statusRedeemed { continue } t.Logf("basicCommonValidator should be redeemed. Allocated by: %s", p.poolOfBasicCommonValidators.allocMap[k]) outcome = false } for k, v := range p.poolOfHeaderValidators.debugMap { if v == statusRedeemed { continue } t.Logf("headerValidator should be redeemed. Allocated by: %s", p.poolOfHeaderValidators.allocMap[k]) outcome = false } for k, v := range p.poolOfParamValidators.debugMap { if v == statusRedeemed { continue } t.Logf("paramValidator should be redeemed. Allocated by: %s", p.poolOfParamValidators.allocMap[k]) outcome = false } for k, v := range p.poolOfBasicSliceValidators.debugMap { if v == statusRedeemed { continue } t.Logf("basicSliceValidator should be redeemed. Allocated by: %s", p.poolOfBasicSliceValidators.allocMap[k]) outcome = false } for k, v := range p.poolOfNumberValidators.debugMap { if v == statusRedeemed { continue } t.Logf("numberValidator should be redeemed. Allocated by: %s", p.poolOfNumberValidators.allocMap[k]) outcome = false } for k, v := range p.poolOfStringValidators.debugMap { if v == statusRedeemed { continue } t.Logf("stringValidator should be redeemed. Allocated by: %s", p.poolOfStringValidators.allocMap[k]) outcome = false } for k, v := range p.poolOfSchemaPropsValidators.debugMap { if v == statusRedeemed { continue } t.Logf("schemaPropsValidator should be redeemed. Allocated by: %s", p.poolOfSchemaPropsValidators.allocMap[k]) outcome = false } for k, v := range p.poolOfFormatValidators.debugMap { if v == statusRedeemed { continue } t.Logf("formatValidator should be redeemed. Allocated by: %s", p.poolOfFormatValidators.allocMap[k]) outcome = false } for k, v := range p.poolOfTypeValidators.debugMap { if v == statusRedeemed { continue } t.Logf("typeValidator should be redeemed. Allocated by: %s", p.poolOfTypeValidators.allocMap[k]) outcome = false } for k, v := range p.poolOfSchemas.debugMap { if v == statusRedeemed { continue } t.Logf("schemas should be redeemed. Allocated by: %s", p.poolOfSchemas.allocMap[k]) outcome = false } for k, v := range p.poolOfResults.debugMap { if v == statusRedeemed { continue } t.Logf("result should be redeemed. Allocated by: %s", p.poolOfResults.allocMap[k]) outcome = false } return outcome } func caller() string { pc, _, _, _ := runtime.Caller(3) //nolint:dogsled from, line := runtime.FuncForPC(pc).FileLine(pc) return fmt.Sprintf("%s:%d", from, line) } validate-0.24.0/pools_debug_test.go000066400000000000000000000012121457312750000172560ustar00rootroot00000000000000//go:build validatedebug package validate import ( "path/filepath" "testing" "github.com/go-openapi/loads" "github.com/go-openapi/strfmt" "github.com/stretchr/testify/require" ) func Test_Debug_2866(t *testing.T) { // This test to be run with build flag "validatedebug": it uses the debug pools and asserts that // all allocated objects are indeed redeemed at the end of the spec validation. resetPools() fp := filepath.Join("fixtures", "bugs", "2866", "2866.yaml") doc, err := loads.Spec(fp) require.NoError(t, err) require.NotNil(t, doc) require.NoError(t, Spec(doc, strfmt.Default)) require.True(t, pools.allIsRedeemed(t)) } validate-0.24.0/pools_test.go000066400000000000000000000023361457312750000161200ustar00rootroot00000000000000package validate_test import ( "path/filepath" "testing" "github.com/go-openapi/loads" "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" "github.com/stretchr/testify/require" ) func Test_ParallelPool(t *testing.T) { fixture1 := filepath.Join("fixtures", "bugs", "1429", "swagger.yaml") fixture2 := filepath.Join("fixtures", "bugs", "2866", "2866.yaml") fixture3 := filepath.Join("fixtures", "bugs", "43", "fixture-43.yaml") t.Run("should validate in parallel", func(t *testing.T) { for i := 0; i < 20; i++ { t.Run("validating fixture 1", func(t *testing.T) { t.Parallel() doc1, err := loads.Spec(fixture1) require.NoError(t, err) require.NotNil(t, doc1) require.NoError(t, validate.Spec(doc1, strfmt.Default)) }) t.Run("validating fixture 2", func(t *testing.T) { t.Parallel() doc2, err := loads.Spec(fixture2) require.NoError(t, err) require.NotNil(t, doc2) require.NoError(t, validate.Spec(doc2, strfmt.Default)) }) t.Run("validating fixture 2", func(t *testing.T) { t.Parallel() doc3, err := loads.Spec(fixture3) require.NoError(t, err) require.NotNil(t, doc3) require.NoError(t, validate.Spec(doc3, strfmt.Default)) }) } }) } validate-0.24.0/post/000077500000000000000000000000001457312750000143575ustar00rootroot00000000000000validate-0.24.0/post/defaulter.go000066400000000000000000000022001457312750000166530ustar00rootroot00000000000000// Copyright 2018 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package post import ( "github.com/go-openapi/validate" ) // ApplyDefaults applies defaults to the underlying data of the result. The data must be a JSON // struct as returned by json.Unmarshal. func ApplyDefaults(r *validate.Result) { fieldSchemata := r.FieldSchemata() for key, schemata := range fieldSchemata { LookForDefaultingScheme: for _, s := range schemata { if s.Default != nil { if _, found := key.Object()[key.Field()]; !found { key.Object()[key.Field()] = s.Default break LookForDefaultingScheme } } } } } validate-0.24.0/post/defaulter_test.go000066400000000000000000000066061457312750000177300ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package post import ( "encoding/json" "fmt" "os" "path/filepath" "testing" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) var defaulterFixturesPath = filepath.Join("..", "fixtures", "defaulting") func TestDefaulter(t *testing.T) { schema, err := defaulterFixture() require.NoError(t, err) validator := validate.NewSchemaValidator(schema, nil, "", strfmt.Default) x := defaulterFixtureInput() t.Logf("Before: %v", x) r := validator.Validate(x) assert.False(t, r.HasErrors(), fmt.Sprintf("unexpected validation error: %v", r.AsError())) ApplyDefaults(r) t.Logf("After: %v", x) var expected interface{} err = json.Unmarshal([]byte(`{ "existing": 100, "int": 42, "str": "Hello", "obj": {"foo": "bar"}, "nested": {"inner": 7}, "all": {"foo": 42, "bar": 42}, "any": {"foo": 42}, "one": {"bar": 42} }`), &expected) require.NoError(t, err) assert.Equal(t, expected, x) } func TestDefaulterSimple(t *testing.T) { schema := spec.Schema{ SchemaProps: spec.SchemaProps{ Properties: map[string]spec.Schema{ "int": { SchemaProps: spec.SchemaProps{ Default: float64(42), }, }, "str": { SchemaProps: spec.SchemaProps{ Default: "Hello", }, }, }, }, } validator := validate.NewSchemaValidator(&schema, nil, "", strfmt.Default) x := map[string]interface{}{} t.Logf("Before: %v", x) r := validator.Validate(x) assert.False(t, r.HasErrors(), fmt.Sprintf("unexpected validation error: %v", r.AsError())) ApplyDefaults(r) t.Logf("After: %v", x) var expected interface{} err := json.Unmarshal([]byte(`{ "int": 42, "str": "Hello" }`), &expected) require.NoError(t, err) assert.Equal(t, expected, x) } func BenchmarkDefaulting(b *testing.B) { b.ReportAllocs() schema, err := defaulterFixture() require.NoError(b, err) for n := 0; n < b.N; n++ { validator := validate.NewSchemaValidator(schema, nil, "", strfmt.Default) x := defaulterFixtureInput() r := validator.Validate(x) assert.False(b, r.HasErrors(), fmt.Sprintf("unexpected validation error: %v", r.AsError())) ApplyDefaults(r) } } func defaulterFixtureInput() map[string]interface{} { return map[string]interface{}{ "existing": float64(100), "nested": map[string]interface{}{}, "all": map[string]interface{}{}, "any": map[string]interface{}{}, "one": map[string]interface{}{}, } } func defaulterFixture() (*spec.Schema, error) { fname := filepath.Join(defaulterFixturesPath, "schema.json") b, err := os.ReadFile(fname) if err != nil { return nil, err } var schema spec.Schema if err := json.Unmarshal(b, &schema); err != nil { return nil, err } return &schema, spec.ExpandSchema(&schema, nil, nil /*new(noopResCache)*/) } validate-0.24.0/post/prune.go000066400000000000000000000026151457312750000160430ustar00rootroot00000000000000// Copyright 2018 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package post import ( "github.com/go-openapi/validate" ) // Prune recursively removes all non-specified fields from the underlying data of the result. // The data must be a JSON struct as returned by json.Unmarshal. func Prune(r *validate.Result) { prune(r.Data(), r) } func prune(data interface{}, result *validate.Result) { switch obj := data.(type) { case map[string]interface{}: pruneObject(obj, result) for _, val := range obj { prune(val, result) } case []interface{}: for _, item := range obj { prune(item, result) } } } func pruneObject(obj map[string]interface{}, result *validate.Result) { fieldSchemata := result.FieldSchemata() for field := range obj { if schemata, ok := fieldSchemata[validate.NewFieldKey(obj, field)]; !ok || len(schemata) == 0 { delete(obj, field) } } } validate-0.24.0/post/prune_test.go000066400000000000000000000053171457312750000171040ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package post import ( "encoding/json" "fmt" "os" "path/filepath" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" validate "github.com/go-openapi/validate" ) var pruneFixturesPath = filepath.Join("..", "fixtures", "pruning") func TestPrune(t *testing.T) { schema, err := pruningFixture() require.NoError(t, err) x := map[string]interface{}{ "foo": 42, "bar": 42, "x": 42, "nested": map[string]interface{}{ "x": 42, "inner": map[string]interface{}{ "foo": 42, "bar": 42, "x": 42, }, }, "all": map[string]interface{}{ "foo": 42, "bar": 42, "x": 42, }, "any": map[string]interface{}{ "foo": 42, "bar": 42, "x": 42, }, "one": map[string]interface{}{ "bar": 42, "x": 42, }, "array": []interface{}{ map[string]interface{}{ "foo": 42, "bar": 123, }, map[string]interface{}{ "x": 42, "y": 123, }, }, } t.Logf("Before: %v", x) validator := validate.NewSchemaValidator(schema, nil, "", strfmt.Default) r := validator.Validate(x) assert.False(t, r.HasErrors(), fmt.Sprintf("unexpected validation error: %v", r.AsError())) Prune(r) t.Logf("After: %v", x) expected := map[string]interface{}{ "foo": 42, "bar": 42, "nested": map[string]interface{}{ "inner": map[string]interface{}{ "foo": 42, "bar": 42, }, }, "all": map[string]interface{}{ "foo": 42, "bar": 42, }, "any": map[string]interface{}{ // intentionally only list one: the first matching "foo": 42, }, "one": map[string]interface{}{ "bar": 42, }, "array": []interface{}{ map[string]interface{}{ "foo": 42, }, map[string]interface{}{}, }, } assert.Equal(t, expected, x) } func pruningFixture() (*spec.Schema, error) { fname := filepath.Join(pruneFixturesPath, "schema.json") b, err := os.ReadFile(fname) if err != nil { return nil, err } var schema spec.Schema if err := json.Unmarshal(b, &schema); err != nil { return nil, err } return &schema, spec.ExpandSchema(&schema, nil, nil /*new(noopResCache)*/) } validate-0.24.0/result.go000066400000000000000000000364041457312750000152460ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( stderrors "errors" "reflect" "strings" "github.com/go-openapi/errors" "github.com/go-openapi/spec" ) var emptyResult = &Result{MatchCount: 1} // Result represents a validation result set, composed of // errors and warnings. // // It is used to keep track of all detected errors and warnings during // the validation of a specification. // // Matchcount is used to determine // which errors are relevant in the case of AnyOf, OneOf // schema validation. Results from the validation branch // with most matches get eventually selected. // // TODO: keep path of key originating the error type Result struct { Errors []error Warnings []error MatchCount int // the object data data interface{} // Schemata for the root object rootObjectSchemata schemata // Schemata for object fields fieldSchemata []fieldSchemata // Schemata for slice items itemSchemata []itemSchemata cachedFieldSchemata map[FieldKey][]*spec.Schema cachedItemSchemata map[ItemKey][]*spec.Schema wantsRedeemOnMerge bool } // FieldKey is a pair of an object and a field, usable as a key for a map. type FieldKey struct { object reflect.Value // actually a map[string]interface{}, but the latter cannot be a key field string } // ItemKey is a pair of a slice and an index, usable as a key for a map. type ItemKey struct { slice reflect.Value // actually a []interface{}, but the latter cannot be a key index int } // NewFieldKey returns a pair of an object and field usable as a key of a map. func NewFieldKey(obj map[string]interface{}, field string) FieldKey { return FieldKey{object: reflect.ValueOf(obj), field: field} } // Object returns the underlying object of this key. func (fk *FieldKey) Object() map[string]interface{} { return fk.object.Interface().(map[string]interface{}) } // Field returns the underlying field of this key. func (fk *FieldKey) Field() string { return fk.field } // NewItemKey returns a pair of a slice and index usable as a key of a map. func NewItemKey(slice interface{}, i int) ItemKey { return ItemKey{slice: reflect.ValueOf(slice), index: i} } // Slice returns the underlying slice of this key. func (ik *ItemKey) Slice() []interface{} { return ik.slice.Interface().([]interface{}) } // Index returns the underlying index of this key. func (ik *ItemKey) Index() int { return ik.index } type fieldSchemata struct { obj map[string]interface{} field string schemata schemata } type itemSchemata struct { slice reflect.Value index int schemata schemata } // Merge merges this result with the other one(s), preserving match counts etc. func (r *Result) Merge(others ...*Result) *Result { for _, other := range others { if other == nil { continue } r.mergeWithoutRootSchemata(other) r.rootObjectSchemata.Append(other.rootObjectSchemata) if other.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(other) } } return r } // Data returns the original data object used for validation. Mutating this renders // the result invalid. func (r *Result) Data() interface{} { return r.data } // RootObjectSchemata returns the schemata which apply to the root object. func (r *Result) RootObjectSchemata() []*spec.Schema { return r.rootObjectSchemata.Slice() } // FieldSchemata returns the schemata which apply to fields in objects. func (r *Result) FieldSchemata() map[FieldKey][]*spec.Schema { if r.cachedFieldSchemata != nil { return r.cachedFieldSchemata } ret := make(map[FieldKey][]*spec.Schema, len(r.fieldSchemata)) for _, fs := range r.fieldSchemata { key := NewFieldKey(fs.obj, fs.field) if fs.schemata.one != nil { ret[key] = append(ret[key], fs.schemata.one) } else if len(fs.schemata.multiple) > 0 { ret[key] = append(ret[key], fs.schemata.multiple...) } } r.cachedFieldSchemata = ret return ret } // ItemSchemata returns the schemata which apply to items in slices. func (r *Result) ItemSchemata() map[ItemKey][]*spec.Schema { if r.cachedItemSchemata != nil { return r.cachedItemSchemata } ret := make(map[ItemKey][]*spec.Schema, len(r.itemSchemata)) for _, ss := range r.itemSchemata { key := NewItemKey(ss.slice, ss.index) if ss.schemata.one != nil { ret[key] = append(ret[key], ss.schemata.one) } else if len(ss.schemata.multiple) > 0 { ret[key] = append(ret[key], ss.schemata.multiple...) } } r.cachedItemSchemata = ret return ret } func (r *Result) resetCaches() { r.cachedFieldSchemata = nil r.cachedItemSchemata = nil } // mergeForField merges other into r, assigning other's root schemata to the given Object and field name. // //nolint:unparam func (r *Result) mergeForField(obj map[string]interface{}, field string, other *Result) *Result { if other == nil { return r } r.mergeWithoutRootSchemata(other) if other.rootObjectSchemata.Len() > 0 { if r.fieldSchemata == nil { r.fieldSchemata = make([]fieldSchemata, len(obj)) } // clone other schemata, as other is about to be redeemed to the pool r.fieldSchemata = append(r.fieldSchemata, fieldSchemata{ obj: obj, field: field, schemata: other.rootObjectSchemata.Clone(), }) } if other.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(other) } return r } // mergeForSlice merges other into r, assigning other's root schemata to the given slice and index. // //nolint:unparam func (r *Result) mergeForSlice(slice reflect.Value, i int, other *Result) *Result { if other == nil { return r } r.mergeWithoutRootSchemata(other) if other.rootObjectSchemata.Len() > 0 { if r.itemSchemata == nil { r.itemSchemata = make([]itemSchemata, slice.Len()) } // clone other schemata, as other is about to be redeemed to the pool r.itemSchemata = append(r.itemSchemata, itemSchemata{ slice: slice, index: i, schemata: other.rootObjectSchemata.Clone(), }) } if other.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(other) } return r } // addRootObjectSchemata adds the given schemata for the root object of the result. // // Since the slice schemata might be reused, it is shallow-cloned before saving it into the result. func (r *Result) addRootObjectSchemata(s *spec.Schema) { clone := *s r.rootObjectSchemata.Append(schemata{one: &clone}) } // addPropertySchemata adds the given schemata for the object and field. // // Since the slice schemata might be reused, it is shallow-cloned before saving it into the result. func (r *Result) addPropertySchemata(obj map[string]interface{}, fld string, schema *spec.Schema) { if r.fieldSchemata == nil { r.fieldSchemata = make([]fieldSchemata, 0, len(obj)) } clone := *schema r.fieldSchemata = append(r.fieldSchemata, fieldSchemata{obj: obj, field: fld, schemata: schemata{one: &clone}}) } /* // addSliceSchemata adds the given schemata for the slice and index. // The slice schemata might be reused. I.e. do not modify it after being added to a result. func (r *Result) addSliceSchemata(slice reflect.Value, i int, schema *spec.Schema) { if r.itemSchemata == nil { r.itemSchemata = make([]itemSchemata, 0, slice.Len()) } r.itemSchemata = append(r.itemSchemata, itemSchemata{slice: slice, index: i, schemata: schemata{one: schema}}) } */ // mergeWithoutRootSchemata merges other into r, ignoring the rootObject schemata. func (r *Result) mergeWithoutRootSchemata(other *Result) { r.resetCaches() r.AddErrors(other.Errors...) r.AddWarnings(other.Warnings...) r.MatchCount += other.MatchCount if other.fieldSchemata != nil { if r.fieldSchemata == nil { r.fieldSchemata = make([]fieldSchemata, 0, len(other.fieldSchemata)) } for _, field := range other.fieldSchemata { field.schemata = field.schemata.Clone() r.fieldSchemata = append(r.fieldSchemata, field) } } if other.itemSchemata != nil { if r.itemSchemata == nil { r.itemSchemata = make([]itemSchemata, 0, len(other.itemSchemata)) } for _, field := range other.itemSchemata { field.schemata = field.schemata.Clone() r.itemSchemata = append(r.itemSchemata, field) } } } // MergeAsErrors merges this result with the other one(s), preserving match counts etc. // // Warnings from input are merged as Errors in the returned merged Result. func (r *Result) MergeAsErrors(others ...*Result) *Result { for _, other := range others { if other != nil { r.resetCaches() r.AddErrors(other.Errors...) r.AddErrors(other.Warnings...) r.MatchCount += other.MatchCount if other.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(other) } } } return r } // MergeAsWarnings merges this result with the other one(s), preserving match counts etc. // // Errors from input are merged as Warnings in the returned merged Result. func (r *Result) MergeAsWarnings(others ...*Result) *Result { for _, other := range others { if other != nil { r.resetCaches() r.AddWarnings(other.Errors...) r.AddWarnings(other.Warnings...) r.MatchCount += other.MatchCount if other.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(other) } } } return r } // AddErrors adds errors to this validation result (if not already reported). // // Since the same check may be passed several times while exploring the // spec structure (via $ref, ...) reported messages are kept // unique. func (r *Result) AddErrors(errors ...error) { for _, e := range errors { found := false if e != nil { for _, isReported := range r.Errors { if e.Error() == isReported.Error() { found = true break } } if !found { r.Errors = append(r.Errors, e) } } } } // AddWarnings adds warnings to this validation result (if not already reported). func (r *Result) AddWarnings(warnings ...error) { for _, e := range warnings { found := false if e != nil { for _, isReported := range r.Warnings { if e.Error() == isReported.Error() { found = true break } } if !found { r.Warnings = append(r.Warnings, e) } } } } func (r *Result) keepRelevantErrors() *Result { // TODO: this one is going to disapear... // keepRelevantErrors strips a result from standard errors and keeps // the ones which are supposedly more accurate. // // The original result remains unaffected (creates a new instance of Result). // This method is used to work around the "matchCount" filter which would otherwise // strip our result from some accurate error reporting from lower level validators. // // NOTE: this implementation with a placeholder (IMPORTANT!) is neither clean nor // very efficient. On the other hand, relying on go-openapi/errors to manipulate // codes would require to change a lot here. So, for the moment, let's go with // placeholders. strippedErrors := []error{} for _, e := range r.Errors { if strings.HasPrefix(e.Error(), "IMPORTANT!") { strippedErrors = append(strippedErrors, stderrors.New(strings.TrimPrefix(e.Error(), "IMPORTANT!"))) } } strippedWarnings := []error{} for _, e := range r.Warnings { if strings.HasPrefix(e.Error(), "IMPORTANT!") { strippedWarnings = append(strippedWarnings, stderrors.New(strings.TrimPrefix(e.Error(), "IMPORTANT!"))) } } var strippedResult *Result if r.wantsRedeemOnMerge { strippedResult = pools.poolOfResults.BorrowResult() } else { strippedResult = new(Result) } strippedResult.Errors = strippedErrors strippedResult.Warnings = strippedWarnings return strippedResult } // IsValid returns true when this result is valid. // // Returns true on a nil *Result. func (r *Result) IsValid() bool { if r == nil { return true } return len(r.Errors) == 0 } // HasErrors returns true when this result is invalid. // // Returns false on a nil *Result. func (r *Result) HasErrors() bool { if r == nil { return false } return !r.IsValid() } // HasWarnings returns true when this result contains warnings. // // Returns false on a nil *Result. func (r *Result) HasWarnings() bool { if r == nil { return false } return len(r.Warnings) > 0 } // HasErrorsOrWarnings returns true when this result contains // either errors or warnings. // // Returns false on a nil *Result. func (r *Result) HasErrorsOrWarnings() bool { if r == nil { return false } return len(r.Errors) > 0 || len(r.Warnings) > 0 } // Inc increments the match count func (r *Result) Inc() { r.MatchCount++ } // AsError renders this result as an error interface // // TODO: reporting / pretty print with path ordered and indented func (r *Result) AsError() error { if r.IsValid() { return nil } return errors.CompositeValidationError(r.Errors...) } func (r *Result) cleared() *Result { // clear the Result to be reusable. Keep allocated capacity. r.Errors = r.Errors[:0] r.Warnings = r.Warnings[:0] r.MatchCount = 0 r.data = nil r.rootObjectSchemata.one = nil r.rootObjectSchemata.multiple = r.rootObjectSchemata.multiple[:0] r.fieldSchemata = r.fieldSchemata[:0] r.itemSchemata = r.itemSchemata[:0] for k := range r.cachedFieldSchemata { delete(r.cachedFieldSchemata, k) } for k := range r.cachedItemSchemata { delete(r.cachedItemSchemata, k) } r.wantsRedeemOnMerge = true // mark this result as eligible for redeem when merged into another return r } // schemata is an arbitrary number of schemata. It does a distinction between zero, // one and many schemata to avoid slice allocations. type schemata struct { // one is set if there is exactly one schema. In that case multiple must be nil. one *spec.Schema // multiple is an arbitrary number of schemas. If it is set, one must be nil. multiple []*spec.Schema } func (s *schemata) Len() int { if s.one != nil { return 1 } return len(s.multiple) } func (s *schemata) Slice() []*spec.Schema { if s == nil { return nil } if s.one != nil { return []*spec.Schema{s.one} } return s.multiple } // appendSchemata appends the schemata in other to s. It mutates s in-place. func (s *schemata) Append(other schemata) { if other.one == nil && len(other.multiple) == 0 { return } if s.one == nil && len(s.multiple) == 0 { *s = other return } if s.one != nil { if other.one != nil { s.multiple = []*spec.Schema{s.one, other.one} } else { t := make([]*spec.Schema, 0, 1+len(other.multiple)) s.multiple = append(append(t, s.one), other.multiple...) } s.one = nil } else { if other.one != nil { s.multiple = append(s.multiple, other.one) } else { if cap(s.multiple) >= len(s.multiple)+len(other.multiple) { s.multiple = append(s.multiple, other.multiple...) } else { t := make([]*spec.Schema, 0, len(s.multiple)+len(other.multiple)) s.multiple = append(append(t, s.multiple...), other.multiple...) } } } } func (s schemata) Clone() schemata { var clone schemata if s.one != nil { clone.one = new(spec.Schema) *clone.one = *s.one } if len(s.multiple) > 0 { clone.multiple = make([]*spec.Schema, len(s.multiple)) for idx := 0; idx < len(s.multiple); idx++ { sp := new(spec.Schema) *sp = *s.multiple[idx] clone.multiple[idx] = sp } } return clone } validate-0.24.0/result_test.go000066400000000000000000000125771457312750000163120ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "errors" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Test AddError() uniqueness func TestResult_AddError(t *testing.T) { r := Result{} r.AddErrors(errors.New("one error")) r.AddErrors(errors.New("another error")) r.AddErrors(errors.New("one error")) r.AddErrors(errors.New("one error")) r.AddErrors(errors.New("one error")) r.AddErrors(errors.New("one error"), errors.New("another error")) assert.Len(t, r.Errors, 2) assert.Contains(t, r.Errors, errors.New("one error")) assert.Contains(t, r.Errors, errors.New("another error")) } func TestResult_AddNilError(t *testing.T) { r := Result{} r.AddErrors(nil) assert.Empty(t, r.Errors) errArray := []error{errors.New("one Error"), nil, errors.New("another error")} r.AddErrors(errArray...) assert.Len(t, r.Errors, 2) } func TestResult_AddWarnings(t *testing.T) { r := Result{} r.AddErrors(errors.New("one Error")) assert.Len(t, r.Errors, 1) assert.Empty(t, r.Warnings) r.AddWarnings(errors.New("one Warning")) assert.Len(t, r.Errors, 1) assert.Len(t, r.Warnings, 1) } func TestResult_Merge(t *testing.T) { r := Result{} r.AddErrors(errors.New("one Error")) r.AddWarnings(errors.New("one Warning")) r.Inc() assert.Len(t, r.Errors, 1) assert.Len(t, r.Warnings, 1) assert.Equal(t, 1, r.MatchCount) // Merge with same r2 := Result{} r2.AddErrors(errors.New("one Error")) r2.AddWarnings(errors.New("one Warning")) r2.Inc() r.Merge(&r2) assert.Len(t, r.Errors, 1) assert.Len(t, r.Warnings, 1) assert.Equal(t, 2, r.MatchCount) // Merge with new r3 := Result{} r3.AddErrors(errors.New("new Error")) r3.AddWarnings(errors.New("new Warning")) r3.Inc() r.Merge(&r3) assert.Len(t, r.Errors, 2) assert.Len(t, r.Warnings, 2) assert.Equal(t, 3, r.MatchCount) } func errorFixture() (Result, Result, Result) { r := Result{} r.AddErrors(errors.New("one Error")) r.AddWarnings(errors.New("one Warning")) r.Inc() // same r2 := Result{} r2.AddErrors(errors.New("one Error")) r2.AddWarnings(errors.New("one Warning")) r2.Inc() // new r3 := Result{} r3.AddErrors(errors.New("new Error")) r3.AddWarnings(errors.New("new Warning")) r3.Inc() return r, r2, r3 } func TestResult_MergeAsErrors(t *testing.T) { r, r2, r3 := errorFixture() assert.Len(t, r.Errors, 1) assert.Len(t, r.Warnings, 1) assert.Equal(t, 1, r.MatchCount) r.MergeAsErrors(&r2, &r3) assert.Len(t, r.Errors, 4) // One Warning added to Errors assert.Len(t, r.Warnings, 1) assert.Equal(t, 3, r.MatchCount) } func TestResult_MergeAsWarnings(t *testing.T) { r, r2, r3 := errorFixture() assert.Len(t, r.Errors, 1) assert.Len(t, r.Warnings, 1) assert.Equal(t, 1, r.MatchCount) r.MergeAsWarnings(&r2, &r3) assert.Len(t, r.Errors, 1) // One Warning added to Errors assert.Len(t, r.Warnings, 4) assert.Equal(t, 3, r.MatchCount) } func TestResult_IsValid(t *testing.T) { r := Result{} assert.True(t, r.IsValid()) assert.False(t, r.HasErrors()) r.AddWarnings(errors.New("one Warning")) assert.True(t, r.IsValid()) assert.False(t, r.HasErrors()) r.AddErrors(errors.New("one Error")) assert.False(t, r.IsValid()) assert.True(t, r.HasErrors()) } func TestResult_HasWarnings(t *testing.T) { r := Result{} assert.False(t, r.HasWarnings()) r.AddErrors(errors.New("one Error")) assert.False(t, r.HasWarnings()) r.AddWarnings(errors.New("one Warning")) assert.True(t, r.HasWarnings()) } func TestResult_HasErrorsOrWarnings(t *testing.T) { r := Result{} r2 := Result{} assert.False(t, r.HasErrorsOrWarnings()) r.AddErrors(errors.New("one Error")) assert.True(t, r.HasErrorsOrWarnings()) r2.AddWarnings(errors.New("one Warning")) assert.True(t, r2.HasErrorsOrWarnings()) r.Merge(&r2) assert.True(t, r.HasErrorsOrWarnings()) } func TestResult_keepRelevantErrors(t *testing.T) { r := Result{} r.AddErrors(errors.New("one Error")) r.AddErrors(errors.New("IMPORTANT!Another Error")) r.AddWarnings(errors.New("one warning")) r.AddWarnings(errors.New("IMPORTANT!Another warning")) assert.Len(t, r.keepRelevantErrors().Errors, 1) assert.Len(t, r.keepRelevantErrors().Warnings, 1) } func TestResult_AsError(t *testing.T) { r := Result{} require.NoError(t, r.AsError()) r.AddErrors(errors.New("one Error")) r.AddErrors(errors.New("additional Error")) res := r.AsError() require.Error(t, res) assert.Contains(t, res.Error(), "validation failure list:") // Expected from pkg errors assert.Contains(t, res.Error(), "one Error") // Expected from pkg errors assert.Contains(t, res.Error(), "additional Error") // Expected from pkg errors } // Test methods which suppport a call on a nil instance func TestResult_NilInstance(t *testing.T) { var r *Result assert.True(t, r.IsValid()) assert.False(t, r.HasErrors()) assert.False(t, r.HasWarnings()) assert.False(t, r.HasErrorsOrWarnings()) } validate-0.24.0/rexp.go000066400000000000000000000031261457312750000147010ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( re "regexp" "sync" "sync/atomic" ) // Cache for compiled regular expressions var ( cacheMutex = &sync.Mutex{} reDict = atomic.Value{} // map[string]*re.Regexp ) func compileRegexp(pattern string) (*re.Regexp, error) { if cache, ok := reDict.Load().(map[string]*re.Regexp); ok { if r := cache[pattern]; r != nil { return r, nil } } r, err := re.Compile(pattern) if err != nil { return nil, err } cacheRegexp(r) return r, nil } func mustCompileRegexp(pattern string) *re.Regexp { if cache, ok := reDict.Load().(map[string]*re.Regexp); ok { if r := cache[pattern]; r != nil { return r } } r := re.MustCompile(pattern) cacheRegexp(r) return r } func cacheRegexp(r *re.Regexp) { cacheMutex.Lock() defer cacheMutex.Unlock() if cache, ok := reDict.Load().(map[string]*re.Regexp); !ok || cache[r.String()] == nil { newCache := map[string]*re.Regexp{ r.String(): r, } for k, v := range cache { newCache[k] = v } reDict.Store(newCache) } } validate-0.24.0/rexp_test.go000066400000000000000000000046101457312750000157370ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations untader the License. package validate import ( re "regexp" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Save repeated regexp compilation func Test_compileRegexp(t *testing.T) { vrex := new(re.Regexp) rex, err := compileRegexp(".*TestRegexp.*") require.NoError(t, err) assert.NotNil(t, rex) assert.IsType(t, vrex, rex) rex, err = compileRegexp(".*TestRegexp.*") require.NoError(t, err) assert.NotNil(t, rex) irex, ierr := compileRegexp(".[*InvalidTestRegexp.*") require.Error(t, ierr) assert.Nil(t, irex) assert.IsType(t, vrex, irex) } // Save repeated regexp compilation, with panic on error func testPanic() { mustCompileRegexp(".[*InvalidTestRegexp.*") } func Test_mustCompileRegexp(t *testing.T) { vrex := new(re.Regexp) rex := mustCompileRegexp(".*TestRegexp2.*") assert.NotNil(t, rex) assert.IsType(t, vrex, rex) rex = mustCompileRegexp(".*TestRegexp2.*") assert.NotNil(t, rex) assert.Panics(t, testPanic) } func TestRace_compileRegexp(t *testing.T) { vrex := new(re.Regexp) patterns := []string{ ".*TestRegexp1.*", ".*TestRegexp2.*", ".*TestRegexp3.*", } comp := func(pattern string) { rex, err := compileRegexp(pattern) require.NoError(t, err) assert.NotNil(t, rex) assert.IsType(t, vrex, rex) } for i := 0; i < 20; i++ { ii := i t.Run(patterns[ii%3], func(t *testing.T) { t.Parallel() comp(patterns[ii%3]) }) } } func TestRace_mustCompileRegexp(t *testing.T) { vrex := new(re.Regexp) patterns := []string{ ".*TestRegexp1.*", ".*TestRegexp2.*", ".*TestRegexp3.*", } comp := func(pattern string) { rex := mustCompileRegexp(pattern) assert.NotNil(t, rex) assert.IsType(t, vrex, rex) } for i := 0; i < 20; i++ { ii := i t.Run(patterns[ii%3], func(t *testing.T) { t.Parallel() comp(patterns[ii%3]) }) } } validate-0.24.0/schema.go000066400000000000000000000203071457312750000151630ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "encoding/json" "reflect" "github.com/go-openapi/errors" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // SchemaValidator validates data against a JSON schema type SchemaValidator struct { Path string in string Schema *spec.Schema validators [8]valueValidator Root interface{} KnownFormats strfmt.Registry Options *SchemaValidatorOptions } // AgainstSchema validates the specified data against the provided schema, using a registry of supported formats. // // When no pre-parsed *spec.Schema structure is provided, it uses a JSON schema as default. See example. func AgainstSchema(schema *spec.Schema, data interface{}, formats strfmt.Registry, options ...Option) error { res := NewSchemaValidator(schema, nil, "", formats, append(options, WithRecycleValidators(true), withRecycleResults(true))..., ).Validate(data) defer func() { pools.poolOfResults.RedeemResult(res) }() if res.HasErrors() { return errors.CompositeValidationError(res.Errors...) } return nil } // NewSchemaValidator creates a new schema validator. // // Panics if the provided schema is invalid. func NewSchemaValidator(schema *spec.Schema, rootSchema interface{}, root string, formats strfmt.Registry, options ...Option) *SchemaValidator { opts := new(SchemaValidatorOptions) for _, o := range options { o(opts) } return newSchemaValidator(schema, rootSchema, root, formats, opts) } func newSchemaValidator(schema *spec.Schema, rootSchema interface{}, root string, formats strfmt.Registry, opts *SchemaValidatorOptions) *SchemaValidator { if schema == nil { return nil } if rootSchema == nil { rootSchema = schema } if schema.ID != "" || schema.Ref.String() != "" || schema.Ref.IsRoot() { err := spec.ExpandSchema(schema, rootSchema, nil) if err != nil { msg := invalidSchemaProvidedMsg(err).Error() panic(msg) } } if opts == nil { opts = new(SchemaValidatorOptions) } var s *SchemaValidator if opts.recycleValidators { s = pools.poolOfSchemaValidators.BorrowValidator() } else { s = new(SchemaValidator) } s.Path = root s.in = "body" s.Schema = schema s.Root = rootSchema s.Options = opts s.KnownFormats = formats s.validators = [8]valueValidator{ s.typeValidator(), s.schemaPropsValidator(), s.stringValidator(), s.formatValidator(), s.numberValidator(), s.sliceValidator(), s.commonValidator(), s.objectValidator(), } return s } // SetPath sets the path for this schema valdiator func (s *SchemaValidator) SetPath(path string) { s.Path = path } // Applies returns true when this schema validator applies func (s *SchemaValidator) Applies(source interface{}, _ reflect.Kind) bool { _, ok := source.(*spec.Schema) return ok } // Validate validates the data against the schema func (s *SchemaValidator) Validate(data interface{}) *Result { if s == nil { return emptyResult } if s.Options.recycleValidators { defer func() { s.redeemChildren() s.redeem() // one-time use validator }() } var result *Result if s.Options.recycleResult { result = pools.poolOfResults.BorrowResult() result.data = data } else { result = &Result{data: data} } if s.Schema != nil && !s.Options.skipSchemataResult { result.addRootObjectSchemata(s.Schema) } if data == nil { // early exit with minimal validation result.Merge(s.validators[0].Validate(data)) // type validator result.Merge(s.validators[6].Validate(data)) // common validator if s.Options.recycleValidators { s.validators[0] = nil s.validators[6] = nil } return result } tpe := reflect.TypeOf(data) kind := tpe.Kind() for kind == reflect.Ptr { tpe = tpe.Elem() kind = tpe.Kind() } d := data if kind == reflect.Struct { // NOTE: since reflect retrieves the true nature of types // this means that all strfmt types passed here (e.g. strfmt.Datetime, etc..) // are converted here to strings, and structs are systematically converted // to map[string]interface{}. d = swag.ToDynamicJSON(data) } // TODO: this part should be handed over to type validator // Handle special case of json.Number data (number marshalled as string) isnumber := s.Schema.Type.Contains(numberType) || s.Schema.Type.Contains(integerType) if num, ok := data.(json.Number); ok && isnumber { if s.Schema.Type.Contains(integerType) { // avoid lossy conversion in, erri := num.Int64() if erri != nil { result.AddErrors(invalidTypeConversionMsg(s.Path, erri)) result.Inc() return result } d = in } else { nf, errf := num.Float64() if errf != nil { result.AddErrors(invalidTypeConversionMsg(s.Path, errf)) result.Inc() return result } d = nf } tpe = reflect.TypeOf(d) kind = tpe.Kind() } for idx, v := range s.validators { if !v.Applies(s.Schema, kind) { if s.Options.recycleValidators { // Validate won't be called, so relinquish this validator if redeemableChildren, ok := v.(interface{ redeemChildren() }); ok { redeemableChildren.redeemChildren() } if redeemable, ok := v.(interface{ redeem() }); ok { redeemable.redeem() } s.validators[idx] = nil // prevents further (unsafe) usage } continue } result.Merge(v.Validate(d)) if s.Options.recycleValidators { s.validators[idx] = nil // prevents further (unsafe) usage } result.Inc() } result.Inc() return result } func (s *SchemaValidator) typeValidator() valueValidator { return newTypeValidator( s.Path, s.in, s.Schema.Type, s.Schema.Nullable, s.Schema.Format, s.Options, ) } func (s *SchemaValidator) commonValidator() valueValidator { return newBasicCommonValidator( s.Path, s.in, s.Schema.Default, s.Schema.Enum, s.Options, ) } func (s *SchemaValidator) sliceValidator() valueValidator { return newSliceValidator( s.Path, s.in, s.Schema.MaxItems, s.Schema.MinItems, s.Schema.UniqueItems, s.Schema.AdditionalItems, s.Schema.Items, s.Root, s.KnownFormats, s.Options, ) } func (s *SchemaValidator) numberValidator() valueValidator { return newNumberValidator( s.Path, s.in, s.Schema.Default, s.Schema.MultipleOf, s.Schema.Maximum, s.Schema.ExclusiveMaximum, s.Schema.Minimum, s.Schema.ExclusiveMinimum, "", "", s.Options, ) } func (s *SchemaValidator) stringValidator() valueValidator { return newStringValidator( s.Path, s.in, nil, false, false, s.Schema.MaxLength, s.Schema.MinLength, s.Schema.Pattern, s.Options, ) } func (s *SchemaValidator) formatValidator() valueValidator { return newFormatValidator( s.Path, s.in, s.Schema.Format, s.KnownFormats, s.Options, ) } func (s *SchemaValidator) schemaPropsValidator() valueValidator { sch := s.Schema return newSchemaPropsValidator( s.Path, s.in, sch.AllOf, sch.OneOf, sch.AnyOf, sch.Not, sch.Dependencies, s.Root, s.KnownFormats, s.Options, ) } func (s *SchemaValidator) objectValidator() valueValidator { return newObjectValidator( s.Path, s.in, s.Schema.MaxProperties, s.Schema.MinProperties, s.Schema.Required, s.Schema.Properties, s.Schema.AdditionalProperties, s.Schema.PatternProperties, s.Root, s.KnownFormats, s.Options, ) } func (s *SchemaValidator) redeem() { pools.poolOfSchemaValidators.RedeemValidator(s) } func (s *SchemaValidator) redeemChildren() { for i, validator := range s.validators { if validator == nil { continue } if redeemableChildren, ok := validator.(interface{ redeemChildren() }); ok { redeemableChildren.redeemChildren() } if redeemable, ok := validator.(interface{ redeem() }); ok { redeemable.redeem() } s.validators[i] = nil // free up allocated children if not in pool } } validate-0.24.0/schema_messages.go000066400000000000000000000071571457312750000170620ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "github.com/go-openapi/errors" ) // Error messages related to schema validation and returned as results. const ( // ArrayDoesNotAllowAdditionalItemsError when an additionalItems construct is not verified by the array values provided. // // TODO: should move to package go-openapi/errors ArrayDoesNotAllowAdditionalItemsError = "array doesn't allow for additional items" // HasDependencyError indicates that a dependencies construct was not verified HasDependencyError = "%q has a dependency on %s" // InvalidSchemaProvidedError indicates that the schema provided to validate a value cannot be properly compiled InvalidSchemaProvidedError = "Invalid schema provided to SchemaValidator: %v" // InvalidTypeConversionError indicates that a numerical conversion for the given type could not be carried on InvalidTypeConversionError = "invalid type conversion in %s: %v " // MustValidateAtLeastOneSchemaError indicates that in a AnyOf construct, none of the schema constraints specified were verified MustValidateAtLeastOneSchemaError = "%q must validate at least one schema (anyOf)" // MustValidateOnlyOneSchemaError indicates that in a OneOf construct, either none of the schema constraints specified were verified, or several were MustValidateOnlyOneSchemaError = "%q must validate one and only one schema (oneOf). %s" // MustValidateAllSchemasError indicates that in a AllOf construct, at least one of the schema constraints specified were not verified // // TODO: punctuation in message MustValidateAllSchemasError = "%q must validate all the schemas (allOf)%s" // MustNotValidateSchemaError indicates that in a Not construct, the schema constraint specified was verified MustNotValidateSchemaError = "%q must not validate the schema (not)" ) // Warning messages related to schema validation and returned as results const () func invalidSchemaProvidedMsg(err error) errors.Error { return errors.New(InternalErrorCode, InvalidSchemaProvidedError, err) } func invalidTypeConversionMsg(path string, err error) errors.Error { return errors.New(errors.CompositeErrorCode, InvalidTypeConversionError, path, err) } func mustValidateOnlyOneSchemaMsg(path, additionalMsg string) errors.Error { return errors.New(errors.CompositeErrorCode, MustValidateOnlyOneSchemaError, path, additionalMsg) } func mustValidateAtLeastOneSchemaMsg(path string) errors.Error { return errors.New(errors.CompositeErrorCode, MustValidateAtLeastOneSchemaError, path) } func mustValidateAllSchemasMsg(path, additionalMsg string) errors.Error { return errors.New(errors.CompositeErrorCode, MustValidateAllSchemasError, path, additionalMsg) } func mustNotValidatechemaMsg(path string) errors.Error { return errors.New(errors.CompositeErrorCode, MustNotValidateSchemaError, path) } func hasADependencyMsg(path, depkey string) errors.Error { return errors.New(errors.CompositeErrorCode, HasDependencyError, path, depkey) } func arrayDoesNotAllowAdditionalItemsMsg() errors.Error { return errors.New(errors.CompositeErrorCode, ArrayDoesNotAllowAdditionalItemsError) } validate-0.24.0/schema_option.go000066400000000000000000000053541457312750000165600ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate // SchemaValidatorOptions defines optional rules for schema validation type SchemaValidatorOptions struct { EnableObjectArrayTypeCheck bool EnableArrayMustHaveItemsCheck bool recycleValidators bool recycleResult bool skipSchemataResult bool } // Option sets optional rules for schema validation type Option func(*SchemaValidatorOptions) // EnableObjectArrayTypeCheck activates the swagger rule: an items must be in type: array func EnableObjectArrayTypeCheck(enable bool) Option { return func(svo *SchemaValidatorOptions) { svo.EnableObjectArrayTypeCheck = enable } } // EnableArrayMustHaveItemsCheck activates the swagger rule: an array must have items defined func EnableArrayMustHaveItemsCheck(enable bool) Option { return func(svo *SchemaValidatorOptions) { svo.EnableArrayMustHaveItemsCheck = enable } } // SwaggerSchema activates swagger schema validation rules func SwaggerSchema(enable bool) Option { return func(svo *SchemaValidatorOptions) { svo.EnableObjectArrayTypeCheck = enable svo.EnableArrayMustHaveItemsCheck = enable } } // WithRecycleValidators saves memory allocations and makes validators // available for a single use of Validate() only. // // When a validator is recycled, called MUST not call the Validate() method twice. func WithRecycleValidators(enable bool) Option { return func(svo *SchemaValidatorOptions) { svo.recycleValidators = enable } } func withRecycleResults(enable bool) Option { return func(svo *SchemaValidatorOptions) { svo.recycleResult = enable } } // WithSkipSchemataResult skips the deep audit payload stored in validation Result func WithSkipSchemataResult(enable bool) Option { return func(svo *SchemaValidatorOptions) { svo.skipSchemataResult = enable } } // Options returns the current set of options func (svo SchemaValidatorOptions) Options() []Option { return []Option{ EnableObjectArrayTypeCheck(svo.EnableObjectArrayTypeCheck), EnableArrayMustHaveItemsCheck(svo.EnableArrayMustHaveItemsCheck), WithRecycleValidators(svo.recycleValidators), withRecycleResults(svo.recycleResult), WithSkipSchemataResult(svo.skipSchemataResult), } } validate-0.24.0/schema_option_test.go000066400000000000000000000034251457312750000176140ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "testing" "github.com/stretchr/testify/require" ) func TestSchemaOptions(t *testing.T) { t.Run("EnableObjectArrayTypeCheck", func(t *testing.T) { opts := &SchemaValidatorOptions{} setter := EnableObjectArrayTypeCheck(true) setter(opts) require.True(t, opts.EnableObjectArrayTypeCheck) }) t.Run("skipSchemataResult", func(t *testing.T) { opts := &SchemaValidatorOptions{} setter := WithSkipSchemataResult(true) setter(opts) require.True(t, opts.skipSchemataResult) }) t.Run("default Options()", func(t *testing.T) { opts := &SchemaValidatorOptions{} setters := opts.Options() target := &SchemaValidatorOptions{} for _, apply := range setters { apply(target) } require.Equal(t, opts, target) }) t.Run("all set Options()", func(t *testing.T) { opts := &SchemaValidatorOptions{ EnableObjectArrayTypeCheck: true, EnableArrayMustHaveItemsCheck: true, recycleValidators: true, recycleResult: true, skipSchemataResult: true, } setters := opts.Options() target := &SchemaValidatorOptions{} for _, apply := range setters { apply(target) } require.Equal(t, opts, target) }) } validate-0.24.0/schema_props.go000066400000000000000000000231021457312750000164020ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "fmt" "reflect" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" ) type schemaPropsValidator struct { Path string In string AllOf []spec.Schema OneOf []spec.Schema AnyOf []spec.Schema Not *spec.Schema Dependencies spec.Dependencies anyOfValidators []*SchemaValidator allOfValidators []*SchemaValidator oneOfValidators []*SchemaValidator notValidator *SchemaValidator Root interface{} KnownFormats strfmt.Registry Options *SchemaValidatorOptions } func (s *schemaPropsValidator) SetPath(path string) { s.Path = path } func newSchemaPropsValidator( path string, in string, allOf, oneOf, anyOf []spec.Schema, not *spec.Schema, deps spec.Dependencies, root interface{}, formats strfmt.Registry, opts *SchemaValidatorOptions) *schemaPropsValidator { if opts == nil { opts = new(SchemaValidatorOptions) } anyValidators := make([]*SchemaValidator, 0, len(anyOf)) for i := range anyOf { anyValidators = append(anyValidators, newSchemaValidator(&anyOf[i], root, path, formats, opts)) } allValidators := make([]*SchemaValidator, 0, len(allOf)) for i := range allOf { allValidators = append(allValidators, newSchemaValidator(&allOf[i], root, path, formats, opts)) } oneValidators := make([]*SchemaValidator, 0, len(oneOf)) for i := range oneOf { oneValidators = append(oneValidators, newSchemaValidator(&oneOf[i], root, path, formats, opts)) } var notValidator *SchemaValidator if not != nil { notValidator = newSchemaValidator(not, root, path, formats, opts) } var s *schemaPropsValidator if opts.recycleValidators { s = pools.poolOfSchemaPropsValidators.BorrowValidator() } else { s = new(schemaPropsValidator) } s.Path = path s.In = in s.AllOf = allOf s.OneOf = oneOf s.AnyOf = anyOf s.Not = not s.Dependencies = deps s.anyOfValidators = anyValidators s.allOfValidators = allValidators s.oneOfValidators = oneValidators s.notValidator = notValidator s.Root = root s.KnownFormats = formats s.Options = opts return s } func (s *schemaPropsValidator) Applies(source interface{}, _ reflect.Kind) bool { _, isSchema := source.(*spec.Schema) return isSchema } func (s *schemaPropsValidator) Validate(data interface{}) *Result { var mainResult *Result if s.Options.recycleResult { mainResult = pools.poolOfResults.BorrowResult() } else { mainResult = new(Result) } // Intermediary error results // IMPORTANT! messages from underlying validators var keepResultAnyOf, keepResultOneOf, keepResultAllOf *Result if s.Options.recycleValidators { defer func() { s.redeemChildren() s.redeem() // results are redeemed when merged }() } if len(s.anyOfValidators) > 0 { keepResultAnyOf = pools.poolOfResults.BorrowResult() s.validateAnyOf(data, mainResult, keepResultAnyOf) } if len(s.oneOfValidators) > 0 { keepResultOneOf = pools.poolOfResults.BorrowResult() s.validateOneOf(data, mainResult, keepResultOneOf) } if len(s.allOfValidators) > 0 { keepResultAllOf = pools.poolOfResults.BorrowResult() s.validateAllOf(data, mainResult, keepResultAllOf) } if s.notValidator != nil { s.validateNot(data, mainResult) } if s.Dependencies != nil && len(s.Dependencies) > 0 && reflect.TypeOf(data).Kind() == reflect.Map { s.validateDependencies(data, mainResult) } mainResult.Inc() // In the end we retain best failures for schema validation // plus, if any, composite errors which may explain special cases (tagged as IMPORTANT!). return mainResult.Merge(keepResultAllOf, keepResultOneOf, keepResultAnyOf) } func (s *schemaPropsValidator) validateAnyOf(data interface{}, mainResult, keepResultAnyOf *Result) { // Validates at least one in anyOf schemas var bestFailures *Result for i, anyOfSchema := range s.anyOfValidators { result := anyOfSchema.Validate(data) if s.Options.recycleValidators { s.anyOfValidators[i] = nil } // We keep inner IMPORTANT! errors no matter what MatchCount tells us keepResultAnyOf.Merge(result.keepRelevantErrors()) // merges (and redeems) a new instance of Result if result.IsValid() { if bestFailures != nil && bestFailures.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(bestFailures) } _ = keepResultAnyOf.cleared() mainResult.Merge(result) return } // MatchCount is used to select errors from the schema with most positive checks if bestFailures == nil || result.MatchCount > bestFailures.MatchCount { if bestFailures != nil && bestFailures.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(bestFailures) } bestFailures = result continue } if result.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(result) // this result is ditched } } mainResult.AddErrors(mustValidateAtLeastOneSchemaMsg(s.Path)) mainResult.Merge(bestFailures) } func (s *schemaPropsValidator) validateOneOf(data interface{}, mainResult, keepResultOneOf *Result) { // Validates exactly one in oneOf schemas var ( firstSuccess, bestFailures *Result validated int ) for i, oneOfSchema := range s.oneOfValidators { result := oneOfSchema.Validate(data) if s.Options.recycleValidators { s.oneOfValidators[i] = nil } // We keep inner IMPORTANT! errors no matter what MatchCount tells us keepResultOneOf.Merge(result.keepRelevantErrors()) // merges (and redeems) a new instance of Result if result.IsValid() { validated++ _ = keepResultOneOf.cleared() if firstSuccess == nil { firstSuccess = result } else if result.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(result) // this result is ditched } continue } // MatchCount is used to select errors from the schema with most positive checks if validated == 0 && (bestFailures == nil || result.MatchCount > bestFailures.MatchCount) { if bestFailures != nil && bestFailures.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(bestFailures) } bestFailures = result } else if result.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(result) // this result is ditched } } switch validated { case 0: mainResult.AddErrors(mustValidateOnlyOneSchemaMsg(s.Path, "Found none valid")) mainResult.Merge(bestFailures) // firstSucess necessarily nil case 1: mainResult.Merge(firstSuccess) if bestFailures != nil && bestFailures.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(bestFailures) } default: mainResult.AddErrors(mustValidateOnlyOneSchemaMsg(s.Path, fmt.Sprintf("Found %d valid alternatives", validated))) mainResult.Merge(bestFailures) if firstSuccess != nil && firstSuccess.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(firstSuccess) } } } func (s *schemaPropsValidator) validateAllOf(data interface{}, mainResult, keepResultAllOf *Result) { // Validates all of allOf schemas var validated int for i, allOfSchema := range s.allOfValidators { result := allOfSchema.Validate(data) if s.Options.recycleValidators { s.allOfValidators[i] = nil } // We keep inner IMPORTANT! errors no matter what MatchCount tells us keepResultAllOf.Merge(result.keepRelevantErrors()) if result.IsValid() { validated++ } mainResult.Merge(result) } switch validated { case 0: mainResult.AddErrors(mustValidateAllSchemasMsg(s.Path, ". None validated")) case len(s.allOfValidators): default: mainResult.AddErrors(mustValidateAllSchemasMsg(s.Path, "")) } } func (s *schemaPropsValidator) validateNot(data interface{}, mainResult *Result) { result := s.notValidator.Validate(data) if s.Options.recycleValidators { s.notValidator = nil } // We keep inner IMPORTANT! errors no matter what MatchCount tells us if result.IsValid() { mainResult.AddErrors(mustNotValidatechemaMsg(s.Path)) } if result.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(result) // this result is ditched } } func (s *schemaPropsValidator) validateDependencies(data interface{}, mainResult *Result) { val := data.(map[string]interface{}) for key := range val { dep, ok := s.Dependencies[key] if !ok { continue } if dep.Schema != nil { mainResult.Merge( newSchemaValidator(dep.Schema, s.Root, s.Path+"."+key, s.KnownFormats, s.Options).Validate(data), ) continue } if len(dep.Property) > 0 { for _, depKey := range dep.Property { if _, ok := val[depKey]; !ok { mainResult.AddErrors(hasADependencyMsg(s.Path, depKey)) } } } } } func (s *schemaPropsValidator) redeem() { pools.poolOfSchemaPropsValidators.RedeemValidator(s) } func (s *schemaPropsValidator) redeemChildren() { for _, v := range s.anyOfValidators { if v == nil { continue } v.redeemChildren() v.redeem() } s.anyOfValidators = nil for _, v := range s.allOfValidators { if v == nil { continue } v.redeemChildren() v.redeem() } s.allOfValidators = nil for _, v := range s.oneOfValidators { if v == nil { continue } v.redeemChildren() v.redeem() } s.oneOfValidators = nil if s.notValidator != nil { s.notValidator.redeemChildren() s.notValidator.redeem() s.notValidator = nil } } validate-0.24.0/schema_props_test.go000066400000000000000000000131641457312750000174500ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "testing" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Test edge cases in schema_props_validator which are difficult // to simulate with specs // (this one is a trivial, just to check all methods are filled) func TestSchemaPropsValidator_EdgeCases(t *testing.T) { t.Run("should validate props against empty validator", func(t *testing.T) { s := newSchemaPropsValidator( "", "", nil, nil, nil, nil, nil, nil, strfmt.Default, nil) s.SetPath("path") assert.Equal(t, "path", s.Path) }) t.Run("with allOf", func(t *testing.T) { makeValidator := func() EntityValidator { return newSchemaPropsValidator( "path", "body", []spec.Schema{ *spec.StringProperty(), *spec.StrFmtProperty("date"), }, nil, nil, nil, nil, nil, strfmt.Default, &SchemaValidatorOptions{recycleValidators: true}) } t.Run("should validate date string", func(t *testing.T) { s := makeValidator() const data = "2024-01-25" res := s.Validate(data) require.NotNil(t, res) require.Empty(t, res.Errors) }) t.Run("should NOT validate unformatted string", func(t *testing.T) { s := makeValidator() const data = "string_value" res := s.Validate(data) require.NotNil(t, res) require.NotEmpty(t, res.Errors) }) t.Run("should NOT validate number", func(t *testing.T) { s := makeValidator() const data = 1 res := s.Validate(data) require.NotNil(t, res) require.NotEmpty(t, res.Errors) }) }) t.Run("with oneOf", func(t *testing.T) { makeValidator := func() EntityValidator { return newSchemaPropsValidator( "path", "body", nil, []spec.Schema{ *spec.Int64Property(), *spec.StrFmtProperty("date"), }, nil, nil, nil, nil, strfmt.Default, &SchemaValidatorOptions{recycleValidators: true}) } t.Run("should validate date string", func(t *testing.T) { s := makeValidator() const data = "2024-01-01" res := s.Validate(data) require.NotNil(t, res) require.Empty(t, res.Errors) }) t.Run("should validate number", func(t *testing.T) { s := makeValidator() const data = 1 res := s.Validate(data) require.NotNil(t, res) require.Empty(t, res.Errors) }) }) t.Run("with anyOf", func(t *testing.T) { makeValidator := func() EntityValidator { return newSchemaPropsValidator( "path", "body", nil, nil, []spec.Schema{ *spec.StringProperty(), *spec.StrFmtProperty("date"), }, nil, nil, nil, strfmt.Default, &SchemaValidatorOptions{recycleValidators: true}) } t.Run("should validate date string", func(t *testing.T) { s := makeValidator() const data = "2024-01-01" res := s.Validate(data) require.NotNil(t, res) require.Empty(t, res.Errors) }) t.Run("should validate unformatted string", func(t *testing.T) { s := makeValidator() const data = "string_value" res := s.Validate(data) require.NotNil(t, res) require.Empty(t, res.Errors) }) }) t.Run("with not", func(t *testing.T) { makeValidator := func() EntityValidator { return newSchemaPropsValidator( "path", "body", nil, nil, nil, spec.StringProperty(), nil, nil, strfmt.Default, &SchemaValidatorOptions{recycleValidators: true}) } t.Run("should validate number", func(t *testing.T) { s := makeValidator() const data = 1 res := s.Validate(data) require.NotNil(t, res) require.Empty(t, res.Errors) }) t.Run("should NOT validate string", func(t *testing.T) { s := makeValidator() const data = "string_value" res := s.Validate(data) require.NotNil(t, res) require.NotEmpty(t, res.Errors) }) }) t.Run("with nested schema props", func(t *testing.T) { makeValidator := func() EntityValidator { return newSchemaValidator( &spec.Schema{ SchemaProps: spec.SchemaProps{ AllOf: []spec.Schema{ { SchemaProps: spec.SchemaProps{ OneOf: []spec.Schema{ { SchemaProps: spec.SchemaProps{ AnyOf: []spec.Schema{ { SchemaProps: spec.SchemaProps{ Not: spec.StringProperty(), }, }, *spec.BoolProperty(), }, }, }, *spec.StringProperty(), }, }, }, *spec.Int64Property(), }, }, }, nil, "root", strfmt.Default, &SchemaValidatorOptions{recycleValidators: true}) } t.Run("should validate number", func(t *testing.T) { s := makeValidator() const data = 1 res := s.Validate(data) require.NotNil(t, res) require.Empty(t, res.Errors) }) t.Run("should NOT validate string", func(t *testing.T) { s := makeValidator() const data = "string_value" res := s.Validate(data) require.NotNil(t, res) require.NotEmpty(t, res.Errors) }) t.Run("should exit early and redeem children validator", func(t *testing.T) { s := makeValidator() res := s.Validate(nil) require.NotNil(t, res) require.Empty(t, res.Errors) }) }) } validate-0.24.0/schema_test.go000066400000000000000000000135741457312750000162320ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "encoding/json" "math" "reflect" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) func TestSchemaValidator_Validate_Pattern(t *testing.T) { var schemaJSON = ` { "properties": { "name": { "type": "string", "pattern": "^[A-Za-z]+$", "minLength": 1 }, "place": { "type": "string", "pattern": "^[A-Za-z]+$", "minLength": 1 } }, "required": [ "name" ] }` schema := new(spec.Schema) require.NoError(t, json.Unmarshal([]byte(schemaJSON), schema)) var input map[string]interface{} var inputJSON = `{"name": "Ivan"}` require.NoError(t, json.Unmarshal([]byte(inputJSON), &input)) require.NoError(t, AgainstSchema(schema, input, strfmt.Default)) input["place"] = json.Number("10") require.Error(t, AgainstSchema(schema, input, strfmt.Default)) } func TestSchemaValidator_PatternProperties(t *testing.T) { var schemaJSON = ` { "properties": { "name": { "type": "string", "pattern": "^[A-Za-z]+$", "minLength": 1 } }, "patternProperties": { "address-[0-9]+": { "type": "string", "pattern": "^[\\s|a-z]+$" } }, "required": [ "name" ], "additionalProperties": false }` schema := new(spec.Schema) require.NoError(t, json.Unmarshal([]byte(schemaJSON), schema)) var input map[string]interface{} // ok var inputJSON = `{"name": "Ivan","address-1": "sesame street"}` require.NoError(t, json.Unmarshal([]byte(inputJSON), &input)) require.NoError(t, AgainstSchema(schema, input, strfmt.Default)) // fail pattern regexp input["address-1"] = "1, Sesame Street" require.Error(t, AgainstSchema(schema, input, strfmt.Default)) // fail patternProperties regexp inputJSON = `{"name": "Ivan","address-1": "sesame street","address-A": "address"}` require.NoError(t, json.Unmarshal([]byte(inputJSON), &input)) require.Error(t, AgainstSchema(schema, input, strfmt.Default)) } func TestSchemaValidator_Panic(t *testing.T) { assert.PanicsWithValue(t, `Invalid schema provided to SchemaValidator: object has no field "pointer-to-nowhere"`, schemaValidatorPanicker) } func schemaValidatorPanicker() { var schemaJSON = ` { "$ref": "#/pointer-to-nowhere" }` schema := new(spec.Schema) _ = json.Unmarshal([]byte(schemaJSON), schema) var input map[string]interface{} // ok var inputJSON = `{"name": "Ivan","address-1": "sesame street"}` _ = json.Unmarshal([]byte(inputJSON), &input) // panics _ = AgainstSchema(schema, input, strfmt.Default) } // Test edge cases in schemaValidator which are difficult // to simulate with specs func TestSchemaValidator_EdgeCases(t *testing.T) { var s *SchemaValidator res := s.Validate("123") assert.NotNil(t, res) assert.True(t, res.IsValid()) s = NewSchemaValidator(nil, nil, "", strfmt.Default) assert.Nil(t, s) v := "ABC" b := s.Applies(v, reflect.String) assert.False(t, b) sp := spec.Schema{} b = s.Applies(&sp, reflect.Struct) assert.True(t, b) spp := spec.Float64Property() s = NewSchemaValidator(spp, nil, "", strfmt.Default) s.SetPath("path") assert.Equal(t, "path", s.Path) r := s.Validate(nil) assert.NotNil(t, r) assert.False(t, r.IsValid()) // Validating json.Number data against number|float64 j := json.Number("123") r = s.Validate(j) assert.True(t, r.IsValid()) // Validating json.Number data against integer|int32 spp = spec.Int32Property() s = NewSchemaValidator(spp, nil, "", strfmt.Default) j = json.Number("123") r = s.Validate(j) assert.True(t, r.IsValid()) bignum := swag.FormatFloat64(math.MaxFloat64) j = json.Number(bignum) r = s.Validate(j) assert.False(t, r.IsValid()) // Validating incorrect json.Number data spp = spec.Float64Property() s = NewSchemaValidator(spp, nil, "", strfmt.Default) j = json.Number("AXF") r = s.Validate(j) assert.False(t, r.IsValid()) } func TestSchemaValidator_SchemaOptions(t *testing.T) { var schemaJSON = ` { "properties": { "spec": { "properties": { "replicas": { "type": "integer" } } } } }` schema := new(spec.Schema) require.NoError(t, json.Unmarshal([]byte(schemaJSON), schema)) var input map[string]interface{} var inputJSON = `{"spec": {"items": ["foo", "bar"], "replicas": 1}}` require.NoError(t, json.Unmarshal([]byte(inputJSON), &input)) // ok s := NewSchemaValidator(schema, nil, "", strfmt.Default, EnableObjectArrayTypeCheck(false)) result := s.Validate(input) assert.True(t, result.IsValid()) // fail s = NewSchemaValidator(schema, nil, "", strfmt.Default, EnableObjectArrayTypeCheck(true)) result = s.Validate(input) assert.False(t, result.IsValid()) } func TestSchemaValidator_TypeArray_Issue83(t *testing.T) { var schemaJSON = ` { "type": "object" }` schema := new(spec.Schema) require.NoError(t, json.Unmarshal([]byte(schemaJSON), schema)) var input map[string]interface{} var inputJSON = `{"type": "array"}` require.NoError(t, json.Unmarshal([]byte(inputJSON), &input)) // default behavior: jsonschema require.NoError(t, AgainstSchema(schema, input, strfmt.Default)) // swagger behavior require.Error(t, AgainstSchema(schema, input, strfmt.Default, SwaggerSchema(true))) } validate-0.24.0/slice_validator.go000066400000000000000000000077211457312750000170740ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "fmt" "reflect" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" ) type schemaSliceValidator struct { Path string In string MaxItems *int64 MinItems *int64 UniqueItems bool AdditionalItems *spec.SchemaOrBool Items *spec.SchemaOrArray Root interface{} KnownFormats strfmt.Registry Options *SchemaValidatorOptions } func newSliceValidator(path, in string, maxItems, minItems *int64, uniqueItems bool, additionalItems *spec.SchemaOrBool, items *spec.SchemaOrArray, root interface{}, formats strfmt.Registry, opts *SchemaValidatorOptions) *schemaSliceValidator { if opts == nil { opts = new(SchemaValidatorOptions) } var v *schemaSliceValidator if opts.recycleValidators { v = pools.poolOfSliceValidators.BorrowValidator() } else { v = new(schemaSliceValidator) } v.Path = path v.In = in v.MaxItems = maxItems v.MinItems = minItems v.UniqueItems = uniqueItems v.AdditionalItems = additionalItems v.Items = items v.Root = root v.KnownFormats = formats v.Options = opts return v } func (s *schemaSliceValidator) SetPath(path string) { s.Path = path } func (s *schemaSliceValidator) Applies(source interface{}, kind reflect.Kind) bool { _, ok := source.(*spec.Schema) r := ok && kind == reflect.Slice return r } func (s *schemaSliceValidator) Validate(data interface{}) *Result { if s.Options.recycleValidators { defer func() { s.redeem() }() } var result *Result if s.Options.recycleResult { result = pools.poolOfResults.BorrowResult() } else { result = new(Result) } if data == nil { return result } val := reflect.ValueOf(data) size := val.Len() if s.Items != nil && s.Items.Schema != nil { for i := 0; i < size; i++ { validator := newSchemaValidator(s.Items.Schema, s.Root, s.Path, s.KnownFormats, s.Options) validator.SetPath(fmt.Sprintf("%s.%d", s.Path, i)) value := val.Index(i) result.mergeForSlice(val, i, validator.Validate(value.Interface())) } } itemsSize := 0 if s.Items != nil && len(s.Items.Schemas) > 0 { itemsSize = len(s.Items.Schemas) for i := 0; i < itemsSize; i++ { if size <= i { break } validator := newSchemaValidator(&s.Items.Schemas[i], s.Root, fmt.Sprintf("%s.%d", s.Path, i), s.KnownFormats, s.Options) result.mergeForSlice(val, i, validator.Validate(val.Index(i).Interface())) } } if s.AdditionalItems != nil && itemsSize < size { if s.Items != nil && len(s.Items.Schemas) > 0 && !s.AdditionalItems.Allows { result.AddErrors(arrayDoesNotAllowAdditionalItemsMsg()) } if s.AdditionalItems.Schema != nil { for i := itemsSize; i < size-itemsSize+1; i++ { validator := newSchemaValidator(s.AdditionalItems.Schema, s.Root, fmt.Sprintf("%s.%d", s.Path, i), s.KnownFormats, s.Options) result.mergeForSlice(val, i, validator.Validate(val.Index(i).Interface())) } } } if s.MinItems != nil { if err := MinItems(s.Path, s.In, int64(size), *s.MinItems); err != nil { result.AddErrors(err) } } if s.MaxItems != nil { if err := MaxItems(s.Path, s.In, int64(size), *s.MaxItems); err != nil { result.AddErrors(err) } } if s.UniqueItems { if err := UniqueItems(s.Path, s.In, val.Interface()); err != nil { result.AddErrors(err) } } result.Inc() return result } func (s *schemaSliceValidator) redeem() { pools.poolOfSliceValidators.RedeemValidator(s) } validate-0.24.0/slice_validator_test.go000066400000000000000000000020671457312750000201310ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "testing" "github.com/stretchr/testify/assert" ) // Test edge cases in slice_validator which are difficult // to simulate with specs // (this one is a trivial, just to check all methods are filled) func TestSliceValidator_EdgeCases(t *testing.T) { s := newSliceValidator("", "", nil, nil, false, nil, nil, nil, nil, nil) s.SetPath("path") assert.Equal(t, "path", s.Path) r := s.Validate(nil) assert.NotNil(t, r) assert.True(t, r.IsValid()) } validate-0.24.0/spec.go000066400000000000000000000621371457312750000146640ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "bytes" "encoding/gob" "encoding/json" "fmt" "sort" "strings" "github.com/go-openapi/analysis" "github.com/go-openapi/errors" "github.com/go-openapi/jsonpointer" "github.com/go-openapi/loads" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // Spec validates an OpenAPI 2.0 specification document. // // Returns an error flattening in a single standard error, all validation messages. // // - TODO: $ref should not have siblings // - TODO: make sure documentation reflects all checks and warnings // - TODO: check on discriminators // - TODO: explicit message on unsupported keywords (better than "forbidden property"...) // - TODO: full list of unresolved refs // - TODO: validate numeric constraints (issue#581): this should be handled like defaults and examples // - TODO: option to determine if we validate for go-swagger or in a more general context // - TODO: check on required properties to support anyOf, allOf, oneOf // // NOTE: SecurityScopes are maps: no need to check uniqueness func Spec(doc *loads.Document, formats strfmt.Registry) error { errs, _ /*warns*/ := NewSpecValidator(doc.Schema(), formats).Validate(doc) if errs.HasErrors() { return errors.CompositeValidationError(errs.Errors...) } return nil } // SpecValidator validates a swagger 2.0 spec type SpecValidator struct { schema *spec.Schema // swagger 2.0 schema spec *loads.Document analyzer *analysis.Spec expanded *loads.Document KnownFormats strfmt.Registry Options Opts // validation options schemaOptions *SchemaValidatorOptions } // NewSpecValidator creates a new swagger spec validator instance func NewSpecValidator(schema *spec.Schema, formats strfmt.Registry) *SpecValidator { // schema options that apply to all called validators schemaOptions := new(SchemaValidatorOptions) for _, o := range []Option{ SwaggerSchema(true), WithRecycleValidators(true), // withRecycleResults(true), } { o(schemaOptions) } return &SpecValidator{ schema: schema, KnownFormats: formats, Options: defaultOpts, schemaOptions: schemaOptions, } } // Validate validates the swagger spec func (s *SpecValidator) Validate(data interface{}) (*Result, *Result) { s.schemaOptions.skipSchemataResult = s.Options.SkipSchemataResult var sd *loads.Document errs, warnings := new(Result), new(Result) if v, ok := data.(*loads.Document); ok { sd = v } if sd == nil { errs.AddErrors(invalidDocumentMsg()) return errs, warnings // no point in continuing } s.spec = sd s.analyzer = analysis.New(sd.Spec()) // Raw spec unmarshalling errors var obj interface{} if err := json.Unmarshal(sd.Raw(), &obj); err != nil { // NOTE: under normal conditions, the *load.Document has been already unmarshalled // So this one is just a paranoid check on the behavior of the spec package panic(InvalidDocumentError) } defer func() { // errs holds all errors and warnings, // warnings only warnings errs.MergeAsWarnings(warnings) warnings.AddErrors(errs.Warnings...) }() // Swagger schema validator schv := newSchemaValidator(s.schema, nil, "", s.KnownFormats, s.schemaOptions) errs.Merge(schv.Validate(obj)) // error - // There may be a point in continuing to try and determine more accurate errors if !s.Options.ContinueOnErrors && errs.HasErrors() { return errs, warnings // no point in continuing } errs.Merge(s.validateReferencesValid()) // error - // There may be a point in continuing to try and determine more accurate errors if !s.Options.ContinueOnErrors && errs.HasErrors() { return errs, warnings // no point in continuing } errs.Merge(s.validateDuplicateOperationIDs()) errs.Merge(s.validateDuplicatePropertyNames()) // error - errs.Merge(s.validateParameters()) // error - errs.Merge(s.validateItems()) // error - // Properties in required definition MUST validate their schema // Properties SHOULD NOT be declared as both required and readOnly (warning) errs.Merge(s.validateRequiredDefinitions()) // error and warning // There may be a point in continuing to try and determine more accurate errors if !s.Options.ContinueOnErrors && errs.HasErrors() { return errs, warnings // no point in continuing } // Values provided as default MUST validate their schema df := &defaultValidator{SpecValidator: s, schemaOptions: s.schemaOptions} errs.Merge(df.Validate()) // Values provided as examples MUST validate their schema // Value provided as examples in a response without schema generate a warning // Known limitations: examples in responses for mime type not application/json are ignored (warning) ex := &exampleValidator{SpecValidator: s, schemaOptions: s.schemaOptions} errs.Merge(ex.Validate()) errs.Merge(s.validateNonEmptyPathParamNames()) // errs.Merge(s.validateRefNoSibling()) // warning only errs.Merge(s.validateReferenced()) // warning only return errs, warnings } func (s *SpecValidator) validateNonEmptyPathParamNames() *Result { res := pools.poolOfResults.BorrowResult() if s.spec.Spec().Paths == nil { // There is no Paths object: error res.AddErrors(noValidPathMsg()) return res } if s.spec.Spec().Paths.Paths == nil { // Paths may be empty: warning res.AddWarnings(noValidPathMsg()) return res } for k := range s.spec.Spec().Paths.Paths { if strings.Contains(k, "{}") { res.AddErrors(emptyPathParameterMsg(k)) } } return res } func (s *SpecValidator) validateDuplicateOperationIDs() *Result { // OperationID, if specified, must be unique across the board var analyzer *analysis.Spec if s.expanded != nil { // $ref are valid: we can analyze operations on an expanded spec analyzer = analysis.New(s.expanded.Spec()) } else { // fallback on possible incomplete picture because of previous errors analyzer = s.analyzer } res := pools.poolOfResults.BorrowResult() known := make(map[string]int) for _, v := range analyzer.OperationIDs() { if v != "" { known[v]++ } } for k, v := range known { if v > 1 { res.AddErrors(nonUniqueOperationIDMsg(k, v)) } } return res } type dupProp struct { Name string Definition string } func (s *SpecValidator) validateDuplicatePropertyNames() *Result { // definition can't declare a property that's already defined by one of its ancestors res := pools.poolOfResults.BorrowResult() for k, sch := range s.spec.Spec().Definitions { if len(sch.AllOf) == 0 { continue } knownanc := map[string]struct{}{ "#/definitions/" + k: {}, } ancs, rec := s.validateCircularAncestry(k, sch, knownanc) if rec != nil && (rec.HasErrors() || !rec.HasWarnings()) { res.Merge(rec) } if len(ancs) > 0 { res.AddErrors(circularAncestryDefinitionMsg(k, ancs)) return res } knowns := make(map[string]struct{}) dups, rep := s.validateSchemaPropertyNames(k, sch, knowns) if rep != nil && (rep.HasErrors() || rep.HasWarnings()) { res.Merge(rep) } if len(dups) > 0 { var pns []string for _, v := range dups { pns = append(pns, v.Definition+"."+v.Name) } res.AddErrors(duplicatePropertiesMsg(k, pns)) } } return res } func (s *SpecValidator) resolveRef(ref *spec.Ref) (*spec.Schema, error) { if s.spec.SpecFilePath() != "" { return spec.ResolveRefWithBase(s.spec.Spec(), ref, &spec.ExpandOptions{RelativeBase: s.spec.SpecFilePath()}) } // NOTE: it looks like with the new spec resolver, this code is now unrecheable return spec.ResolveRef(s.spec.Spec(), ref) } func (s *SpecValidator) validateSchemaPropertyNames(nm string, sch spec.Schema, knowns map[string]struct{}) ([]dupProp, *Result) { var dups []dupProp schn := nm schc := &sch res := pools.poolOfResults.BorrowResult() for schc.Ref.String() != "" { // gather property names reso, err := s.resolveRef(&schc.Ref) if err != nil { errorHelp.addPointerError(res, err, schc.Ref.String(), nm) return dups, res } schc = reso schn = sch.Ref.String() } if len(schc.AllOf) > 0 { for _, chld := range schc.AllOf { dup, rep := s.validateSchemaPropertyNames(schn, chld, knowns) if rep != nil && (rep.HasErrors() || rep.HasWarnings()) { res.Merge(rep) } dups = append(dups, dup...) } return dups, res } for k := range schc.Properties { _, ok := knowns[k] if ok { dups = append(dups, dupProp{Name: k, Definition: schn}) } else { knowns[k] = struct{}{} } } return dups, res } func (s *SpecValidator) validateCircularAncestry(nm string, sch spec.Schema, knowns map[string]struct{}) ([]string, *Result) { res := pools.poolOfResults.BorrowResult() if sch.Ref.String() == "" && len(sch.AllOf) == 0 { // Safeguard. We should not be able to actually get there return nil, res } var ancs []string schn := nm schc := &sch for schc.Ref.String() != "" { reso, err := s.resolveRef(&schc.Ref) if err != nil { errorHelp.addPointerError(res, err, schc.Ref.String(), nm) return ancs, res } schc = reso schn = sch.Ref.String() } if schn != nm && schn != "" { if _, ok := knowns[schn]; ok { ancs = append(ancs, schn) } knowns[schn] = struct{}{} if len(ancs) > 0 { return ancs, res } } if len(schc.AllOf) > 0 { for _, chld := range schc.AllOf { if chld.Ref.String() != "" || len(chld.AllOf) > 0 { anc, rec := s.validateCircularAncestry(schn, chld, knowns) if rec != nil && (rec.HasErrors() || !rec.HasWarnings()) { res.Merge(rec) } ancs = append(ancs, anc...) if len(ancs) > 0 { return ancs, res } } } } return ancs, res } func (s *SpecValidator) validateItems() *Result { // validate parameter, items, schema and response objects for presence of item if type is array res := pools.poolOfResults.BorrowResult() for method, pi := range s.analyzer.Operations() { for path, op := range pi { for _, param := range paramHelp.safeExpandedParamsFor(path, method, op.ID, res, s) { if param.TypeName() == arrayType && param.ItemsTypeName() == "" { res.AddErrors(arrayInParamRequiresItemsMsg(param.Name, op.ID)) continue } if param.In != swaggerBody { if param.Items != nil { items := param.Items for items.TypeName() == arrayType { if items.ItemsTypeName() == "" { res.AddErrors(arrayInParamRequiresItemsMsg(param.Name, op.ID)) break } items = items.Items } } } else { // In: body if param.Schema != nil { res.Merge(s.validateSchemaItems(*param.Schema, fmt.Sprintf("body param %q", param.Name), op.ID)) } } } var responses []spec.Response if op.Responses != nil { if op.Responses.Default != nil { responses = append(responses, *op.Responses.Default) } if op.Responses.StatusCodeResponses != nil { for _, v := range op.Responses.StatusCodeResponses { responses = append(responses, v) } } } for _, resp := range responses { // Response headers with array for hn, hv := range resp.Headers { if hv.TypeName() == arrayType && hv.ItemsTypeName() == "" { res.AddErrors(arrayInHeaderRequiresItemsMsg(hn, op.ID)) } } if resp.Schema != nil { res.Merge(s.validateSchemaItems(*resp.Schema, "response body", op.ID)) } } } } return res } // Verifies constraints on array type func (s *SpecValidator) validateSchemaItems(schema spec.Schema, prefix, opID string) *Result { res := pools.poolOfResults.BorrowResult() if !schema.Type.Contains(arrayType) { return res } if schema.Items == nil || schema.Items.Len() == 0 { res.AddErrors(arrayRequiresItemsMsg(prefix, opID)) return res } if schema.Items.Schema != nil { schema = *schema.Items.Schema if _, err := compileRegexp(schema.Pattern); err != nil { res.AddErrors(invalidItemsPatternMsg(prefix, opID, schema.Pattern)) } res.Merge(s.validateSchemaItems(schema, prefix, opID)) } return res } func (s *SpecValidator) validatePathParamPresence(path string, fromPath, fromOperation []string) *Result { // Each defined operation path parameters must correspond to a named element in the API's path pattern. // (For example, you cannot have a path parameter named id for the following path /pets/{petId} but you must have a path parameter named petId.) res := pools.poolOfResults.BorrowResult() for _, l := range fromPath { var matched bool for _, r := range fromOperation { if l == "{"+r+"}" { matched = true break } } if !matched { res.AddErrors(noParameterInPathMsg(l)) } } for _, p := range fromOperation { var matched bool for _, r := range fromPath { if "{"+p+"}" == r { matched = true break } } if !matched { res.AddErrors(pathParamNotInPathMsg(path, p)) } } return res } func (s *SpecValidator) validateReferenced() *Result { var res Result res.MergeAsWarnings(s.validateReferencedParameters()) res.MergeAsWarnings(s.validateReferencedResponses()) res.MergeAsWarnings(s.validateReferencedDefinitions()) return &res } func (s *SpecValidator) validateReferencedParameters() *Result { // Each referenceable definition should have references. params := s.spec.Spec().Parameters if len(params) == 0 { return nil } expected := make(map[string]struct{}) for k := range params { expected["#/parameters/"+jsonpointer.Escape(k)] = struct{}{} } for _, k := range s.analyzer.AllParameterReferences() { delete(expected, k) } if len(expected) == 0 { return nil } result := pools.poolOfResults.BorrowResult() for k := range expected { result.AddWarnings(unusedParamMsg(k)) } return result } func (s *SpecValidator) validateReferencedResponses() *Result { // Each referenceable definition should have references. responses := s.spec.Spec().Responses if len(responses) == 0 { return nil } expected := make(map[string]struct{}) for k := range responses { expected["#/responses/"+jsonpointer.Escape(k)] = struct{}{} } for _, k := range s.analyzer.AllResponseReferences() { delete(expected, k) } if len(expected) == 0 { return nil } result := pools.poolOfResults.BorrowResult() for k := range expected { result.AddWarnings(unusedResponseMsg(k)) } return result } func (s *SpecValidator) validateReferencedDefinitions() *Result { // Each referenceable definition must have references. defs := s.spec.Spec().Definitions if len(defs) == 0 { return nil } expected := make(map[string]struct{}) for k := range defs { expected["#/definitions/"+jsonpointer.Escape(k)] = struct{}{} } for _, k := range s.analyzer.AllDefinitionReferences() { delete(expected, k) } if len(expected) == 0 { return nil } result := new(Result) for k := range expected { result.AddWarnings(unusedDefinitionMsg(k)) } return result } func (s *SpecValidator) validateRequiredDefinitions() *Result { // Each property listed in the required array must be defined in the properties of the model res := pools.poolOfResults.BorrowResult() DEFINITIONS: for d, schema := range s.spec.Spec().Definitions { if schema.Required != nil { // Safeguard for _, pn := range schema.Required { red := s.validateRequiredProperties(pn, d, &schema) //#nosec res.Merge(red) if !red.IsValid() && !s.Options.ContinueOnErrors { break DEFINITIONS // there is an error, let's stop that bleeding } } } } return res } func (s *SpecValidator) validateRequiredProperties(path, in string, v *spec.Schema) *Result { // Takes care of recursive property definitions, which may be nested in additionalProperties schemas res := pools.poolOfResults.BorrowResult() propertyMatch := false patternMatch := false additionalPropertiesMatch := false isReadOnly := false // Regular properties if _, ok := v.Properties[path]; ok { propertyMatch = true isReadOnly = v.Properties[path].ReadOnly } // NOTE: patternProperties are not supported in swagger. Even though, we continue validation here // We check all defined patterns: if one regexp is invalid, croaks an error for pp, pv := range v.PatternProperties { re, err := compileRegexp(pp) if err != nil { res.AddErrors(invalidPatternMsg(pp, in)) } else if re.MatchString(path) { patternMatch = true if !propertyMatch { isReadOnly = pv.ReadOnly } } } if !(propertyMatch || patternMatch) { if v.AdditionalProperties != nil { if v.AdditionalProperties.Allows && v.AdditionalProperties.Schema == nil { additionalPropertiesMatch = true } else if v.AdditionalProperties.Schema != nil { // additionalProperties as schema are upported in swagger // recursively validates additionalProperties schema // TODO : anyOf, allOf, oneOf like in schemaPropsValidator red := s.validateRequiredProperties(path, in, v.AdditionalProperties.Schema) if red.IsValid() { additionalPropertiesMatch = true if !propertyMatch && !patternMatch { isReadOnly = v.AdditionalProperties.Schema.ReadOnly } } res.Merge(red) } } } if !(propertyMatch || patternMatch || additionalPropertiesMatch) { res.AddErrors(requiredButNotDefinedMsg(path, in)) } if isReadOnly { res.AddWarnings(readOnlyAndRequiredMsg(in, path)) } return res } func (s *SpecValidator) validateParameters() *Result { // - for each method, path is unique, regardless of path parameters // e.g. GET:/petstore/{id}, GET:/petstore/{pet}, GET:/petstore are // considered duplicate paths, if StrictPathParamUniqueness is enabled. // - each parameter should have a unique `name` and `type` combination // - each operation should have only 1 parameter of type body // - there must be at most 1 parameter in body // - parameters with pattern property must specify valid patterns // - $ref in parameters must resolve // - path param must be required res := pools.poolOfResults.BorrowResult() rexGarbledPathSegment := mustCompileRegexp(`.*[{}\s]+.*`) for method, pi := range s.expandedAnalyzer().Operations() { methodPaths := make(map[string]map[string]string) for path, op := range pi { if s.Options.StrictPathParamUniqueness { pathToAdd := pathHelp.stripParametersInPath(path) // Warn on garbled path afer param stripping if rexGarbledPathSegment.MatchString(pathToAdd) { res.AddWarnings(pathStrippedParamGarbledMsg(pathToAdd)) } // Check uniqueness of stripped paths if _, found := methodPaths[method][pathToAdd]; found { // Sort names for stable, testable output if strings.Compare(path, methodPaths[method][pathToAdd]) < 0 { res.AddErrors(pathOverlapMsg(path, methodPaths[method][pathToAdd])) } else { res.AddErrors(pathOverlapMsg(methodPaths[method][pathToAdd], path)) } } else { if _, found := methodPaths[method]; !found { methodPaths[method] = map[string]string{} } methodPaths[method][pathToAdd] = path // Original non stripped path } } var bodyParams []string var paramNames []string var hasForm, hasBody bool // Check parameters names uniqueness for operation // TODO: should be done after param expansion res.Merge(s.checkUniqueParams(path, method, op)) // pick the root schema from the swagger specification which describes a parameter origSchema, ok := s.schema.Definitions["parameter"] if !ok { panic("unexpected swagger schema: missing #/definitions/parameter") } // clone it once to avoid expanding a global schema (e.g. swagger spec) paramSchema, err := deepCloneSchema(origSchema) if err != nil { panic(fmt.Errorf("can't clone schema: %v", err)) } for _, pr := range paramHelp.safeExpandedParamsFor(path, method, op.ID, res, s) { // An expanded parameter must validate the Parameter schema (an unexpanded $ref always passes high-level schema validation) schv := newSchemaValidator(¶mSchema, s.schema, fmt.Sprintf("%s.%s.parameters.%s", path, method, pr.Name), s.KnownFormats, s.schemaOptions) obj := swag.ToDynamicJSON(pr) res.Merge(schv.Validate(obj)) // Validate pattern regexp for parameters with a Pattern property if _, err := compileRegexp(pr.Pattern); err != nil { res.AddErrors(invalidPatternInParamMsg(op.ID, pr.Name, pr.Pattern)) } // There must be at most one parameter in body: list them all if pr.In == swaggerBody { bodyParams = append(bodyParams, fmt.Sprintf("%q", pr.Name)) hasBody = true } if pr.In == "path" { paramNames = append(paramNames, pr.Name) // Path declared in path must have the required: true property if !pr.Required { res.AddErrors(pathParamRequiredMsg(op.ID, pr.Name)) } } if pr.In == "formData" { hasForm = true } if !(pr.Type == numberType || pr.Type == integerType) && (pr.Maximum != nil || pr.Minimum != nil || pr.MultipleOf != nil) { // A non-numeric parameter has validation keywords for numeric instances (number and integer) res.AddWarnings(parameterValidationTypeMismatchMsg(pr.Name, path, pr.Type)) } if !(pr.Type == stringType) && // A non-string parameter has validation keywords for strings (pr.MaxLength != nil || pr.MinLength != nil || pr.Pattern != "") { res.AddWarnings(parameterValidationTypeMismatchMsg(pr.Name, path, pr.Type)) } if !(pr.Type == arrayType) && // A non-array parameter has validation keywords for arrays (pr.MaxItems != nil || pr.MinItems != nil || pr.UniqueItems) { res.AddWarnings(parameterValidationTypeMismatchMsg(pr.Name, path, pr.Type)) } } // In:formData and In:body are mutually exclusive if hasBody && hasForm { res.AddErrors(bothFormDataAndBodyMsg(op.ID)) } // There must be at most one body param // Accurately report situations when more than 1 body param is declared (possibly unnamed) if len(bodyParams) > 1 { sort.Strings(bodyParams) res.AddErrors(multipleBodyParamMsg(op.ID, bodyParams)) } // Check uniqueness of parameters in path paramsInPath := pathHelp.extractPathParams(path) for i, p := range paramsInPath { for j, q := range paramsInPath { if p == q && i > j { res.AddErrors(pathParamNotUniqueMsg(path, p, q)) break } } } // Warns about possible malformed params in path rexGarbledParam := mustCompileRegexp(`{.*[{}\s]+.*}`) for _, p := range paramsInPath { if rexGarbledParam.MatchString(p) { res.AddWarnings(pathParamGarbledMsg(path, p)) } } // Match params from path vs params from params section res.Merge(s.validatePathParamPresence(path, paramsInPath, paramNames)) } } return res } func (s *SpecValidator) validateReferencesValid() *Result { // each reference must point to a valid object res := pools.poolOfResults.BorrowResult() for _, r := range s.analyzer.AllRefs() { if !r.IsValidURI(s.spec.SpecFilePath()) { // Safeguard - spec should always yield a valid URI res.AddErrors(invalidRefMsg(r.String())) } } if !res.HasErrors() { // NOTE: with default settings, loads.Document.Expanded() // stops on first error. Anyhow, the expand option to continue // on errors fails to report errors at all. exp, err := s.spec.Expanded() if err != nil { res.AddErrors(unresolvedReferencesMsg(err)) } s.expanded = exp } return res } func (s *SpecValidator) checkUniqueParams(path, method string, op *spec.Operation) *Result { // Check for duplicate parameters declaration in param section. // Each parameter should have a unique `name` and `type` combination // NOTE: this could be factorized in analysis (when constructing the params map) // However, there are some issues with such a factorization: // - analysis does not seem to fully expand params // - param keys may be altered by x-go-name res := pools.poolOfResults.BorrowResult() pnames := make(map[string]struct{}) if op.Parameters != nil { // Safeguard for _, ppr := range op.Parameters { var ok bool pr, red := paramHelp.resolveParam(path, method, op.ID, &ppr, s) //#nosec res.Merge(red) if pr != nil && pr.Name != "" { // params with empty name does no participate the check key := fmt.Sprintf("%s#%s", pr.In, pr.Name) if _, ok = pnames[key]; ok { res.AddErrors(duplicateParamNameMsg(pr.In, pr.Name, op.ID)) } pnames[key] = struct{}{} } } } return res } // SetContinueOnErrors sets the ContinueOnErrors option for this validator. func (s *SpecValidator) SetContinueOnErrors(c bool) { s.Options.ContinueOnErrors = c } // expandedAnalyzer returns expanded.Analyzer when it is available. // otherwise just analyzer. func (s *SpecValidator) expandedAnalyzer() *analysis.Spec { if s.expanded != nil && s.expanded.Analyzer != nil { return s.expanded.Analyzer } return s.analyzer } func deepCloneSchema(src spec.Schema) (spec.Schema, error) { var b bytes.Buffer if err := gob.NewEncoder(&b).Encode(src); err != nil { return spec.Schema{}, err } var dst spec.Schema if err := gob.NewDecoder(&b).Decode(&dst); err != nil { return spec.Schema{}, err } return dst, nil } validate-0.24.0/spec_messages.go000066400000000000000000000455551457312750000165600ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "net/http" "github.com/go-openapi/errors" ) // Error messages related to spec validation and returned as results. const ( // ArrayRequiresItemsError ... ArrayRequiresItemsError = "%s for %q is a collection without an element type (array requires items definition)" // ArrayInParamRequiresItemsError ... ArrayInParamRequiresItemsError = "param %q for %q is a collection without an element type (array requires item definition)" // ArrayInHeaderRequiresItemsError ... ArrayInHeaderRequiresItemsError = "header %q for %q is a collection without an element type (array requires items definition)" // BothFormDataAndBodyError indicates that an operation specifies both a body and a formData parameter, which is forbidden BothFormDataAndBodyError = "operation %q has both formData and body parameters. Only one such In: type may be used for a given operation" // CannotResolveRefError when a $ref could not be resolved CannotResolveReferenceError = "could not resolve reference in %s to $ref %s: %v" // CircularAncestryDefinitionError ... CircularAncestryDefinitionError = "definition %q has circular ancestry: %v" // DefaultValueDoesNotValidateError results from an invalid default value provided DefaultValueDoesNotValidateError = "default value for %s in %s does not validate its schema" // DefaultValueItemsDoesNotValidateError results from an invalid default value provided for Items DefaultValueItemsDoesNotValidateError = "default value for %s.items in %s does not validate its schema" // DefaultValueHeaderDoesNotValidateError results from an invalid default value provided in header DefaultValueHeaderDoesNotValidateError = "in operation %q, default value in header %s for %s does not validate its schema" // DefaultValueHeaderItemsDoesNotValidateError results from an invalid default value provided in header.items DefaultValueHeaderItemsDoesNotValidateError = "in operation %q, default value in header.items %s for %s does not validate its schema" // DefaultValueInDoesNotValidateError ... DefaultValueInDoesNotValidateError = "in operation %q, default value in %s does not validate its schema" // DuplicateParamNameError ... DuplicateParamNameError = "duplicate parameter name %q for %q in operation %q" // DuplicatePropertiesError ... DuplicatePropertiesError = "definition %q contains duplicate properties: %v" // ExampleValueDoesNotValidateError results from an invalid example value provided ExampleValueDoesNotValidateError = "example value for %s in %s does not validate its schema" // ExampleValueItemsDoesNotValidateError results from an invalid example value provided for Items ExampleValueItemsDoesNotValidateError = "example value for %s.items in %s does not validate its schema" // ExampleValueHeaderDoesNotValidateError results from an invalid example value provided in header ExampleValueHeaderDoesNotValidateError = "in operation %q, example value in header %s for %s does not validate its schema" // ExampleValueHeaderItemsDoesNotValidateError results from an invalid example value provided in header.items ExampleValueHeaderItemsDoesNotValidateError = "in operation %q, example value in header.items %s for %s does not validate its schema" // ExampleValueInDoesNotValidateError ... ExampleValueInDoesNotValidateError = "in operation %q, example value in %s does not validate its schema" // EmptyPathParameterError means that a path parameter was found empty (e.g. "{}") EmptyPathParameterError = "%q contains an empty path parameter" // InvalidDocumentError states that spec validation only processes spec.Document objects InvalidDocumentError = "spec validator can only validate spec.Document objects" // InvalidItemsPatternError indicates an Items definition with invalid pattern InvalidItemsPatternError = "%s for %q has invalid items pattern: %q" // InvalidParameterDefinitionError indicates an error detected on a parameter definition InvalidParameterDefinitionError = "invalid definition for parameter %s in %s in operation %q" // InvalidParameterDefinitionAsSchemaError indicates an error detected on a parameter definition, which was mistaken with a schema definition. // Most likely, this situation is encountered whenever a $ref has been added as a sibling of the parameter definition. InvalidParameterDefinitionAsSchemaError = "invalid definition as Schema for parameter %s in %s in operation %q" // InvalidPatternError ... InvalidPatternError = "pattern %q is invalid in %s" // InvalidPatternInError indicates an invalid pattern in a schema or items definition InvalidPatternInError = "%s in %s has invalid pattern: %q" // InvalidPatternInHeaderError indicates a header definition with an invalid pattern InvalidPatternInHeaderError = "in operation %q, header %s for %s has invalid pattern %q: %v" // InvalidPatternInParamError ... InvalidPatternInParamError = "operation %q has invalid pattern in param %q: %q" // InvalidReferenceError indicates that a $ref property could not be resolved InvalidReferenceError = "invalid ref %q" // InvalidResponseDefinitionAsSchemaError indicates an error detected on a response definition, which was mistaken with a schema definition. // Most likely, this situation is encountered whenever a $ref has been added as a sibling of the response definition. InvalidResponseDefinitionAsSchemaError = "invalid definition as Schema for response %s in %s" // MultipleBodyParamError indicates that an operation specifies multiple parameter with in: body MultipleBodyParamError = "operation %q has more than 1 body param: %v" // NonUniqueOperationIDError indicates that the same operationId has been specified several times NonUniqueOperationIDError = "%q is defined %d times" // NoParameterInPathError indicates that a path was found without any parameter NoParameterInPathError = "path param %q has no parameter definition" // NoValidPathErrorOrWarning indicates that no single path could be validated. If Paths is empty, this message is only a warning. NoValidPathErrorOrWarning = "spec has no valid path defined" // NoValidResponseError indicates that no valid response description could be found for an operation NoValidResponseError = "operation %q has no valid response" // PathOverlapError ... PathOverlapError = "path %s overlaps with %s" // PathParamNotInPathError indicates that a parameter specified with in: path was not found in the path specification PathParamNotInPathError = "path param %q is not present in path %q" // PathParamNotUniqueError ... PathParamNotUniqueError = "params in path %q must be unique: %q conflicts with %q" // PathParamNotRequiredError ... PathParamRequiredError = "in operation %q,path param %q must be declared as required" // RefNotAllowedInHeaderError indicates a $ref was found in a header definition, which is not allowed by Swagger RefNotAllowedInHeaderError = "IMPORTANT!in %q: $ref are not allowed in headers. In context for header %q%s" // RequiredButNotDefinedError ... RequiredButNotDefinedError = "%q is present in required but not defined as property in definition %q" // SomeParametersBrokenError indicates that some parameters could not be resolved, which might result in partial checks to be carried on SomeParametersBrokenError = "some parameters definitions are broken in %q.%s. Cannot carry on full checks on parameters for operation %s" // UnresolvedReferencesError indicates that at least one $ref could not be resolved UnresolvedReferencesError = "some references could not be resolved in spec. First found: %v" ) // Warning messages related to spec validation and returned as results const ( // ExamplesWithoutSchemaWarning indicates that examples are provided for a response,but not schema to validate the example against ExamplesWithoutSchemaWarning = "Examples provided without schema in operation %q, %s" // ExamplesMimeNotSupportedWarning indicates that examples are provided with a mime type different than application/json, which // the validator dos not support yetl ExamplesMimeNotSupportedWarning = "No validation attempt for examples for media types other than application/json, in operation %q, %s" // PathParamGarbledWarning ... PathParamGarbledWarning = "in path %q, param %q contains {,} or white space. Albeit not stricly illegal, this is probably no what you want" // ParamValidationTypeMismatch indicates that parameter has validation which does not match its type ParamValidationTypeMismatch = "validation keywords of parameter %q in path %q don't match its type %s" // PathStrippedParamGarbledWarning ... PathStrippedParamGarbledWarning = "path stripped from path parameters %s contains {,} or white space. This is probably no what you want." // ReadOnlyAndRequiredWarning ... ReadOnlyAndRequiredWarning = "Required property %s in %q should not be marked as both required and readOnly" // RefShouldNotHaveSiblingsWarning indicates that a $ref was found with a sibling definition. This results in the $ref taking over its siblings, // which is most likely not wanted. RefShouldNotHaveSiblingsWarning = "$ref property should have no sibling in %q.%s" // RequiredHasDefaultWarning indicates that a required parameter property should not have a default RequiredHasDefaultWarning = "%s in %s has a default value and is required as parameter" // UnusedDefinitionWarning ... UnusedDefinitionWarning = "definition %q is not used anywhere" // UnusedParamWarning ... UnusedParamWarning = "parameter %q is not used anywhere" // UnusedResponseWarning ... UnusedResponseWarning = "response %q is not used anywhere" InvalidObject = "expected an object in %q.%s" ) // Additional error codes const ( // InternalErrorCode reports an internal technical error InternalErrorCode = http.StatusInternalServerError // NotFoundErrorCode indicates that a resource (e.g. a $ref) could not be found NotFoundErrorCode = http.StatusNotFound ) func invalidDocumentMsg() errors.Error { return errors.New(InternalErrorCode, InvalidDocumentError) } func invalidRefMsg(path string) errors.Error { return errors.New(NotFoundErrorCode, InvalidReferenceError, path) } func unresolvedReferencesMsg(err error) errors.Error { return errors.New(errors.CompositeErrorCode, UnresolvedReferencesError, err) } func noValidPathMsg() errors.Error { return errors.New(errors.CompositeErrorCode, NoValidPathErrorOrWarning) } func emptyPathParameterMsg(path string) errors.Error { return errors.New(errors.CompositeErrorCode, EmptyPathParameterError, path) } func nonUniqueOperationIDMsg(path string, i int) errors.Error { return errors.New(errors.CompositeErrorCode, NonUniqueOperationIDError, path, i) } func circularAncestryDefinitionMsg(path string, args interface{}) errors.Error { return errors.New(errors.CompositeErrorCode, CircularAncestryDefinitionError, path, args) } func duplicatePropertiesMsg(path string, args interface{}) errors.Error { return errors.New(errors.CompositeErrorCode, DuplicatePropertiesError, path, args) } func pathParamNotInPathMsg(path, param string) errors.Error { return errors.New(errors.CompositeErrorCode, PathParamNotInPathError, param, path) } func arrayRequiresItemsMsg(path, operation string) errors.Error { return errors.New(errors.CompositeErrorCode, ArrayRequiresItemsError, path, operation) } func arrayInParamRequiresItemsMsg(path, operation string) errors.Error { return errors.New(errors.CompositeErrorCode, ArrayInParamRequiresItemsError, path, operation) } func arrayInHeaderRequiresItemsMsg(path, operation string) errors.Error { return errors.New(errors.CompositeErrorCode, ArrayInHeaderRequiresItemsError, path, operation) } func invalidItemsPatternMsg(path, operation, pattern string) errors.Error { return errors.New(errors.CompositeErrorCode, InvalidItemsPatternError, path, operation, pattern) } func invalidPatternMsg(pattern, path string) errors.Error { return errors.New(errors.CompositeErrorCode, InvalidPatternError, pattern, path) } func requiredButNotDefinedMsg(path, definition string) errors.Error { return errors.New(errors.CompositeErrorCode, RequiredButNotDefinedError, path, definition) } func pathParamGarbledMsg(path, param string) errors.Error { return errors.New(errors.CompositeErrorCode, PathParamGarbledWarning, path, param) } func pathStrippedParamGarbledMsg(path string) errors.Error { return errors.New(errors.CompositeErrorCode, PathStrippedParamGarbledWarning, path) } func pathOverlapMsg(path, arg string) errors.Error { return errors.New(errors.CompositeErrorCode, PathOverlapError, path, arg) } func invalidPatternInParamMsg(operation, param, pattern string) errors.Error { return errors.New(errors.CompositeErrorCode, InvalidPatternInParamError, operation, param, pattern) } func pathParamRequiredMsg(operation, param string) errors.Error { return errors.New(errors.CompositeErrorCode, PathParamRequiredError, operation, param) } func bothFormDataAndBodyMsg(operation string) errors.Error { return errors.New(errors.CompositeErrorCode, BothFormDataAndBodyError, operation) } func multipleBodyParamMsg(operation string, args interface{}) errors.Error { return errors.New(errors.CompositeErrorCode, MultipleBodyParamError, operation, args) } func pathParamNotUniqueMsg(path, param, arg string) errors.Error { return errors.New(errors.CompositeErrorCode, PathParamNotUniqueError, path, param, arg) } func duplicateParamNameMsg(path, param, operation string) errors.Error { return errors.New(errors.CompositeErrorCode, DuplicateParamNameError, param, path, operation) } func unusedParamMsg(arg string) errors.Error { return errors.New(errors.CompositeErrorCode, UnusedParamWarning, arg) } func unusedDefinitionMsg(arg string) errors.Error { return errors.New(errors.CompositeErrorCode, UnusedDefinitionWarning, arg) } func unusedResponseMsg(arg string) errors.Error { return errors.New(errors.CompositeErrorCode, UnusedResponseWarning, arg) } func readOnlyAndRequiredMsg(path, param string) errors.Error { return errors.New(errors.CompositeErrorCode, ReadOnlyAndRequiredWarning, param, path) } func noParameterInPathMsg(param string) errors.Error { return errors.New(errors.CompositeErrorCode, NoParameterInPathError, param) } func requiredHasDefaultMsg(param, path string) errors.Error { return errors.New(errors.CompositeErrorCode, RequiredHasDefaultWarning, param, path) } func defaultValueDoesNotValidateMsg(param, path string) errors.Error { return errors.New(errors.CompositeErrorCode, DefaultValueDoesNotValidateError, param, path) } func defaultValueItemsDoesNotValidateMsg(param, path string) errors.Error { return errors.New(errors.CompositeErrorCode, DefaultValueItemsDoesNotValidateError, param, path) } func noValidResponseMsg(operation string) errors.Error { return errors.New(errors.CompositeErrorCode, NoValidResponseError, operation) } func defaultValueHeaderDoesNotValidateMsg(operation, header, path string) errors.Error { return errors.New(errors.CompositeErrorCode, DefaultValueHeaderDoesNotValidateError, operation, header, path) } func defaultValueHeaderItemsDoesNotValidateMsg(operation, header, path string) errors.Error { return errors.New(errors.CompositeErrorCode, DefaultValueHeaderItemsDoesNotValidateError, operation, header, path) } func invalidPatternInHeaderMsg(operation, header, path, pattern string, args interface{}) errors.Error { return errors.New(errors.CompositeErrorCode, InvalidPatternInHeaderError, operation, header, path, pattern, args) } func invalidPatternInMsg(path, in, pattern string) errors.Error { return errors.New(errors.CompositeErrorCode, InvalidPatternInError, path, in, pattern) } func defaultValueInDoesNotValidateMsg(operation, path string) errors.Error { return errors.New(errors.CompositeErrorCode, DefaultValueInDoesNotValidateError, operation, path) } func exampleValueDoesNotValidateMsg(param, path string) errors.Error { return errors.New(errors.CompositeErrorCode, ExampleValueDoesNotValidateError, param, path) } func exampleValueItemsDoesNotValidateMsg(param, path string) errors.Error { return errors.New(errors.CompositeErrorCode, ExampleValueItemsDoesNotValidateError, param, path) } func exampleValueHeaderDoesNotValidateMsg(operation, header, path string) errors.Error { return errors.New(errors.CompositeErrorCode, ExampleValueHeaderDoesNotValidateError, operation, header, path) } func exampleValueHeaderItemsDoesNotValidateMsg(operation, header, path string) errors.Error { return errors.New(errors.CompositeErrorCode, ExampleValueHeaderItemsDoesNotValidateError, operation, header, path) } func exampleValueInDoesNotValidateMsg(operation, path string) errors.Error { return errors.New(errors.CompositeErrorCode, ExampleValueInDoesNotValidateError, operation, path) } func examplesWithoutSchemaMsg(operation, response string) errors.Error { return errors.New(errors.CompositeErrorCode, ExamplesWithoutSchemaWarning, operation, response) } func examplesMimeNotSupportedMsg(operation, response string) errors.Error { return errors.New(errors.CompositeErrorCode, ExamplesMimeNotSupportedWarning, operation, response) } func refNotAllowedInHeaderMsg(path, header, ref string) errors.Error { return errors.New(errors.CompositeErrorCode, RefNotAllowedInHeaderError, path, header, ref) } func cannotResolveRefMsg(path, ref string, err error) errors.Error { return errors.New(errors.CompositeErrorCode, CannotResolveReferenceError, path, ref, err) } func invalidParameterDefinitionMsg(path, method, operationID string) errors.Error { return errors.New(errors.CompositeErrorCode, InvalidParameterDefinitionError, path, method, operationID) } func invalidParameterDefinitionAsSchemaMsg(path, method, operationID string) errors.Error { return errors.New(errors.CompositeErrorCode, InvalidParameterDefinitionAsSchemaError, path, method, operationID) } func parameterValidationTypeMismatchMsg(param, path, typ string) errors.Error { return errors.New(errors.CompositeErrorCode, ParamValidationTypeMismatch, param, path, typ) } func invalidObjectMsg(path, in string) errors.Error { return errors.New(errors.CompositeErrorCode, InvalidObject, path, in) } // disabled // // func invalidResponseDefinitionAsSchemaMsg(path, method string) errors.Error { // return errors.New(errors.CompositeErrorCode, InvalidResponseDefinitionAsSchemaError, path, method) // } func someParametersBrokenMsg(path, method, operationID string) errors.Error { return errors.New(errors.CompositeErrorCode, SomeParametersBrokenError, path, method, operationID) } func refShouldNotHaveSiblingsMsg(path, operationID string) errors.Error { return errors.New(errors.CompositeErrorCode, RefShouldNotHaveSiblingsWarning, operationID, path) } validate-0.24.0/spec_test.go000066400000000000000000001007751457312750000157240ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "encoding/json" "flag" "os" "path/filepath" "strings" "testing" "github.com/davecgh/go-spew/spew" "github.com/go-openapi/analysis" "github.com/go-openapi/loads" "github.com/go-openapi/loads/fmts" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) const testID = "id" // Enable long running tests by using cmd line arg, // Usage: go test ... -args [-enable-long|-enable-go-swagger] // // -enable-long: enable spec_test.go:TestIssue18 and messages_test.go:Test_Quality* // -enable-go-swagger: enable non-regression tests against go-swagger fixtures (validation status) in swagger_test.go:Test_GoSwagger (running about 110 specs...) // // If none enabled, these tests are skipped // NOTE: replacing with go test -short and testing.Short() means that // by default, every test is launched. With -enable-long, we just get the // opposite... var enableLongTests bool var enableGoSwaggerTests bool func init() { loads.AddLoader(fmts.YAMLMatcher, fmts.YAMLDoc) flag.BoolVar(&enableLongTests, "enable-long", false, "enable long runnning tests") flag.BoolVar(&enableGoSwaggerTests, "enable-go-swagger", false, "enable go-swagger non-regression test") } func skipNotify(t *testing.T) { t.Log("To enable this long running test, use -args -enable-long in your go test command line") } func debugTest(t *testing.T, path string, res *Result) { if DebugTest && t.Failed() { verifiedErrors := verifiedTestErrors(res) if len(verifiedErrors) > 0 { t.Logf("DEVMODE:Returned error messages validating %s ", path) for _, v := range verifiedErrors { t.Logf("%s", v) } } verifiedWarnings := verifiedTestWarnings(res) if len(verifiedWarnings) > 0 { t.Logf("DEVMODE: Returned warnings for %s:", path) for _, e := range res.Warnings { t.Logf("%v", e) } } } } func verifiedTestErrors(res *Result) []string { verifiedErrors := make([]string, 0, 50) for _, e := range res.Errors { verifiedErrors = append(verifiedErrors, e.Error()) } return verifiedErrors } func verifiedTestWarnings(res *Result) []string { verifiedWarnings := make([]string, 0, 50) for _, e := range res.Warnings { verifiedWarnings = append(verifiedWarnings, e.Error()) } return verifiedWarnings } func TestSpec_ExpandResponseLocalFile(t *testing.T) { res, _ := loadAndValidate(t, filepath.Join("fixtures", "local_expansion", "spec.yaml")) assert.True(t, res.IsValid()) assert.Empty(t, res.Errors) } func TestSpec_ExpandResponseRecursive(t *testing.T) { res, _ := loadAndValidate(t, filepath.Join("fixtures", "recursive_expansion", "spec.yaml")) assert.True(t, res.IsValid()) assert.Empty(t, res.Errors) } // Spec with no path func TestSpec_Issue52(t *testing.T) { fp := filepath.Join("fixtures", "bugs", "52", "swagger.json") jstext, _ := os.ReadFile(fp) // as json schema var sch spec.Schema require.NoError(t, json.Unmarshal(jstext, &sch)) schemaValidator := NewSchemaValidator(spec.MustLoadSwagger20Schema(), nil, "", strfmt.Default) res := schemaValidator.Validate(&sch) assert.False(t, res.IsValid()) require.NotEmpty(t, res.Errors) require.EqualError(t, res.Errors[0], ".paths in body is required") // as swagger spec: path is set to nil // Here, validation stops as paths is initialized to empty res, _ = loadAndValidate(t, fp) assert.False(t, res.IsValid()) verifiedErrors := verifiedTestErrors(res) assert.Len(t, verifiedErrors, 2, "Unexpected number of error messages returned") assert.Contains(t, verifiedErrors, ".paths in body is required") assert.Contains(t, verifiedErrors, "spec has no valid path defined") } func TestSpec_Issue53(t *testing.T) { fp := filepath.Join("fixtures", "bugs", "53", "noswagger.json") jstext, _ := os.ReadFile(fp) // as json schema var sch spec.Schema require.NoError(t, json.Unmarshal(jstext, &sch)) schemaValidator := NewSchemaValidator(spec.MustLoadSwagger20Schema(), nil, "", strfmt.Default) res := schemaValidator.Validate(&sch) assert.False(t, res.IsValid()) require.NotEmpty(t, res.Errors) require.EqualError(t, res.Errors[0], ".swagger in body is required") // as swagger despec res, _ = loadAndValidate(t, fp, false) require.False(t, res.IsValid()) require.NotEmpty(t, res.Errors) require.EqualError(t, res.Errors[0], ".swagger in body is required") } func TestSpec_Issue62(t *testing.T) { fp := filepath.Join("fixtures", "bugs", "62", "swagger.json") // as swagger spec doc, err := loads.Spec(fp) require.NoError(t, err) validator := NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) res, _ := validator.Validate(doc) assert.NotEmpty(t, res.Errors) assert.True(t, res.HasErrors()) } func TestSpec_Issue63(t *testing.T) { res, _ := loadAndValidate(t, filepath.Join("fixtures", "bugs", "63", "swagger.json")) assert.True(t, res.IsValid()) } func TestSpec_Issue61_MultipleRefs(t *testing.T) { res, _ := loadAndValidate(t, filepath.Join("fixtures", "bugs", "61", "multiple-refs.json")) assert.Empty(t, res.Errors) assert.True(t, res.IsValid()) } func TestSpec_Issue61_ResolvedRef(t *testing.T) { res, _ := loadAndValidate(t, filepath.Join("fixtures", "bugs", "61", "unresolved-ref-for-name.json")) assert.Empty(t, res.Errors) assert.True(t, res.IsValid()) } // No error with this one func TestSpec_Issue123(t *testing.T) { fp := filepath.Join("fixtures", "bugs", "123", "swagger.yml") res, _ := loadAndValidate(t, fp) assert.True(t, res.IsValid()) assert.Empty(t, res.Errors) debugTest(t, fp, res) } func TestSpec_Issue6(t *testing.T) { files, _ := filepath.Glob(filepath.Join("fixtures", "bugs", "6", "*.json")) for _, path := range files { t.Logf("Tested spec=%s", path) res, _ := loadAndValidate(t, path) assert.False(t, res.IsValid()) verifiedErrors := verifiedTestErrors(res) switch { case strings.Contains(path, "empty-responses.json"): assert.Contains(t, verifiedErrors, "\"paths./foo.get.responses\" must not validate the schema (not)") assert.Contains(t, verifiedErrors, "paths./foo.get.responses in body should have at least 1 properties") case strings.Contains(path, "no-responses.json"): assert.Contains(t, verifiedErrors, "paths./foo.get.responses in body is required") default: t.Logf("Returned error messages: %v", verifiedErrors) t.Fatal("fixture not tested. Please add assertions for messages") } debugTest(t, path, res) } } // check if invalid patterns are indeed invalidated func TestSpec_Issue18(t *testing.T) { files, _ := filepath.Glob(filepath.Join("fixtures", "bugs", "18", "*.json")) for _, path := range files { t.Logf("Tested spec=%s", path) res, _ := loadAndValidate(t, path) assert.False(t, res.IsValid()) verifiedErrors := verifiedTestErrors(res) switch { case strings.Contains(path, "headerItems.json"): assert.Contains(t, verifiedErrors, "X-Foo in header has invalid pattern: \")<-- bad pattern\"") case strings.Contains(path, "headers.json"): assert.Contains(t, verifiedErrors, "in operation \"\", header X-Foo for default response has invalid pattern \")<-- bad pattern\": error parsing regexp: unexpected ): `)<-- bad pattern`") // in operation \"\", header X-Foo for default response has invalid pattern \")<-- bad pattern\": error parsing regexp: unexpected ): `)<-- bad pattern` assert.Contains(t, verifiedErrors, "in operation \"\", header X-Foo for response 402 has invalid pattern \")<-- bad pattern\": error parsing regexp: unexpected ): `)<-- bad pattern`") // in operation "", header X-Foo for response 402 has invalid pattern ")<-- bad pattern": error parsing regexp: unexpected ): `)<-- bad pattern` case strings.Contains(path, "paramItems.json"): assert.Contains(t, verifiedErrors, "body param \"user\" for \"\" has invalid items pattern: \")<-- bad pattern\"") // Updated message: from "user.items in body has invalid pattern: \")<-- bad pattern\"" to: assert.Contains(t, verifiedErrors, "default value for user in body does not validate its schema") assert.Contains(t, verifiedErrors, "user.items.default in body has invalid pattern: \")<-- bad pattern\"") case strings.Contains(path, "parameters.json"): assert.Contains(t, verifiedErrors, "operation \"\" has invalid pattern in param \"userId\": \")<-- bad pattern\"") case strings.Contains(path, "schema.json"): // TODO: strange that the text does not say response "200"... assert.Contains(t, verifiedErrors, "200 in response has invalid pattern: \")<-- bad pattern\"") default: t.Logf("Returned error messages: %v", verifiedErrors) t.Fatal("fixture not tested. Please add assertions for messages") } debugTest(t, path, res) } } // check if a fragment path parameter is recognized, without error func TestSpec_Issue39(t *testing.T) { fp := filepath.Join("fixtures", "bugs", "39", "swagger.yml") res, _ := loadAndValidate(t, fp) assert.True(t, res.IsValid()) assert.Empty(t, res.Errors) debugTest(t, fp, res) } func TestSpec_ValidateDuplicatePropertyNames(t *testing.T) { // simple allOf doc, err := loads.Spec(filepath.Join("fixtures", "validation", "duplicateprops.json")) require.NoError(t, err) validator := NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc res := validator.validateDuplicatePropertyNames() assert.NotEmpty(t, res.Errors) assert.Len(t, res.Errors, 1) // nested allOf doc, err = loads.Spec(filepath.Join("fixtures", "validation", "nestedduplicateprops.json")) require.NoError(t, err) validator = NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc res = validator.validateDuplicatePropertyNames() assert.NotEmpty(t, res.Errors) assert.Len(t, res.Errors, 1) } func TestSpec_ValidateNonEmptyPathParameterNames(t *testing.T) { doc, err := loads.Spec(filepath.Join("fixtures", "validation", "empty-path-param-name.json")) require.NoError(t, err) validator := NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc res := validator.validateNonEmptyPathParamNames() assert.NotEmpty(t, res.Errors) assert.Len(t, res.Errors, 1) } func TestSpec_ValidateCircularAncestry(t *testing.T) { doc, err := loads.Spec(filepath.Join("fixtures", "validation", "direct-circular-ancestor.json")) require.NoError(t, err) validator := NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc res := validator.validateDuplicatePropertyNames() assert.NotEmpty(t, res.Errors) assert.Len(t, res.Errors, 1) doc, err = loads.Spec(filepath.Join("fixtures", "validation", "indirect-circular-ancestor.json")) require.NoError(t, err) validator = NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc res = validator.validateDuplicatePropertyNames() assert.NotEmpty(t, res.Errors) assert.Len(t, res.Errors, 1) doc, err = loads.Spec(filepath.Join("fixtures", "validation", "recursive-circular-ancestor.json")) require.NoError(t, err) validator = NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc res = validator.validateDuplicatePropertyNames() assert.NotEmpty(t, res.Errors) assert.Len(t, res.Errors, 1) } func TestSpec_ValidateReferenced(t *testing.T) { doc, err := loads.Spec(filepath.Join("fixtures", "validation", "valid-referenced.yml")) require.NoError(t, err) validator := NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc validator.analyzer = analysis.New(doc.Spec()) res := validator.validateReferenced() assert.Empty(t, res.Errors) doc, err = loads.Spec(filepath.Join("fixtures", "validation", "invalid-referenced.yml")) require.NoError(t, err) validator = NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc validator.analyzer = analysis.New(doc.Spec()) res = validator.validateReferenced() assert.Empty(t, res.Errors) assert.NotEmpty(t, res.Warnings) assert.Len(t, res.Warnings, 3) } func TestSpec_ValidateReferencesValid(t *testing.T) { doc, err := loads.Spec(filepath.Join("fixtures", "validation", "valid-ref.json")) require.NoError(t, err) validator := NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc validator.analyzer = analysis.New(doc.Spec()) res := validator.validateReferencesValid() assert.Empty(t, res.Errors) doc, err = loads.Spec(filepath.Join("fixtures", "validation", "invalid-ref.json")) require.NoError(t, err) validator = NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc validator.analyzer = analysis.New(doc.Spec()) res = validator.validateReferencesValid() assert.NotEmpty(t, res.Errors) } func TestSpec_ValidateRequiredDefinitions(t *testing.T) { doc, _ := loads.Analyzed(PetStoreJSONMessage, "") validator := NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc validator.analyzer = analysis.New(doc.Spec()) res := validator.validateRequiredDefinitions() assert.Empty(t, res.Errors) // properties sw := doc.Spec() def := sw.Definitions["Tag"] def.Required = append(def.Required, "type") sw.Definitions["Tag"] = def res = validator.validateRequiredDefinitions() assert.NotEmpty(t, res.Errors) // pattern properties def.PatternProperties = make(map[string]spec.Schema) def.PatternProperties["ty.*"] = *spec.StringProperty() sw.Definitions["Tag"] = def res = validator.validateRequiredDefinitions() assert.Empty(t, res.Errors) def.PatternProperties = make(map[string]spec.Schema) def.PatternProperties["^ty.$"] = *spec.StringProperty() sw.Definitions["Tag"] = def res = validator.validateRequiredDefinitions() assert.NotEmpty(t, res.Errors) // additional properties def.PatternProperties = nil def.AdditionalProperties = &spec.SchemaOrBool{Allows: true} sw.Definitions["Tag"] = def res = validator.validateRequiredDefinitions() assert.Empty(t, res.Errors) def.AdditionalProperties = &spec.SchemaOrBool{Allows: false} sw.Definitions["Tag"] = def res = validator.validateRequiredDefinitions() assert.NotEmpty(t, res.Errors) } func TestSpec_ValidateParameters(t *testing.T) { validatorForDoc := func(doc *loads.Document) *SpecValidator { // build a spec validator for some doc validator := NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc validator.analyzer = analysis.New(doc.Spec()) return validator } t.Run("should validate classic PetStore", func(t *testing.T) { doc, err := loads.Analyzed(PetStoreJSONMessage, "") require.NoError(t, err) validator := validatorForDoc(doc) res := validator.validateParameters() require.Empty(t, res.Errors) }) t.Run("should detect duplicate parameters", func(t *testing.T) { doc, err := loads.Analyzed(PetStoreJSONMessage, "") require.NoError(t, err) sw := doc.Spec() sw.Paths.Paths["/pets"].Get.Parameters = append(sw.Paths.Paths["/pets"].Get.Parameters, *spec.QueryParam("limit").Typed(stringType, "")) validator := validatorForDoc(doc) res := validator.validateParameters() require.NotEmpty(t, res.Errors) assert.Contains(t, res.Errors[0].Error(), `duplicate parameter name "limit" for "query" in operation "getAllPets"`, ) }) t.Run("should detect multiple parameters in body", func(t *testing.T) { doc, err := loads.Analyzed(PetStoreJSONMessage, "") require.NoError(t, err) sw := doc.Spec() sw.Paths.Paths["/pets"].Post.Parameters = append(sw.Paths.Paths["/pets"].Post.Parameters, *spec.BodyParam("fake", spec.RefProperty("#/definitions/Pet"))) validator := validatorForDoc(doc) res := validator.validateParameters() assert.NotEmpty(t, res.Errors) require.Len(t, res.Errors, 1) assert.Contains(t, res.Errors[0].Error(), "has more than 1 body param") }) t.Run("should detect invalid parameter schema in (modified) classic PetStore", func(t *testing.T) { fixture := filepath.Join("fixtures", "petstore", "swagger-invalid.json") t.Run("with raw JSON", func(t *testing.T) { // loading with full root document jazon, err := os.ReadFile(fixture) require.NoError(t, err) doc, err := loads.Analyzed(jazon, "") require.NoError(t, err) validator := validatorForDoc(doc) res := validator.validateParameters() require.Len(t, res.Errors, 2) assert.Contains(t, res.Errors[0].Error(), `"/pets.POST.parameters.pet" must validate one and only one schema (oneOf). Found none valid`, ) assert.Contains(t, res.Errors[1].Error(), `/pets.POST.parameters.pet.schema.anyOf in body is a forbidden property`, ) }) t.Run("with loads.Spec", func(t *testing.T) { // loading like a regular user of this library doc, err := loads.Spec(fixture) require.NoError(t, err) err = Spec(doc, strfmt.Default) require.Error(t, err) require.ErrorContains(t, err, "definitions.newPet.anyOf in body is a forbidden property", ) }) t.Run("with invalid Swagger schema", func(t *testing.T) { doc, err := loads.Analyzed(PetStoreJSONMessage, "") require.NoError(t, err) validator := validatorForDoc(doc) delete(validator.schema.Definitions, "parameter") require.Panics(t, func() { _ = validator.validateParameters() }) }) }) t.Run("should detect duplicate parameters", func(t *testing.T) { doc, err := loads.Analyzed(PetStoreJSONMessage, "") require.NoError(t, err) sw := doc.Spec() pp := sw.Paths.Paths["/pets/{id}"] pp.Delete = nil var nameParams []spec.Parameter for _, p := range pp.Parameters { if p.Name == testID { p.Name = "name" nameParams = append(nameParams, p) } } pp.Parameters = nameParams sw.Paths.Paths["/pets/{name}"] = pp validator := validatorForDoc(doc) res := validator.validateParameters() assert.NotEmpty(t, res.Errors) require.Len(t, res.Errors, 1) assert.Contains(t, res.Errors[0].Error(), "overlaps with") t.Run("should tolerate duplicate parameters, on option", func(t *testing.T) { // Disable strict path param uniqueness and ensure there is no error validator.Options.StrictPathParamUniqueness = false res := validator.validateParameters() require.Empty(t, res.Errors) }) }) t.Run("should detect mismatch with path parameter", func(t *testing.T) { doc, err := loads.Analyzed(PetStoreJSONMessage, "") require.NoError(t, err) sw := doc.Spec() pp := sw.Paths.Paths["/pets/{id}"] pp.Delete = nil var nameParams []spec.Parameter for _, p := range pp.Parameters { if p.Name == testID { p.Name = "name" nameParams = append(nameParams, p) } } pp.Get.Parameters = nameParams pp.Parameters = nil sw.Paths.Paths["/pets/{id}"] = pp validator := validatorForDoc(doc) res := validator.validateParameters() require.NotEmpty(t, res.Errors) require.Len(t, res.Errors, 2) assert.Contains(t, res.Errors[1].Error(), `is not present in path "/pets/{id}"`, ) assert.Contains(t, res.Errors[0].Error(), "has no parameter definition", ) }) t.Run("with issue go-swagger/go-swagger#2527", func(t *testing.T) { basePath := filepath.Join("fixtures", "bugs", "2527") t.Run("should detect mismatch between parameter and schema", func(t *testing.T) { doc, err := loads.Spec(filepath.Join(basePath, "swagger.yml")) require.NoError(t, err) err = Spec(doc, strfmt.Default) require.Error(t, err) require.ErrorContains(t, err, `/deposits.GET.parameters..enum in body is a forbidden property`, ) require.ErrorContains(t, err, `deposits.GET.parameters..type in body is a forbidden property`, ) require.ErrorContains(t, err, `/deposits.GET.parameters..name in body is required`, ) require.ErrorContains(t, err, `/deposits.GET.parameters..in in body is required`, ) }) t.Run("should validate fixed spec", func(t *testing.T) { doc, err := loads.Spec(filepath.Join(basePath, "swagger-fixed.yml")) require.NoError(t, err) require.NoError(t, Spec(doc, strfmt.Default)) }) t.Run("should detect missing name and in from refed parameter", func(t *testing.T) { doc, err := loads.Spec(filepath.Join(basePath, "swagger-other.yml")) require.NoError(t, err) err = Spec(doc, strfmt.Default) require.ErrorContains(t, err, `"parameters.missingName" must validate one and only one schema (oneOf). Found none valid`, ) require.ErrorContains(t, err, `parameters.missingName.name in body is required`, ) require.ErrorContains(t, err, `"parameters.missingIn" must validate one and only one schema (oneOf). Found none valid`, ) require.ErrorContains(t, err, `parameters.missingIn.in in body is required`, ) }) t.Run("extra parameter JSONSchema validation should not result in duplicate errors", func(t *testing.T) { t.Run("with spec validator", func(t *testing.T) { doc, err := loads.Spec(filepath.Join(basePath, "swagger-schema-error.yml")) require.NoError(t, err) errs, warns := NewSpecValidator(doc.Schema(), strfmt.Default).Validate(doc) require.Len(t, errs.Errors, 3) require.Empty(t, warns.Errors) var found1, found2, found3 int for _, err := range errs.Errors { switch { case strings.Contains(err.Error(), `definitions.WrongSchema.descriptions in body is a forbidden property`): found1++ case strings.Contains(err.Error(), `"definitions.WrongSchema.type" must validate at least one schema (anyOf)`): found2++ case strings.Contains(err.Error(), `definitions.WrongSchema.type in body should be one of [array boolean integer null number object string]`): found3++ } } t.Run("each message should appear exactly once", func(t *testing.T) { require.Equal(t, 1, found1) require.Equal(t, 1, found2) require.Equal(t, 1, found3) }) }) }) }) } func TestSpec_ValidateItems(t *testing.T) { doc, _ := loads.Analyzed(PetStoreJSONMessage, "") validator := NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc validator.analyzer = analysis.New(doc.Spec()) res := validator.validateItems() assert.Empty(t, res.Errors) // in operation parameters sw := doc.Spec() sw.Paths.Paths["/pets"].Get.Parameters[0].Type = arrayType res = validator.validateItems() assert.NotEmpty(t, res.Errors) sw.Paths.Paths["/pets"].Get.Parameters[0].Items = spec.NewItems().Typed(stringType, "") res = validator.validateItems() assert.Empty(t, res.Errors) sw.Paths.Paths["/pets"].Get.Parameters[0].Items = spec.NewItems().Typed(arrayType, "") res = validator.validateItems() assert.NotEmpty(t, res.Errors) sw.Paths.Paths["/pets"].Get.Parameters[0].Items.Items = spec.NewItems().Typed(stringType, "") res = validator.validateItems() assert.Empty(t, res.Errors) // in global parameters sw.Parameters = make(map[string]spec.Parameter) sw.Parameters["other"] = *spec.SimpleArrayParam("other", arrayType, "csv") res = validator.validateItems() assert.Empty(t, res.Errors) // pp := spec.SimpleArrayParam("other", arrayType, "") // pp.Items = nil // sw.Parameters["other"] = *pp // res = validator.validateItems() // assert.NotEmpty(t, res.Errors) // in shared path object parameters doc, _ = loads.Analyzed(PetStoreJSONMessage, "") validator = NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc validator.analyzer = analysis.New(doc.Spec()) sw = doc.Spec() pa := sw.Paths.Paths["/pets"] pa.Parameters = []spec.Parameter{*spec.SimpleArrayParam("another", arrayType, "csv")} sw.Paths.Paths["/pets"] = pa res = validator.validateItems() assert.Empty(t, res.Errors) pa = sw.Paths.Paths["/pets"] pp := spec.SimpleArrayParam("other", arrayType, "") pp.Items = nil pa.Parameters = []spec.Parameter{*pp} sw.Paths.Paths["/pets"] = pa res = validator.validateItems() assert.NotEmpty(t, res.Errors) // in body param schema doc, _ = loads.Analyzed(PetStoreJSONMessage, "") validator = NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc validator.analyzer = analysis.New(doc.Spec()) sw = doc.Spec() pa = sw.Paths.Paths["/pets"] pa.Post.Parameters[0].Schema = spec.ArrayProperty(nil) res = validator.validateItems() assert.NotEmpty(t, res.Errors) // in response headers doc, _ = loads.Analyzed(PetStoreJSONMessage, "") validator = NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc validator.analyzer = analysis.New(doc.Spec()) sw = doc.Spec() pa = sw.Paths.Paths["/pets"] rp := pa.Post.Responses.StatusCodeResponses[200] var hdr spec.Header hdr.Type = arrayType rp.Headers = make(map[string]spec.Header) rp.Headers["X-YADA"] = hdr pa.Post.Responses.StatusCodeResponses[200] = rp res = validator.validateItems() assert.NotEmpty(t, res.Errors) // in response schema doc, _ = loads.Analyzed(PetStoreJSONMessage, "") validator = NewSpecValidator(spec.MustLoadSwagger20Schema(), strfmt.Default) validator.spec = doc validator.analyzer = analysis.New(doc.Spec()) sw = doc.Spec() pa = sw.Paths.Paths["/pets"] rp = pa.Post.Responses.StatusCodeResponses[200] rp.Schema = spec.ArrayProperty(nil) pa.Post.Responses.StatusCodeResponses[200] = rp res = validator.validateItems() assert.NotEmpty(t, res.Errors) } // Reuse known validated cases through the higher level Spec() call func TestSpec_ValidDoc(t *testing.T) { fp := filepath.Join("fixtures", "local_expansion", "spec.yaml") doc2, err := loads.Spec(fp) require.NoError(t, err) err = Spec(doc2, strfmt.Default) require.NoError(t, err) } // Check higher level behavior on invalid spec doc func TestSpec_InvalidDoc(t *testing.T) { doc, err := loads.Spec(filepath.Join("fixtures", "validation", "default", "invalid-default-value-parameter.json")) require.NoError(t, err) err = Spec(doc, strfmt.Default) require.Error(t, err) } func TestSpec_Validate_InvalidInterface(t *testing.T) { fp := filepath.Join("fixtures", "local_expansion", "spec.yaml") doc2, err := loads.Spec(fp) require.NoError(t, err) require.NotNil(t, doc2) validator := NewSpecValidator(doc2.Schema(), strfmt.Default) bug := "bzzz" res, _ := validator.Validate(bug) assert.NotEmpty(t, res.Errors) assert.Contains(t, res.Errors[0].Error(), "can only validate spec.Document objects") } func TestSpec_ValidateBodyFormDataParams(t *testing.T) { res, _ := loadAndValidate(t, filepath.Join("fixtures", "validation", "invalid-formdata-body-params.json")) assert.NotEmpty(t, res.Errors) assert.Len(t, res.Errors, 1) } func TestSpec_Issue73(t *testing.T) { res, _ := loadAndValidate(t, filepath.Join("fixtures", "bugs", "73", "fixture-swagger.yaml")) assert.Empty(t, res.Errors, " in fixture-swagger.yaml") res, _ = loadAndValidate(t, filepath.Join("fixtures", "bugs", "73", "fixture-swagger-2.yaml")) assert.Empty(t, res.Errors, "in fixture-swagger-2.yaml") res, _ = loadAndValidate(t, filepath.Join("fixtures", "bugs", "73", "fixture-swagger-3.yaml")) assert.Empty(t, res.Errors, "in fixture-swagger-3.yaml") res, _ = loadAndValidate(t, filepath.Join("fixtures", "bugs", "73", "fixture-swagger-good.yaml")) assert.Empty(t, res.Errors, " in fixture-swagger-good.yaml") } func TestSpec_Issue1341(t *testing.T) { // testing recursive walk with defaults and examples res, _ := loadAndValidate(t, filepath.Join("fixtures", "bugs", "1341", "fixture-1341-good.yaml")) assert.Empty(t, res.Errors, " in fixture-1341-good.yaml") assert.Len(t, res.Warnings, 1, " in fixture-1341-good.yaml") res, _ = loadAndValidate(t, filepath.Join("fixtures", "bugs", "1341", "fixture-1341.yaml")) assert.Empty(t, res.Errors, "in fixture-1341.yaml") assert.Empty(t, res.Warnings, "in fixture-1341.yaml") res, _ = loadAndValidate(t, filepath.Join("fixtures", "bugs", "1341", "fixture-1341-2.yaml")) assert.Empty(t, res.Errors, "in fixture-1341-2.yaml") assert.Empty(t, res.Warnings, "in fixture-1341-2.yaml") res, _ = loadAndValidate(t, filepath.Join("fixtures", "bugs", "1341", "fixture-1341-3.yaml")) assert.Empty(t, res.Errors, "in fixture-1341-3.yaml") assert.Len(t, res.Warnings, 4, "in fixture-1341-3.yaml") res, _ = loadAndValidate(t, filepath.Join("fixtures", "bugs", "1341", "fixture-1341-4.yaml")) assert.Empty(t, res.Errors, "in fixture-1341-4.yaml") assert.Empty(t, res.Warnings, "in fixture-1341-4.yaml") res, _ = loadAndValidate(t, filepath.Join("fixtures", "bugs", "1341", "fixture-1341-5.yaml")) assert.Len(t, res.Errors, 4, "in fixture-1341-5.yaml") assert.Empty(t, res.Warnings, "in fixture-1341-5.yaml") } // test go-swagger/go-swagger#1614 (circular refs) func Test_Issue1614(t *testing.T) { path := filepath.Join("fixtures", "bugs", "1614", "gitea.json") testIssue(t, path, 0, 3) } // Test go-swagger/go-swagger#1621 (remote $ref) func Test_Issue1621(t *testing.T) { path := filepath.Join("fixtures", "bugs", "1621", "fixture-1621.yaml") testIssue(t, path, 0, 0) } // Test go-swagger/go-swagger#1429 (remote $ref) func Test_Issue1429(t *testing.T) { path := filepath.Join("fixtures", "bugs", "1429", "swagger.yaml") testIssue(t, path, 0, 0) } func TestSpec_ValidationTypeMismatch(t *testing.T) { doc, err := loads.Spec(filepath.Join("fixtures", "validation", "type-keyword-mismatch.yaml")) require.NoError(t, err) validator := NewSpecValidator(doc.Schema(), strfmt.Default) validator.spec = doc validator.analyzer = analysis.New(doc.Spec()) res := validator.validateParameters() assert.NotEmpty(t, res.Warnings) assert.Len(t, res.Warnings, 3) warnings := verifiedTestWarnings(res) assert.Contains(t, warnings, `validation keywords of parameter "id" in path "/test/{id}/string" don't match its type string`) assert.Contains(t, warnings, `validation keywords of parameter "id" in path "/test/{id}/integer" don't match its type integer`) assert.Contains(t, warnings, `validation keywords of parameter "id" in path "/test/{id}/array" don't match its type array`) } func loadAndValidate(t testing.TB, fp string, early ...bool) (*Result, *Result) { doc, err := loads.Spec(fp) require.NoError(t, err) require.NotNil(t, doc) validator := NewSpecValidator(doc.Schema(), strfmt.Default) // for testing, we enable "ContinueOnErrors" by default if len(early) == 0 { validator.Options = Opts{ContinueOnErrors: true} } else { for _, flag := range early { validator.Options = Opts{ContinueOnErrors: flag} } } return validator.Validate(doc) } func TestItemsProperty_Issue43(t *testing.T) { for _, fixture := range []string{ "fixture-43.yaml", "fixture-43-variants.yaml", "fixture-1456.yaml", } { fp := filepath.Join("fixtures", "bugs", "43", fixture) res, warnings := loadAndValidate(t, fp) assert.Truef(t, res.IsValid(), "expected spec from %s to be valid", fixture) assert.Emptyf(t, res.Errors, "expected no error in %s", fixture) assert.Emptyf(t, res.Warnings, "expected no warning in %s", fixture) assert.Emptyf(t, warnings, "expected no warning in %s", fixture) } fp := filepath.Join("fixtures", "bugs", "43", "fixture-43-fail.yaml") res, _ := loadAndValidate(t, fp) assert.Falsef(t, res.IsValid(), "expected spec to be invalid") assert.Greater(t, len(res.Errors), 3) fp = filepath.Join("fixtures", "validation", "fixture-1171.yaml") res, _ = loadAndValidate(t, fp) assert.Falsef(t, res.IsValid(), "expected spec to be invalid") assert.Greater(t, len(res.Errors), 3) found := false for _, e := range res.Errors { found = strings.Contains(e.Error(), "array requires items definition") if found { break } } assert.True(t, found) } func Test_Issue2137(t *testing.T) { fp := filepath.Join("fixtures", "bugs", "2137", "fixture-2137.yaml") res, _ := loadAndValidate(t, fp) assert.Falsef(t, res.IsValid(), "expected spec to be invalid") found := false for _, e := range res.Errors { found = strings.Contains(e.Error(), `"test" is defined 2 times`) if found { break } } assert.True(t, found) } func Test_Examples(t *testing.T) { fp := filepath.Join("fixtures", "bugs", "2649", "swagger.yaml") doc, err := loads.Spec(fp) require.NoError(t, err) require.NotNil(t, doc) validator := NewSpecValidator(doc.Schema(), strfmt.Default) validator.Options.SkipSchemataResult = true res, _ := validator.Validate(doc) if !assert.Truef(t, res.IsValid(), "expected spec to be valid") { spew.Dump(res.Errors) } } func Test_2866(t *testing.T) { // exercises fixture from go-swagger/go-swagger#2866, a test in go-swagger // that used to be problematic when using memory pools. fp := filepath.Join("fixtures", "bugs", "2866", "2866.yaml") doc, err := loads.Spec(fp) require.NoError(t, err) require.NotNil(t, doc) require.NoError(t, Spec(doc, strfmt.Default)) } validate-0.24.0/swagger_test.go000066400000000000000000000202151457312750000164170ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "log" "os" "path/filepath" "strings" "testing" "github.com/go-openapi/loads" "github.com/go-openapi/loads/fmts" "github.com/go-openapi/strfmt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func init() { loads.AddLoader(fmts.YAMLMatcher, fmts.YAMLDoc) } func skipNotifyGoSwagger(t *testing.T) { t.Log("To enable this long running test, use -args -enable-go-swagger in your go test command line") } // Exercise validate will all tests cases from package go-swagger // A copy of all fixtures available in go-swagger/go-swagger // is maintained in fixtures/go-swagger // // TODO: move this list to a YAML fixture config file func Test_GoSwaggerTestCases(t *testing.T) { if !enableGoSwaggerTests { skipNotifyGoSwagger(t) t.SkipNow() } // A list of test cases which fail on "swagger validate" at spec load time expectedLoadFailures := map[string]bool{ "fixtures/go-swagger/bugs/342/fixture-342.yaml": false, "fixtures/go-swagger/bugs/342/fixture-342-2.yaml": true, } // A list of test cases which fail on "swagger validate" expectedFailures := map[string]bool{ "fixtures/go-swagger/bugs/1010/swagger.yml": true, "fixtures/go-swagger/bugs/103/swagger.json": true, "fixtures/go-swagger/bugs/106/swagger.json": true, "fixtures/go-swagger/bugs/1171/swagger.yaml": true, "fixtures/go-swagger/bugs/1238/swagger.yaml": true, "fixtures/go-swagger/bugs/1289/fixture-1289-2.yaml": true, "fixtures/go-swagger/bugs/1289/fixture-1289.yaml": true, "fixtures/go-swagger/bugs/193/spec2.json": true, "fixtures/go-swagger/bugs/195/swagger.json": true, "fixtures/go-swagger/bugs/248/swagger.json": true, "fixtures/go-swagger/bugs/249/swagger.json": true, "fixtures/go-swagger/bugs/342/fixture-342-2.yaml": true, "fixtures/go-swagger/bugs/342/fixture-342.yaml": true, "fixtures/go-swagger/bugs/423/swagger.json": true, "fixtures/go-swagger/bugs/453/swagger.yml": true, "fixtures/go-swagger/bugs/455/swagger.yml": true, "fixtures/go-swagger/bugs/628/swagger.yml": true, "fixtures/go-swagger/bugs/733/swagger.json": false, "fixtures/go-swagger/bugs/763/swagger.yml": true, "fixtures/go-swagger/bugs/774/swagger.yml": true, "fixtures/go-swagger/bugs/776/error.yaml": true, "fixtures/go-swagger/bugs/776/item.yaml": true, "fixtures/go-swagger/bugs/809/swagger.yml": true, "fixtures/go-swagger/bugs/825/swagger.yml": true, "fixtures/go-swagger/bugs/890/path/health_check.yaml": true, "fixtures/go-swagger/bugs/981/swagger.json": true, "fixtures/go-swagger/canary/docker/swagger.json": true, "fixtures/go-swagger/canary/ms-cog-sci/swagger.json": true, "fixtures/go-swagger/codegen/azure-text-analyis.json": true, "fixtures/go-swagger/codegen/issue72.json": true, "fixtures/go-swagger/codegen/simplesearch.yml": true, "fixtures/go-swagger/codegen/swagger-codegen-tests.json": true, "fixtures/go-swagger/codegen/todolist.allparams.yml": true, "fixtures/go-swagger/codegen/todolist.bodyparams.yml": true, "fixtures/go-swagger/codegen/todolist.discriminators.yml": true, "fixtures/go-swagger/codegen/todolist.enums.yml": true, "fixtures/go-swagger/codegen/todolist.models.yml": true, "fixtures/go-swagger/codegen/todolist.responses.yml": true, "fixtures/go-swagger/codegen/todolist.schemavalidation.yml": true, "fixtures/go-swagger/codegen/todolist.simplepath.yml": true, "fixtures/go-swagger/codegen/todolist.simple.yml": true, "fixtures/go-swagger/codegen/todolist.url.basepath.yml": true, "fixtures/go-swagger/codegen/todolist.url.simple.yml": true, "fixtures/go-swagger/expansion/all-the-things.json": true, "fixtures/go-swagger/expansion/circularRefs.json": true, "fixtures/go-swagger/expansion/invalid-refs.json": true, "fixtures/go-swagger/expansion/params.json": true, "fixtures/go-swagger/expansion/schemas1.json": true, "fixtures/go-swagger/expansion/schemas2.json": true, "fixtures/go-swagger/petstores/petstore-expanded.json": true, "fixtures/go-swagger/petstores/petstore-simple.json": true, "fixtures/go-swagger/petstores/petstore-with-external-docs.json": true, "fixtures/go-swagger/remotes/folder/folderInteger.json": true, "fixtures/go-swagger/remotes/integer.json": true, "fixtures/go-swagger/remotes/subSchemas.json": true, "fixtures/go-swagger/specs/deeper/arrayProp.json": true, "fixtures/go-swagger/specs/deeper/stringProp.json": true, "fixtures/go-swagger/specs/refed.json": true, "fixtures/go-swagger/specs/resolution2.json": true, "fixtures/go-swagger/specs/resolution.json": true, } testGoSwaggerSpecs(t, filepath.Join(".", "fixtures", "go-swagger"), expectedFailures, expectedLoadFailures, true) } func wantSwaggerTest(info os.FileInfo) bool { f := info.Name() return !info.IsDir() && (strings.HasSuffix(f, ".yaml") || strings.HasSuffix(f, ".yml") || strings.HasSuffix(f, ".json")) } // A non regression test re "swagger validate" expectations. // Just validates all fixtures in ./fixtures/go-swagger (excluded codegen cases) func testGoSwaggerSpecs(t *testing.T, path string, expectToFail, expectToFailOnLoad map[string]bool, haltOnErrors bool) { err := filepath.Walk(path, func(path string, info os.FileInfo, _ error) error { t.Run(path, func(t *testing.T) { if !DebugTest { // when running in dev mode, run serially t.Parallel() } npath := filepath.ToSlash(path) shouldNotLoad := expectToFailOnLoad[npath] shouldFail := expectToFail[npath] if !wantSwaggerTest(info) { return } if DebugTest { t.Logf("Testing validation status for spec: %s", path) } doc, err := loads.Spec(path) if shouldNotLoad { require.Errorf(t, err, "expected this spec not to load: %s", path) return } require.NoErrorf(t, err, "expected this spec to load without error: %s", path) if haltOnErrors && t.Failed() { assert.FailNow(t, "test Halted: stop on error mode") return } // Validate the spec document validator := NewSpecValidator(doc.Schema(), strfmt.Default) validator.SetContinueOnErrors(true) res, _ := validator.Validate(doc) if shouldFail { assert.Falsef(t, res.IsValid(), "expected this spec to be invalid: %s", path) } else { assert.Truef(t, res.IsValid(), "expected this spec to be valid: %s", path) } t.Logf("Errors reported by validation on %s", path) for _, e := range res.Errors { t.Log(e) } if haltOnErrors && t.Failed() { assert.FailNow(t, "Test halted: stop on error mode") return } }) return nil }) require.NoErrorf(t, err, "walk: %v", err) if t.Failed() { log.Printf("A change in expected validation status has been detected") } } validate-0.24.0/type.go000066400000000000000000000156701457312750000147130ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "reflect" "strings" "github.com/go-openapi/errors" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) type typeValidator struct { Path string In string Type spec.StringOrArray Nullable bool Format string Options *SchemaValidatorOptions } func newTypeValidator(path, in string, typ spec.StringOrArray, nullable bool, format string, opts *SchemaValidatorOptions) *typeValidator { if opts == nil { opts = new(SchemaValidatorOptions) } var t *typeValidator if opts.recycleValidators { t = pools.poolOfTypeValidators.BorrowValidator() } else { t = new(typeValidator) } t.Path = path t.In = in t.Type = typ t.Nullable = nullable t.Format = format t.Options = opts return t } func (t *typeValidator) schemaInfoForType(data interface{}) (string, string) { // internal type to JSON type with swagger 2.0 format (with go-openapi/strfmt extensions), // see https://github.com/go-openapi/strfmt/blob/master/README.md // TODO: this switch really is some sort of reverse lookup for formats. It should be provided by strfmt. switch data.(type) { case []byte, strfmt.Base64, *strfmt.Base64: return stringType, stringFormatByte case strfmt.CreditCard, *strfmt.CreditCard: return stringType, stringFormatCreditCard case strfmt.Date, *strfmt.Date: return stringType, stringFormatDate case strfmt.DateTime, *strfmt.DateTime: return stringType, stringFormatDateTime case strfmt.Duration, *strfmt.Duration: return stringType, stringFormatDuration case swag.File, *swag.File: return fileType, "" case strfmt.Email, *strfmt.Email: return stringType, stringFormatEmail case strfmt.HexColor, *strfmt.HexColor: return stringType, stringFormatHexColor case strfmt.Hostname, *strfmt.Hostname: return stringType, stringFormatHostname case strfmt.IPv4, *strfmt.IPv4: return stringType, stringFormatIPv4 case strfmt.IPv6, *strfmt.IPv6: return stringType, stringFormatIPv6 case strfmt.ISBN, *strfmt.ISBN: return stringType, stringFormatISBN case strfmt.ISBN10, *strfmt.ISBN10: return stringType, stringFormatISBN10 case strfmt.ISBN13, *strfmt.ISBN13: return stringType, stringFormatISBN13 case strfmt.MAC, *strfmt.MAC: return stringType, stringFormatMAC case strfmt.ObjectId, *strfmt.ObjectId: return stringType, stringFormatBSONObjectID case strfmt.Password, *strfmt.Password: return stringType, stringFormatPassword case strfmt.RGBColor, *strfmt.RGBColor: return stringType, stringFormatRGBColor case strfmt.SSN, *strfmt.SSN: return stringType, stringFormatSSN case strfmt.URI, *strfmt.URI: return stringType, stringFormatURI case strfmt.UUID, *strfmt.UUID: return stringType, stringFormatUUID case strfmt.UUID3, *strfmt.UUID3: return stringType, stringFormatUUID3 case strfmt.UUID4, *strfmt.UUID4: return stringType, stringFormatUUID4 case strfmt.UUID5, *strfmt.UUID5: return stringType, stringFormatUUID5 // TODO: missing binary (io.ReadCloser) // TODO: missing json.Number default: val := reflect.ValueOf(data) tpe := val.Type() switch tpe.Kind() { //nolint:exhaustive case reflect.Bool: return booleanType, "" case reflect.String: return stringType, "" case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Uint8, reflect.Uint16, reflect.Uint32: // NOTE: that is the spec. With go-openapi, is that not uint32 for unsigned integers? return integerType, integerFormatInt32 case reflect.Int, reflect.Int64, reflect.Uint, reflect.Uint64: return integerType, integerFormatInt64 case reflect.Float32: // NOTE: is that not numberFormatFloat? return numberType, numberFormatFloat32 case reflect.Float64: // NOTE: is that not "double"? return numberType, numberFormatFloat64 // NOTE: go arrays (reflect.Array) are not supported (fixed length) case reflect.Slice: return arrayType, "" case reflect.Map, reflect.Struct: return objectType, "" case reflect.Interface: // What to do here? panic("dunno what to do here") case reflect.Ptr: return t.schemaInfoForType(reflect.Indirect(val).Interface()) } } return "", "" } func (t *typeValidator) SetPath(path string) { t.Path = path } func (t *typeValidator) Applies(source interface{}, _ reflect.Kind) bool { // typeValidator applies to Schema, Parameter and Header objects switch source.(type) { case *spec.Schema: case *spec.Parameter: case *spec.Header: default: return false } return (len(t.Type) > 0 || t.Format != "") } func (t *typeValidator) Validate(data interface{}) *Result { if t.Options.recycleValidators { defer func() { t.redeem() }() } if data == nil { // nil or zero value for the passed structure require Type: null if len(t.Type) > 0 && !t.Type.Contains(nullType) && !t.Nullable { // TODO: if a property is not required it also passes this return errorHelp.sErr(errors.InvalidType(t.Path, t.In, strings.Join(t.Type, ","), nullType), t.Options.recycleResult) } return emptyResult } // check if the type matches, should be used in every validator chain as first item val := reflect.Indirect(reflect.ValueOf(data)) kind := val.Kind() // infer schema type (JSON) and format from passed data type schType, format := t.schemaInfoForType(data) // check numerical types // TODO: check unsigned ints // TODO: check json.Number (see schema.go) isLowerInt := t.Format == integerFormatInt64 && format == integerFormatInt32 isLowerFloat := t.Format == numberFormatFloat64 && format == numberFormatFloat32 isFloatInt := schType == numberType && swag.IsFloat64AJSONInteger(val.Float()) && t.Type.Contains(integerType) isIntFloat := schType == integerType && t.Type.Contains(numberType) if kind != reflect.String && kind != reflect.Slice && t.Format != "" && !(t.Type.Contains(schType) || format == t.Format || isFloatInt || isIntFloat || isLowerInt || isLowerFloat) { // TODO: test case return errorHelp.sErr(errors.InvalidType(t.Path, t.In, t.Format, format), t.Options.recycleResult) } if !(t.Type.Contains(numberType) || t.Type.Contains(integerType)) && t.Format != "" && (kind == reflect.String || kind == reflect.Slice) { return emptyResult } if !(t.Type.Contains(schType) || isFloatInt || isIntFloat) { return errorHelp.sErr(errors.InvalidType(t.Path, t.In, strings.Join(t.Type, ","), schType), t.Options.recycleResult) } return emptyResult } func (t *typeValidator) redeem() { pools.poolOfTypeValidators.RedeemValidator(t) } validate-0.24.0/type_test.go000066400000000000000000000173661457312750000157560ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "io" "reflect" "testing" "time" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) type expectedJSONType struct { value interface{} expectedJSONType string expectedSwaggerFormat string } func TestType_schemaInfoForType(t *testing.T) { testTypes := []expectedJSONType{ { value: []byte("abc"), expectedJSONType: stringType, expectedSwaggerFormat: "byte", }, { value: strfmt.Date(time.Date(2014, 10, 10, 0, 0, 0, 0, time.UTC)), expectedJSONType: stringType, expectedSwaggerFormat: "date", }, { value: strfmt.NewDateTime(), expectedJSONType: stringType, expectedSwaggerFormat: "date-time", }, { // TODO: this exception is really prone to errors: should alias runtime.File in strfmt value: swag.File{}, expectedJSONType: "file", expectedSwaggerFormat: "", }, { value: strfmt.URI("http://thisisleadingusnowhere.com"), expectedJSONType: stringType, expectedSwaggerFormat: "uri", }, { value: strfmt.Email("fred@esasymoney.com"), expectedJSONType: stringType, expectedSwaggerFormat: "email", }, { value: strfmt.Hostname("www.github.com"), expectedJSONType: stringType, expectedSwaggerFormat: "hostname", }, { value: strfmt.Password("secret"), expectedJSONType: stringType, expectedSwaggerFormat: "password", }, { value: strfmt.IPv4("192.168.224.1"), expectedJSONType: stringType, expectedSwaggerFormat: "ipv4", }, { value: strfmt.IPv6("::1"), expectedJSONType: stringType, expectedSwaggerFormat: "ipv6", }, { value: strfmt.MAC("01:02:03:04:05:06"), expectedJSONType: stringType, expectedSwaggerFormat: "mac", }, { value: strfmt.UUID("a8098c1a-f86e-11da-bd1a-00112444be1e"), expectedJSONType: stringType, expectedSwaggerFormat: "uuid", }, { value: strfmt.UUID3("bcd02e22-68f0-3046-a512-327cca9def8f"), expectedJSONType: stringType, expectedSwaggerFormat: "uuid3", }, { value: strfmt.UUID4("025b0d74-00a2-4048-bf57-227c5111bb34"), expectedJSONType: stringType, expectedSwaggerFormat: "uuid4", }, { value: strfmt.UUID5("886313e1-3b8a-5372-9b90-0c9aee199e5d"), expectedJSONType: stringType, expectedSwaggerFormat: "uuid5", }, { value: strfmt.ISBN("0321751043"), expectedJSONType: stringType, expectedSwaggerFormat: "isbn", }, { value: strfmt.ISBN10("0321751043"), expectedJSONType: stringType, expectedSwaggerFormat: "isbn10", }, { value: strfmt.ISBN13("978-0321751041"), expectedJSONType: stringType, expectedSwaggerFormat: "isbn13", }, { value: strfmt.CreditCard("4111-1111-1111-1111"), expectedJSONType: stringType, expectedSwaggerFormat: "creditcard", }, { value: strfmt.SSN("111-11-1111"), expectedJSONType: stringType, expectedSwaggerFormat: "ssn", }, { value: strfmt.HexColor("#FFFFFF"), expectedJSONType: stringType, expectedSwaggerFormat: "hexcolor", }, { value: strfmt.RGBColor("rgb(255,255,255)"), expectedJSONType: stringType, expectedSwaggerFormat: "rgbcolor", }, // Numerical values { value: true, expectedJSONType: "boolean", expectedSwaggerFormat: "", }, { value: int8(12), expectedJSONType: "integer", expectedSwaggerFormat: "int32", }, { value: uint8(12), expectedJSONType: "integer", expectedSwaggerFormat: "int32", }, { value: int16(12), expectedJSONType: "integer", expectedSwaggerFormat: "int32", }, { value: uint16(12), expectedJSONType: "integer", // TODO: should be uint32 expectedSwaggerFormat: "int32", }, { value: int32(12), expectedJSONType: "integer", expectedSwaggerFormat: "int32", }, { value: uint32(12), expectedJSONType: "integer", // TODO: should be uint32 expectedSwaggerFormat: "int32", }, { value: int(12), expectedJSONType: "integer", expectedSwaggerFormat: "int64", }, { value: uint(12), expectedJSONType: "integer", // TODO: should be uint64 expectedSwaggerFormat: "int64", }, { value: int64(12), expectedJSONType: "integer", expectedSwaggerFormat: "int64", }, { value: uint64(12), expectedJSONType: "integer", // TODO: should be uint64 expectedSwaggerFormat: "int64", }, { value: float32(12), expectedJSONType: "number", // TODO: should be float expectedSwaggerFormat: "float32", }, { value: float64(12), expectedJSONType: "number", // TODO: should be double expectedSwaggerFormat: "float64", }, { value: []string{}, expectedJSONType: "array", expectedSwaggerFormat: "", }, { value: expectedJSONType{}, expectedJSONType: "object", expectedSwaggerFormat: "", }, { value: map[string]bool{"key": false}, expectedJSONType: "object", expectedSwaggerFormat: "", }, { value: "simply a string", expectedJSONType: stringType, expectedSwaggerFormat: "", }, { // NOTE: Go array returns no JSON type value: [4]int{1, 2, 4, 4}, expectedJSONType: "", expectedSwaggerFormat: "", }, { value: strfmt.Base64("ZWxpemFiZXRocG9zZXk="), expectedJSONType: stringType, expectedSwaggerFormat: "byte", }, { value: strfmt.Duration(0), expectedJSONType: stringType, expectedSwaggerFormat: "duration", }, { value: strfmt.NewObjectId("507f1f77bcf86cd799439011"), expectedJSONType: stringType, expectedSwaggerFormat: "bsonobjectid", }, /* Test case for : case reflect.Interface: // What to do here? panic("dunno what to do here") */ } v := newTypeValidator( "", "", nil, false, "", nil, ) t.Run("should not apply", func(t *testing.T) { require.False(t, v.Applies("x", reflect.Map)) }) for _, x := range testTypes { value := x.value jsonType, swaggerFormat := v.schemaInfoForType(value) assert.Equal(t, x.expectedJSONType, jsonType) assert.Equal(t, x.expectedSwaggerFormat, swaggerFormat) jsonType, swaggerFormat = v.schemaInfoForType(&value) assert.Equal(t, x.expectedJSONType, jsonType) assert.Equal(t, x.expectedSwaggerFormat, swaggerFormat) } // Check file declarations as io.ReadCloser are properly detected myFile := swag.File{} var myReader io.ReadCloser = &myFile jsonType, swaggerFormat := v.schemaInfoForType(myReader) assert.Equal(t, "file", jsonType) assert.Equal(t, "", swaggerFormat) } validate-0.24.0/update-fixtures.sh000077500000000000000000000006101457312750000170570ustar00rootroot00000000000000#!/bin/bash set -eu -o pipefail dir=$(git rev-parse --show-toplevel) scratch=$(mktemp -d -t tmp.XXXXXXXXXX) function finish { rm -rf "$scratch" } trap finish EXIT SIGHUP SIGINT SIGTERM cd "$scratch" git clone https://github.com/json-schema-org/JSON-Schema-Test-Suite Suite cp -r Suite/tests/draft4/* "$dir/fixtures/jsonschema_suite" cp -a Suite/remotes "$dir/fixtures/jsonschema_suite" validate-0.24.0/validator.go000066400000000000000000000606461457312750000157220ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "fmt" "reflect" "github.com/go-openapi/errors" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" ) // An EntityValidator is an interface for things that can validate entities type EntityValidator interface { Validate(interface{}) *Result } type valueValidator interface { SetPath(path string) Applies(interface{}, reflect.Kind) bool Validate(interface{}) *Result } type itemsValidator struct { items *spec.Items root interface{} path string in string validators [6]valueValidator KnownFormats strfmt.Registry Options *SchemaValidatorOptions } func newItemsValidator(path, in string, items *spec.Items, root interface{}, formats strfmt.Registry, opts *SchemaValidatorOptions) *itemsValidator { if opts == nil { opts = new(SchemaValidatorOptions) } var iv *itemsValidator if opts.recycleValidators { iv = pools.poolOfItemsValidators.BorrowValidator() } else { iv = new(itemsValidator) } iv.path = path iv.in = in iv.items = items iv.root = root iv.KnownFormats = formats iv.Options = opts iv.validators = [6]valueValidator{ iv.typeValidator(), iv.stringValidator(), iv.formatValidator(), iv.numberValidator(), iv.sliceValidator(), iv.commonValidator(), } return iv } func (i *itemsValidator) Validate(index int, data interface{}) *Result { if i.Options.recycleValidators { defer func() { i.redeemChildren() i.redeem() }() } tpe := reflect.TypeOf(data) kind := tpe.Kind() var result *Result if i.Options.recycleResult { result = pools.poolOfResults.BorrowResult() } else { result = new(Result) } path := fmt.Sprintf("%s.%d", i.path, index) for idx, validator := range i.validators { if !validator.Applies(i.root, kind) { if i.Options.recycleValidators { // Validate won't be called, so relinquish this validator if redeemableChildren, ok := validator.(interface{ redeemChildren() }); ok { redeemableChildren.redeemChildren() } if redeemable, ok := validator.(interface{ redeem() }); ok { redeemable.redeem() } i.validators[idx] = nil // prevents further (unsafe) usage } continue } validator.SetPath(path) err := validator.Validate(data) if i.Options.recycleValidators { i.validators[idx] = nil // prevents further (unsafe) usage } if err != nil { result.Inc() if err.HasErrors() { result.Merge(err) break } result.Merge(err) } } return result } func (i *itemsValidator) typeValidator() valueValidator { return newTypeValidator( i.path, i.in, spec.StringOrArray([]string{i.items.Type}), i.items.Nullable, i.items.Format, i.Options, ) } func (i *itemsValidator) commonValidator() valueValidator { return newBasicCommonValidator( "", i.in, i.items.Default, i.items.Enum, i.Options, ) } func (i *itemsValidator) sliceValidator() valueValidator { return newBasicSliceValidator( "", i.in, i.items.Default, i.items.MaxItems, i.items.MinItems, i.items.UniqueItems, i.items.Items, i.root, i.KnownFormats, i.Options, ) } func (i *itemsValidator) numberValidator() valueValidator { return newNumberValidator( "", i.in, i.items.Default, i.items.MultipleOf, i.items.Maximum, i.items.ExclusiveMaximum, i.items.Minimum, i.items.ExclusiveMinimum, i.items.Type, i.items.Format, i.Options, ) } func (i *itemsValidator) stringValidator() valueValidator { return newStringValidator( "", i.in, i.items.Default, false, // Required false, // AllowEmpty i.items.MaxLength, i.items.MinLength, i.items.Pattern, i.Options, ) } func (i *itemsValidator) formatValidator() valueValidator { return newFormatValidator( "", i.in, i.items.Format, i.KnownFormats, i.Options, ) } func (i *itemsValidator) redeem() { pools.poolOfItemsValidators.RedeemValidator(i) } func (i *itemsValidator) redeemChildren() { for idx, validator := range i.validators { if validator == nil { continue } if redeemableChildren, ok := validator.(interface{ redeemChildren() }); ok { redeemableChildren.redeemChildren() } if redeemable, ok := validator.(interface{ redeem() }); ok { redeemable.redeem() } i.validators[idx] = nil // free up allocated children if not in pool } } type basicCommonValidator struct { Path string In string Default interface{} Enum []interface{} Options *SchemaValidatorOptions } func newBasicCommonValidator(path, in string, def interface{}, enum []interface{}, opts *SchemaValidatorOptions) *basicCommonValidator { if opts == nil { opts = new(SchemaValidatorOptions) } var b *basicCommonValidator if opts.recycleValidators { b = pools.poolOfBasicCommonValidators.BorrowValidator() } else { b = new(basicCommonValidator) } b.Path = path b.In = in b.Default = def b.Enum = enum b.Options = opts return b } func (b *basicCommonValidator) SetPath(path string) { b.Path = path } func (b *basicCommonValidator) Applies(source interface{}, _ reflect.Kind) bool { switch source.(type) { case *spec.Parameter, *spec.Schema, *spec.Header: return true default: return false } } func (b *basicCommonValidator) Validate(data interface{}) (res *Result) { if b.Options.recycleValidators { defer func() { b.redeem() }() } if len(b.Enum) == 0 { return nil } for _, enumValue := range b.Enum { actualType := reflect.TypeOf(enumValue) if actualType == nil { // Safeguard continue } expectedValue := reflect.ValueOf(data) if expectedValue.IsValid() && expectedValue.Type().ConvertibleTo(actualType) && reflect.DeepEqual(expectedValue.Convert(actualType).Interface(), enumValue) { return nil } } return errorHelp.sErr(errors.EnumFail(b.Path, b.In, data, b.Enum), b.Options.recycleResult) } func (b *basicCommonValidator) redeem() { pools.poolOfBasicCommonValidators.RedeemValidator(b) } // A HeaderValidator has very limited subset of validations to apply type HeaderValidator struct { name string header *spec.Header validators [6]valueValidator KnownFormats strfmt.Registry Options *SchemaValidatorOptions } // NewHeaderValidator creates a new header validator object func NewHeaderValidator(name string, header *spec.Header, formats strfmt.Registry, options ...Option) *HeaderValidator { opts := new(SchemaValidatorOptions) for _, o := range options { o(opts) } return newHeaderValidator(name, header, formats, opts) } func newHeaderValidator(name string, header *spec.Header, formats strfmt.Registry, opts *SchemaValidatorOptions) *HeaderValidator { if opts == nil { opts = new(SchemaValidatorOptions) } var p *HeaderValidator if opts.recycleValidators { p = pools.poolOfHeaderValidators.BorrowValidator() } else { p = new(HeaderValidator) } p.name = name p.header = header p.KnownFormats = formats p.Options = opts p.validators = [6]valueValidator{ newTypeValidator( name, "header", spec.StringOrArray([]string{header.Type}), header.Nullable, header.Format, p.Options, ), p.stringValidator(), p.formatValidator(), p.numberValidator(), p.sliceValidator(), p.commonValidator(), } return p } // Validate the value of the header against its schema func (p *HeaderValidator) Validate(data interface{}) *Result { if p.Options.recycleValidators { defer func() { p.redeemChildren() p.redeem() }() } if data == nil { return nil } var result *Result if p.Options.recycleResult { result = pools.poolOfResults.BorrowResult() } else { result = new(Result) } tpe := reflect.TypeOf(data) kind := tpe.Kind() for idx, validator := range p.validators { if !validator.Applies(p.header, kind) { if p.Options.recycleValidators { // Validate won't be called, so relinquish this validator if redeemableChildren, ok := validator.(interface{ redeemChildren() }); ok { redeemableChildren.redeemChildren() } if redeemable, ok := validator.(interface{ redeem() }); ok { redeemable.redeem() } p.validators[idx] = nil // prevents further (unsafe) usage } continue } err := validator.Validate(data) if p.Options.recycleValidators { p.validators[idx] = nil // prevents further (unsafe) usage } if err != nil { if err.HasErrors() { result.Merge(err) break } result.Merge(err) } } return result } func (p *HeaderValidator) commonValidator() valueValidator { return newBasicCommonValidator( p.name, "response", p.header.Default, p.header.Enum, p.Options, ) } func (p *HeaderValidator) sliceValidator() valueValidator { return newBasicSliceValidator( p.name, "response", p.header.Default, p.header.MaxItems, p.header.MinItems, p.header.UniqueItems, p.header.Items, p.header, p.KnownFormats, p.Options, ) } func (p *HeaderValidator) numberValidator() valueValidator { return newNumberValidator( p.name, "response", p.header.Default, p.header.MultipleOf, p.header.Maximum, p.header.ExclusiveMaximum, p.header.Minimum, p.header.ExclusiveMinimum, p.header.Type, p.header.Format, p.Options, ) } func (p *HeaderValidator) stringValidator() valueValidator { return newStringValidator( p.name, "response", p.header.Default, true, false, p.header.MaxLength, p.header.MinLength, p.header.Pattern, p.Options, ) } func (p *HeaderValidator) formatValidator() valueValidator { return newFormatValidator( p.name, "response", p.header.Format, p.KnownFormats, p.Options, ) } func (p *HeaderValidator) redeem() { pools.poolOfHeaderValidators.RedeemValidator(p) } func (p *HeaderValidator) redeemChildren() { for idx, validator := range p.validators { if validator == nil { continue } if redeemableChildren, ok := validator.(interface{ redeemChildren() }); ok { redeemableChildren.redeemChildren() } if redeemable, ok := validator.(interface{ redeem() }); ok { redeemable.redeem() } p.validators[idx] = nil // free up allocated children if not in pool } } // A ParamValidator has very limited subset of validations to apply type ParamValidator struct { param *spec.Parameter validators [6]valueValidator KnownFormats strfmt.Registry Options *SchemaValidatorOptions } // NewParamValidator creates a new param validator object func NewParamValidator(param *spec.Parameter, formats strfmt.Registry, options ...Option) *ParamValidator { opts := new(SchemaValidatorOptions) for _, o := range options { o(opts) } return newParamValidator(param, formats, opts) } func newParamValidator(param *spec.Parameter, formats strfmt.Registry, opts *SchemaValidatorOptions) *ParamValidator { if opts == nil { opts = new(SchemaValidatorOptions) } var p *ParamValidator if opts.recycleValidators { p = pools.poolOfParamValidators.BorrowValidator() } else { p = new(ParamValidator) } p.param = param p.KnownFormats = formats p.Options = opts p.validators = [6]valueValidator{ newTypeValidator( param.Name, param.In, spec.StringOrArray([]string{param.Type}), param.Nullable, param.Format, p.Options, ), p.stringValidator(), p.formatValidator(), p.numberValidator(), p.sliceValidator(), p.commonValidator(), } return p } // Validate the data against the description of the parameter func (p *ParamValidator) Validate(data interface{}) *Result { if data == nil { return nil } var result *Result if p.Options.recycleResult { result = pools.poolOfResults.BorrowResult() } else { result = new(Result) } tpe := reflect.TypeOf(data) kind := tpe.Kind() if p.Options.recycleValidators { defer func() { p.redeemChildren() p.redeem() }() } // TODO: validate type for idx, validator := range p.validators { if !validator.Applies(p.param, kind) { if p.Options.recycleValidators { // Validate won't be called, so relinquish this validator if redeemableChildren, ok := validator.(interface{ redeemChildren() }); ok { redeemableChildren.redeemChildren() } if redeemable, ok := validator.(interface{ redeem() }); ok { redeemable.redeem() } p.validators[idx] = nil // prevents further (unsafe) usage } continue } err := validator.Validate(data) if p.Options.recycleValidators { p.validators[idx] = nil // prevents further (unsafe) usage } if err != nil { if err.HasErrors() { result.Merge(err) break } result.Merge(err) } } return result } func (p *ParamValidator) commonValidator() valueValidator { return newBasicCommonValidator( p.param.Name, p.param.In, p.param.Default, p.param.Enum, p.Options, ) } func (p *ParamValidator) sliceValidator() valueValidator { return newBasicSliceValidator( p.param.Name, p.param.In, p.param.Default, p.param.MaxItems, p.param.MinItems, p.param.UniqueItems, p.param.Items, p.param, p.KnownFormats, p.Options, ) } func (p *ParamValidator) numberValidator() valueValidator { return newNumberValidator( p.param.Name, p.param.In, p.param.Default, p.param.MultipleOf, p.param.Maximum, p.param.ExclusiveMaximum, p.param.Minimum, p.param.ExclusiveMinimum, p.param.Type, p.param.Format, p.Options, ) } func (p *ParamValidator) stringValidator() valueValidator { return newStringValidator( p.param.Name, p.param.In, p.param.Default, p.param.Required, p.param.AllowEmptyValue, p.param.MaxLength, p.param.MinLength, p.param.Pattern, p.Options, ) } func (p *ParamValidator) formatValidator() valueValidator { return newFormatValidator( p.param.Name, p.param.In, p.param.Format, p.KnownFormats, p.Options, ) } func (p *ParamValidator) redeem() { pools.poolOfParamValidators.RedeemValidator(p) } func (p *ParamValidator) redeemChildren() { for idx, validator := range p.validators { if validator == nil { continue } if redeemableChildren, ok := validator.(interface{ redeemChildren() }); ok { redeemableChildren.redeemChildren() } if redeemable, ok := validator.(interface{ redeem() }); ok { redeemable.redeem() } p.validators[idx] = nil // free up allocated children if not in pool } } type basicSliceValidator struct { Path string In string Default interface{} MaxItems *int64 MinItems *int64 UniqueItems bool Items *spec.Items Source interface{} KnownFormats strfmt.Registry Options *SchemaValidatorOptions } func newBasicSliceValidator( path, in string, def interface{}, maxItems, minItems *int64, uniqueItems bool, items *spec.Items, source interface{}, formats strfmt.Registry, opts *SchemaValidatorOptions) *basicSliceValidator { if opts == nil { opts = new(SchemaValidatorOptions) } var s *basicSliceValidator if opts.recycleValidators { s = pools.poolOfBasicSliceValidators.BorrowValidator() } else { s = new(basicSliceValidator) } s.Path = path s.In = in s.Default = def s.MaxItems = maxItems s.MinItems = minItems s.UniqueItems = uniqueItems s.Items = items s.Source = source s.KnownFormats = formats s.Options = opts return s } func (s *basicSliceValidator) SetPath(path string) { s.Path = path } func (s *basicSliceValidator) Applies(source interface{}, kind reflect.Kind) bool { switch source.(type) { case *spec.Parameter, *spec.Items, *spec.Header: return kind == reflect.Slice default: return false } } func (s *basicSliceValidator) Validate(data interface{}) *Result { if s.Options.recycleValidators { defer func() { s.redeem() }() } val := reflect.ValueOf(data) size := int64(val.Len()) if s.MinItems != nil { if err := MinItems(s.Path, s.In, size, *s.MinItems); err != nil { return errorHelp.sErr(err, s.Options.recycleResult) } } if s.MaxItems != nil { if err := MaxItems(s.Path, s.In, size, *s.MaxItems); err != nil { return errorHelp.sErr(err, s.Options.recycleResult) } } if s.UniqueItems { if err := UniqueItems(s.Path, s.In, data); err != nil { return errorHelp.sErr(err, s.Options.recycleResult) } } if s.Items == nil { return nil } for i := 0; i < int(size); i++ { itemsValidator := newItemsValidator(s.Path, s.In, s.Items, s.Source, s.KnownFormats, s.Options) ele := val.Index(i) if err := itemsValidator.Validate(i, ele.Interface()); err != nil { if err.HasErrors() { return err } if err.wantsRedeemOnMerge { pools.poolOfResults.RedeemResult(err) } } } return nil } func (s *basicSliceValidator) redeem() { pools.poolOfBasicSliceValidators.RedeemValidator(s) } type numberValidator struct { Path string In string Default interface{} MultipleOf *float64 Maximum *float64 ExclusiveMaximum bool Minimum *float64 ExclusiveMinimum bool // Allows for more accurate behavior regarding integers Type string Format string Options *SchemaValidatorOptions } func newNumberValidator( path, in string, def interface{}, multipleOf, maximum *float64, exclusiveMaximum bool, minimum *float64, exclusiveMinimum bool, typ, format string, opts *SchemaValidatorOptions) *numberValidator { if opts == nil { opts = new(SchemaValidatorOptions) } var n *numberValidator if opts.recycleValidators { n = pools.poolOfNumberValidators.BorrowValidator() } else { n = new(numberValidator) } n.Path = path n.In = in n.Default = def n.MultipleOf = multipleOf n.Maximum = maximum n.ExclusiveMaximum = exclusiveMaximum n.Minimum = minimum n.ExclusiveMinimum = exclusiveMinimum n.Type = typ n.Format = format n.Options = opts return n } func (n *numberValidator) SetPath(path string) { n.Path = path } func (n *numberValidator) Applies(source interface{}, kind reflect.Kind) bool { switch source.(type) { case *spec.Parameter, *spec.Schema, *spec.Items, *spec.Header: isInt := kind >= reflect.Int && kind <= reflect.Uint64 isFloat := kind == reflect.Float32 || kind == reflect.Float64 return isInt || isFloat default: return false } } // Validate provides a validator for generic JSON numbers, // // By default, numbers are internally represented as float64. // Formats float, or float32 may alter this behavior by mapping to float32. // A special validation process is followed for integers, with optional "format": // this is an attempt to provide a validation with native types. // // NOTE: since the constraint specified (boundary, multipleOf) is unmarshalled // as float64, loss of information remains possible (e.g. on very large integers). // // Since this value directly comes from the unmarshalling, it is not possible // at this stage of processing to check further and guarantee the correctness of such values. // // Normally, the JSON Number.MAX_SAFE_INTEGER (resp. Number.MIN_SAFE_INTEGER) // would check we do not get such a loss. // // If this is the case, replace AddErrors() by AddWarnings() and IsValid() by !HasWarnings(). // // TODO: consider replacing boundary check errors by simple warnings. // // TODO: default boundaries with MAX_SAFE_INTEGER are not checked (specific to json.Number?) func (n *numberValidator) Validate(val interface{}) *Result { if n.Options.recycleValidators { defer func() { n.redeem() }() } var res, resMultiple, resMinimum, resMaximum *Result if n.Options.recycleResult { res = pools.poolOfResults.BorrowResult() } else { res = new(Result) } // Used only to attempt to validate constraint on value, // even though value or constraint specified do not match type and format data := valueHelp.asFloat64(val) // Is the provided value within the range of the specified numeric type and format? res.AddErrors(IsValueValidAgainstRange(val, n.Type, n.Format, "Checked", n.Path)) if n.MultipleOf != nil { resMultiple = pools.poolOfResults.BorrowResult() // Is the constraint specifier within the range of the specific numeric type and format? resMultiple.AddErrors(IsValueValidAgainstRange(*n.MultipleOf, n.Type, n.Format, "MultipleOf", n.Path)) if resMultiple.IsValid() { // Constraint validated with compatible types if err := MultipleOfNativeType(n.Path, n.In, val, *n.MultipleOf); err != nil { resMultiple.Merge(errorHelp.sErr(err, n.Options.recycleResult)) } } else { // Constraint nevertheless validated, converted as general number if err := MultipleOf(n.Path, n.In, data, *n.MultipleOf); err != nil { resMultiple.Merge(errorHelp.sErr(err, n.Options.recycleResult)) } } } if n.Maximum != nil { resMaximum = pools.poolOfResults.BorrowResult() // Is the constraint specifier within the range of the specific numeric type and format? resMaximum.AddErrors(IsValueValidAgainstRange(*n.Maximum, n.Type, n.Format, "Maximum boundary", n.Path)) if resMaximum.IsValid() { // Constraint validated with compatible types if err := MaximumNativeType(n.Path, n.In, val, *n.Maximum, n.ExclusiveMaximum); err != nil { resMaximum.Merge(errorHelp.sErr(err, n.Options.recycleResult)) } } else { // Constraint nevertheless validated, converted as general number if err := Maximum(n.Path, n.In, data, *n.Maximum, n.ExclusiveMaximum); err != nil { resMaximum.Merge(errorHelp.sErr(err, n.Options.recycleResult)) } } } if n.Minimum != nil { resMinimum = pools.poolOfResults.BorrowResult() // Is the constraint specifier within the range of the specific numeric type and format? resMinimum.AddErrors(IsValueValidAgainstRange(*n.Minimum, n.Type, n.Format, "Minimum boundary", n.Path)) if resMinimum.IsValid() { // Constraint validated with compatible types if err := MinimumNativeType(n.Path, n.In, val, *n.Minimum, n.ExclusiveMinimum); err != nil { resMinimum.Merge(errorHelp.sErr(err, n.Options.recycleResult)) } } else { // Constraint nevertheless validated, converted as general number if err := Minimum(n.Path, n.In, data, *n.Minimum, n.ExclusiveMinimum); err != nil { resMinimum.Merge(errorHelp.sErr(err, n.Options.recycleResult)) } } } res.Merge(resMultiple, resMinimum, resMaximum) res.Inc() return res } func (n *numberValidator) redeem() { pools.poolOfNumberValidators.RedeemValidator(n) } type stringValidator struct { Path string In string Default interface{} Required bool AllowEmptyValue bool MaxLength *int64 MinLength *int64 Pattern string Options *SchemaValidatorOptions } func newStringValidator( path, in string, def interface{}, required, allowEmpty bool, maxLength, minLength *int64, pattern string, opts *SchemaValidatorOptions) *stringValidator { if opts == nil { opts = new(SchemaValidatorOptions) } var s *stringValidator if opts.recycleValidators { s = pools.poolOfStringValidators.BorrowValidator() } else { s = new(stringValidator) } s.Path = path s.In = in s.Default = def s.Required = required s.AllowEmptyValue = allowEmpty s.MaxLength = maxLength s.MinLength = minLength s.Pattern = pattern s.Options = opts return s } func (s *stringValidator) SetPath(path string) { s.Path = path } func (s *stringValidator) Applies(source interface{}, kind reflect.Kind) bool { switch source.(type) { case *spec.Parameter, *spec.Schema, *spec.Items, *spec.Header: return kind == reflect.String default: return false } } func (s *stringValidator) Validate(val interface{}) *Result { if s.Options.recycleValidators { defer func() { s.redeem() }() } data, ok := val.(string) if !ok { return errorHelp.sErr(errors.InvalidType(s.Path, s.In, stringType, val), s.Options.recycleResult) } if s.Required && !s.AllowEmptyValue && (s.Default == nil || s.Default == "") { if err := RequiredString(s.Path, s.In, data); err != nil { return errorHelp.sErr(err, s.Options.recycleResult) } } if s.MaxLength != nil { if err := MaxLength(s.Path, s.In, data, *s.MaxLength); err != nil { return errorHelp.sErr(err, s.Options.recycleResult) } } if s.MinLength != nil { if err := MinLength(s.Path, s.In, data, *s.MinLength); err != nil { return errorHelp.sErr(err, s.Options.recycleResult) } } if s.Pattern != "" { if err := Pattern(s.Path, s.In, data, s.Pattern); err != nil { return errorHelp.sErr(err, s.Options.recycleResult) } } return nil } func (s *stringValidator) redeem() { pools.poolOfStringValidators.RedeemValidator(s) } validate-0.24.0/validator_test.go000066400000000000000000000201631457312750000167470ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "math" "reflect" "testing" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestHeaderValidator(t *testing.T) { t.Run("with no recycling", func(t *testing.T) { v := NewHeaderValidator("header", &spec.Header{}, strfmt.Default, SwaggerSchema(true)) res := v.Validate(nil) require.Nil(t, res) }) t.Run("with recycling", func(t *testing.T) { v := NewHeaderValidator("header", &spec.Header{}, strfmt.Default, SwaggerSchema(true), WithRecycleValidators(true), withRecycleResults(true), ) t.Run("should validate nil data", func(t *testing.T) { res := v.Validate(nil) require.Nil(t, res) }) t.Run("should validate only once", func(t *testing.T) { // we should not do that: the pool chain list is populated with a duplicate: needs a reset t.Cleanup(resetPools) require.Panics(t, func() { _ = v.Validate("header") }) }) t.Run("should validate non nil data", func(t *testing.T) { nv := NewHeaderValidator("header", &spec.Header{SimpleSchema: spec.SimpleSchema{Type: "string"}}, strfmt.Default, SwaggerSchema(true), WithRecycleValidators(true), withRecycleResults(true), ) res := nv.Validate("X-GO") require.NotNil(t, res) require.Empty(t, res.Errors) require.True(t, res.wantsRedeemOnMerge) pools.poolOfResults.RedeemResult(res) }) }) } func TestParamValidator(t *testing.T) { v := NewParamValidator(&spec.Parameter{}, strfmt.Default, SwaggerSchema(true)) res := v.Validate(nil) require.Nil(t, res) } func TestNumberValidator_EdgeCases(t *testing.T) { // Apply var min = float64(math.MinInt32 - 1) var max = float64(math.MaxInt32 + 1) v := newNumberValidator( "path", "in", nil, nil, &max, // *float64 false, &min, // *float64 false, // Allows for more accurate behavior regarding integers "integer", "int32", nil, ) // numberValidator applies to: Parameter,Schema,Items,Header sources := []interface{}{ new(spec.Parameter), new(spec.Schema), new(spec.Items), new(spec.Header), } testNumberApply(t, v, sources) assert.False(t, v.Applies(float64(32), reflect.Float64)) // Now for different scenarios on Minimum, Maximum // - The Maximum value does not respect the Type|Format specification // - Value is checked as float64 with Maximum as float64 and fails res := v.Validate(int64(math.MaxInt32 + 2)) assert.True(t, res.HasErrors()) // - The Minimum value does not respect the Type|Format specification // - Value is checked as float64 with Maximum as float64 and fails res = v.Validate(int64(math.MinInt32 - 2)) assert.True(t, res.HasErrors()) } func testNumberApply(t *testing.T, v *numberValidator, sources []interface{}) { for _, source := range sources { // numberValidator does not applies to: assert.False(t, v.Applies(source, reflect.String)) assert.False(t, v.Applies(source, reflect.Struct)) // numberValidator applies to: assert.True(t, v.Applies(source, reflect.Int)) assert.True(t, v.Applies(source, reflect.Int8)) assert.True(t, v.Applies(source, reflect.Uint16)) assert.True(t, v.Applies(source, reflect.Uint32)) assert.True(t, v.Applies(source, reflect.Uint64)) assert.True(t, v.Applies(source, reflect.Uint)) assert.True(t, v.Applies(source, reflect.Uint8)) assert.True(t, v.Applies(source, reflect.Uint16)) assert.True(t, v.Applies(source, reflect.Uint32)) assert.True(t, v.Applies(source, reflect.Uint64)) assert.True(t, v.Applies(source, reflect.Float32)) assert.True(t, v.Applies(source, reflect.Float64)) } } func TestStringValidator_EdgeCases(t *testing.T) { // Apply v := newStringValidator( "", "", nil, false, false, nil, nil, "", nil, ) // stringValidator applies to: Parameter,Schema,Items,Header sources := []interface{}{ new(spec.Parameter), new(spec.Schema), new(spec.Items), new(spec.Header), } testStringApply(t, v, sources) assert.False(t, v.Applies("A string", reflect.String)) } func testStringApply(t *testing.T, v *stringValidator, sources []interface{}) { for _, source := range sources { // numberValidator does not applies to: assert.False(t, v.Applies(source, reflect.Struct)) assert.False(t, v.Applies(source, reflect.Int)) // numberValidator applies to: assert.True(t, v.Applies(source, reflect.String)) } } func TestBasicCommonValidator_EdgeCases(t *testing.T) { // Apply v := newBasicCommonValidator( "", "", nil, []interface{}{"a", nil, 3}, nil, ) // basicCommonValidator applies to: Parameter,Schema,Header sources := []interface{}{ new(spec.Parameter), new(spec.Schema), new(spec.Header), } testCommonApply(t, v, sources) assert.False(t, v.Applies("A string", reflect.String)) t.Run("should validate Enum", func(t *testing.T) { res := v.Validate("a") require.Nil(t, res) res = v.Validate(3) require.Nil(t, res) res = v.Validate("b") require.NotNil(t, res) assert.True(t, res.HasErrors()) }) t.Run("shoud validate empty Enum", func(t *testing.T) { ev := newBasicCommonValidator( "", "", nil, nil, nil, ) res := ev.Validate("a") require.Nil(t, res) res = ev.Validate(3) require.Nil(t, res) res = ev.Validate("b") require.Nil(t, res) }) } func testCommonApply(t *testing.T, v *basicCommonValidator, sources []interface{}) { for _, source := range sources { assert.True(t, v.Applies(source, reflect.String)) } } func TestBasicSliceValidator_EdgeCases(t *testing.T) { t.Run("should Apply", func(t *testing.T) { v := newBasicSliceValidator( "", "", nil, nil, nil, false, nil, nil, strfmt.Default, nil, ) // basicCommonValidator applies to: Parameter,Schema,Header sources := []interface{}{ new(spec.Parameter), new(spec.Items), new(spec.Header), } testSliceApply(t, v, sources) assert.False(t, v.Applies(new(spec.Schema), reflect.Slice)) assert.False(t, v.Applies(new(spec.Parameter), reflect.String)) }) t.Run("with recycling", func(t *testing.T) { v := newBasicSliceValidator( "", "", nil, nil, nil, false, nil, nil, strfmt.Default, &SchemaValidatorOptions{recycleValidators: true}, ) res := v.Validate([]int{}) require.Nil(t, res) }) } func testSliceApply(t *testing.T, v *basicSliceValidator, sources []interface{}) { for _, source := range sources { assert.True(t, v.Applies(source, reflect.Slice)) } } /* unused type anything struct { anyProperty int } // hasDuplicates() is currently not exercised by common spec testcases // (this method is not used by the validator atm) // Here is a unit exerciser // NOTE: this method is probably obsolete and superseeded by values.go:UniqueItems() // which is superior in every respect to this one. func TestBasicSliceValidator_HasDuplicates(t *testing.T) { s := basicSliceValidator{} // hasDuplicates() makes no hypothesis about the underlying object, // save being an array, slice or string (same constraint as reflect.Value.Index()) // it also comes without safeguard or anything. vi := []int{1, 2, 3} vs := []string{"a", "b", "c"} vt := []anything{ {anyProperty: 1}, {anyProperty: 2}, {anyProperty: 3}, } assert.False(t, s.hasDuplicates(reflect.ValueOf(vi), len(vi))) assert.False(t, s.hasDuplicates(reflect.ValueOf(vs), len(vs))) assert.False(t, s.hasDuplicates(reflect.ValueOf(vt), len(vt))) di := []int{1, 1, 3} ds := []string{"a", "b", "a"} dt := []anything{ {anyProperty: 1}, {anyProperty: 2}, {anyProperty: 2}, } assert.True(t, s.hasDuplicates(reflect.ValueOf(di), len(di))) assert.True(t, s.hasDuplicates(reflect.ValueOf(ds), len(ds))) assert.True(t, s.hasDuplicates(reflect.ValueOf(dt), len(dt))) } */ validate-0.24.0/values.go000066400000000000000000000351661457312750000152330ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "context" "fmt" "reflect" "strings" "unicode/utf8" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // Enum validates if the data is a member of the enum func Enum(path, in string, data interface{}, enum interface{}) *errors.Validation { return EnumCase(path, in, data, enum, true) } // EnumCase validates if the data is a member of the enum and may respect case-sensitivity for strings func EnumCase(path, in string, data interface{}, enum interface{}, caseSensitive bool) *errors.Validation { val := reflect.ValueOf(enum) if val.Kind() != reflect.Slice { return nil } dataString := convertEnumCaseStringKind(data, caseSensitive) var values []interface{} for i := 0; i < val.Len(); i++ { ele := val.Index(i) enumValue := ele.Interface() if data != nil { if reflect.DeepEqual(data, enumValue) { return nil } enumString := convertEnumCaseStringKind(enumValue, caseSensitive) if dataString != nil && enumString != nil && strings.EqualFold(*dataString, *enumString) { return nil } actualType := reflect.TypeOf(enumValue) if actualType == nil { // Safeguard. Frankly, I don't know how we may get a nil continue } expectedValue := reflect.ValueOf(data) if expectedValue.IsValid() && expectedValue.Type().ConvertibleTo(actualType) { // Attempt comparison after type conversion if reflect.DeepEqual(expectedValue.Convert(actualType).Interface(), enumValue) { return nil } } } values = append(values, enumValue) } return errors.EnumFail(path, in, data, values) } // convertEnumCaseStringKind converts interface if it is kind of string and case insensitivity is set func convertEnumCaseStringKind(value interface{}, caseSensitive bool) *string { if caseSensitive { return nil } val := reflect.ValueOf(value) if val.Kind() != reflect.String { return nil } str := fmt.Sprintf("%v", value) return &str } // MinItems validates that there are at least n items in a slice func MinItems(path, in string, size, min int64) *errors.Validation { if size < min { return errors.TooFewItems(path, in, min, size) } return nil } // MaxItems validates that there are at most n items in a slice func MaxItems(path, in string, size, max int64) *errors.Validation { if size > max { return errors.TooManyItems(path, in, max, size) } return nil } // UniqueItems validates that the provided slice has unique elements func UniqueItems(path, in string, data interface{}) *errors.Validation { val := reflect.ValueOf(data) if val.Kind() != reflect.Slice { return nil } var unique []interface{} for i := 0; i < val.Len(); i++ { v := val.Index(i).Interface() for _, u := range unique { if reflect.DeepEqual(v, u) { return errors.DuplicateItems(path, in) } } unique = append(unique, v) } return nil } // MinLength validates a string for minimum length func MinLength(path, in, data string, minLength int64) *errors.Validation { strLen := int64(utf8.RuneCountInString(data)) if strLen < minLength { return errors.TooShort(path, in, minLength, data) } return nil } // MaxLength validates a string for maximum length func MaxLength(path, in, data string, maxLength int64) *errors.Validation { strLen := int64(utf8.RuneCountInString(data)) if strLen > maxLength { return errors.TooLong(path, in, maxLength, data) } return nil } // ReadOnly validates an interface for readonly func ReadOnly(ctx context.Context, path, in string, data interface{}) *errors.Validation { // read only is only validated when operationType is request if op := extractOperationType(ctx); op != request { return nil } // data must be of zero value of its type val := reflect.ValueOf(data) if val.IsValid() { if reflect.DeepEqual(reflect.Zero(val.Type()).Interface(), val.Interface()) { return nil } } else { return nil } return errors.ReadOnly(path, in, data) } // Required validates an interface for requiredness func Required(path, in string, data interface{}) *errors.Validation { val := reflect.ValueOf(data) if val.IsValid() { if reflect.DeepEqual(reflect.Zero(val.Type()).Interface(), val.Interface()) { return errors.Required(path, in, data) } return nil } return errors.Required(path, in, data) } // RequiredString validates a string for requiredness func RequiredString(path, in, data string) *errors.Validation { if data == "" { return errors.Required(path, in, data) } return nil } // RequiredNumber validates a number for requiredness func RequiredNumber(path, in string, data float64) *errors.Validation { if data == 0 { return errors.Required(path, in, data) } return nil } // Pattern validates a string against a regular expression func Pattern(path, in, data, pattern string) *errors.Validation { re, err := compileRegexp(pattern) if err != nil { return errors.FailedPattern(path, in, fmt.Sprintf("%s, but pattern is invalid: %s", pattern, err.Error()), data) } if !re.MatchString(data) { return errors.FailedPattern(path, in, pattern, data) } return nil } // MaximumInt validates if a number is smaller than a given maximum func MaximumInt(path, in string, data, max int64, exclusive bool) *errors.Validation { if (!exclusive && data > max) || (exclusive && data >= max) { return errors.ExceedsMaximumInt(path, in, max, exclusive, data) } return nil } // MaximumUint validates if a number is smaller than a given maximum func MaximumUint(path, in string, data, max uint64, exclusive bool) *errors.Validation { if (!exclusive && data > max) || (exclusive && data >= max) { return errors.ExceedsMaximumUint(path, in, max, exclusive, data) } return nil } // Maximum validates if a number is smaller than a given maximum func Maximum(path, in string, data, max float64, exclusive bool) *errors.Validation { if (!exclusive && data > max) || (exclusive && data >= max) { return errors.ExceedsMaximum(path, in, max, exclusive, data) } return nil } // Minimum validates if a number is smaller than a given minimum func Minimum(path, in string, data, min float64, exclusive bool) *errors.Validation { if (!exclusive && data < min) || (exclusive && data <= min) { return errors.ExceedsMinimum(path, in, min, exclusive, data) } return nil } // MinimumInt validates if a number is smaller than a given minimum func MinimumInt(path, in string, data, min int64, exclusive bool) *errors.Validation { if (!exclusive && data < min) || (exclusive && data <= min) { return errors.ExceedsMinimumInt(path, in, min, exclusive, data) } return nil } // MinimumUint validates if a number is smaller than a given minimum func MinimumUint(path, in string, data, min uint64, exclusive bool) *errors.Validation { if (!exclusive && data < min) || (exclusive && data <= min) { return errors.ExceedsMinimumUint(path, in, min, exclusive, data) } return nil } // MultipleOf validates if the provided number is a multiple of the factor func MultipleOf(path, in string, data, factor float64) *errors.Validation { // multipleOf factor must be positive if factor <= 0 { return errors.MultipleOfMustBePositive(path, in, factor) } var mult float64 if factor < 1 { mult = 1 / factor * data } else { mult = data / factor } if !swag.IsFloat64AJSONInteger(mult) { return errors.NotMultipleOf(path, in, factor, data) } return nil } // MultipleOfInt validates if the provided integer is a multiple of the factor func MultipleOfInt(path, in string, data int64, factor int64) *errors.Validation { // multipleOf factor must be positive if factor <= 0 { return errors.MultipleOfMustBePositive(path, in, factor) } mult := data / factor if mult*factor != data { return errors.NotMultipleOf(path, in, factor, data) } return nil } // MultipleOfUint validates if the provided unsigned integer is a multiple of the factor func MultipleOfUint(path, in string, data, factor uint64) *errors.Validation { // multipleOf factor must be positive if factor == 0 { return errors.MultipleOfMustBePositive(path, in, factor) } mult := data / factor if mult*factor != data { return errors.NotMultipleOf(path, in, factor, data) } return nil } // FormatOf validates if a string matches a format in the format registry func FormatOf(path, in, format, data string, registry strfmt.Registry) *errors.Validation { if registry == nil { registry = strfmt.Default } if ok := registry.ContainsName(format); !ok { return errors.InvalidTypeName(format) } if ok := registry.Validates(format, data); !ok { return errors.InvalidType(path, in, format, data) } return nil } // MaximumNativeType provides native type constraint validation as a facade // to various numeric types versions of Maximum constraint check. // // Assumes that any possible loss conversion during conversion has been // checked beforehand. // // NOTE: currently, the max value is marshalled as a float64, no matter what, // which means there may be a loss during conversions (e.g. for very large integers) // // TODO: Normally, a JSON MAX_SAFE_INTEGER check would ensure conversion remains loss-free func MaximumNativeType(path, in string, val interface{}, max float64, exclusive bool) *errors.Validation { kind := reflect.ValueOf(val).Type().Kind() switch kind { //nolint:exhaustive case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: value := valueHelp.asInt64(val) return MaximumInt(path, in, value, int64(max), exclusive) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: value := valueHelp.asUint64(val) if max < 0 { return errors.ExceedsMaximum(path, in, max, exclusive, val) } return MaximumUint(path, in, value, uint64(max), exclusive) case reflect.Float32, reflect.Float64: fallthrough default: value := valueHelp.asFloat64(val) return Maximum(path, in, value, max, exclusive) } } // MinimumNativeType provides native type constraint validation as a facade // to various numeric types versions of Minimum constraint check. // // Assumes that any possible loss conversion during conversion has been // checked beforehand. // // NOTE: currently, the min value is marshalled as a float64, no matter what, // which means there may be a loss during conversions (e.g. for very large integers) // // TODO: Normally, a JSON MAX_SAFE_INTEGER check would ensure conversion remains loss-free func MinimumNativeType(path, in string, val interface{}, min float64, exclusive bool) *errors.Validation { kind := reflect.ValueOf(val).Type().Kind() switch kind { //nolint:exhaustive case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: value := valueHelp.asInt64(val) return MinimumInt(path, in, value, int64(min), exclusive) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: value := valueHelp.asUint64(val) if min < 0 { return nil } return MinimumUint(path, in, value, uint64(min), exclusive) case reflect.Float32, reflect.Float64: fallthrough default: value := valueHelp.asFloat64(val) return Minimum(path, in, value, min, exclusive) } } // MultipleOfNativeType provides native type constraint validation as a facade // to various numeric types version of MultipleOf constraint check. // // Assumes that any possible loss conversion during conversion has been // checked beforehand. // // NOTE: currently, the multipleOf factor is marshalled as a float64, no matter what, // which means there may be a loss during conversions (e.g. for very large integers) // // TODO: Normally, a JSON MAX_SAFE_INTEGER check would ensure conversion remains loss-free func MultipleOfNativeType(path, in string, val interface{}, multipleOf float64) *errors.Validation { kind := reflect.ValueOf(val).Type().Kind() switch kind { //nolint:exhaustive case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: value := valueHelp.asInt64(val) return MultipleOfInt(path, in, value, int64(multipleOf)) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: value := valueHelp.asUint64(val) return MultipleOfUint(path, in, value, uint64(multipleOf)) case reflect.Float32, reflect.Float64: fallthrough default: value := valueHelp.asFloat64(val) return MultipleOf(path, in, value, multipleOf) } } // IsValueValidAgainstRange checks that a numeric value is compatible with // the range defined by Type and Format, that is, may be converted without loss. // // NOTE: this check is about type capacity and not formal verification such as: 1.0 != 1L func IsValueValidAgainstRange(val interface{}, typeName, format, prefix, path string) error { kind := reflect.ValueOf(val).Type().Kind() // What is the string representation of val var stringRep string switch kind { //nolint:exhaustive case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: stringRep = swag.FormatUint64(valueHelp.asUint64(val)) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: stringRep = swag.FormatInt64(valueHelp.asInt64(val)) case reflect.Float32, reflect.Float64: stringRep = swag.FormatFloat64(valueHelp.asFloat64(val)) default: return fmt.Errorf("%s value number range checking called with invalid (non numeric) val type in %s", prefix, path) } var errVal error switch typeName { case integerType: switch format { case integerFormatInt32: _, errVal = swag.ConvertInt32(stringRep) case integerFormatUInt32: _, errVal = swag.ConvertUint32(stringRep) case integerFormatUInt64: _, errVal = swag.ConvertUint64(stringRep) case integerFormatInt64: fallthrough default: _, errVal = swag.ConvertInt64(stringRep) } case numberType: fallthrough default: switch format { case numberFormatFloat, numberFormatFloat32: _, errVal = swag.ConvertFloat32(stringRep) case numberFormatDouble, numberFormatFloat64: fallthrough default: // No check can be performed here since // no number beyond float64 is supported } } if errVal != nil { // We don't report the actual errVal from strconv if format != "" { errVal = fmt.Errorf("%s value must be of type %s with format %s in %s", prefix, typeName, format, path) } else { errVal = fmt.Errorf("%s value must be of type %s (default format) in %s", prefix, typeName, path) } } return errVal } validate-0.24.0/values_test.go000066400000000000000000000335531457312750000162700ustar00rootroot00000000000000// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package validate import ( "context" "math" "testing" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestValues_ValidateIntEnum(t *testing.T) { enumValues := []interface{}{1, 2, 3} require.Error(t, Enum("test", "body", int64(5), enumValues)) require.Nil(t, Enum("test", "body", int64(1), enumValues)) } func TestValues_ValidateEnum(t *testing.T) { enumValues := []string{"aa", "bb", "cc"} require.Error(t, Enum("test", "body", "a", enumValues)) require.Nil(t, Enum("test", "body", "bb", enumValues)) type CustomString string require.Error(t, Enum("test", "body", CustomString("a"), enumValues)) require.Nil(t, Enum("test", "body", CustomString("bb"), enumValues)) } func TestValues_ValidateNilEnum(t *testing.T) { enumValues := []string{"aa", "bb", "cc"} require.Error(t, Enum("test", "body", nil, enumValues)) } // Check edge cases in Enum func TestValues_Enum_EdgeCases(t *testing.T) { enumValues := "aa, bb, cc" // No validation occurs: enumValues is not a slice require.Nil(t, Enum("test", "body", int64(1), enumValues)) // TODO(TEST): edge case: value is not a concrete type // It's really a go internals challenge // to figure a test case to demonstrate // this case must be checked (!!) } func TestValues_ValidateEnumCaseInsensitive(t *testing.T) { enumValues := []string{"aa", "bb", "cc"} require.Error(t, EnumCase("test", "body", "a", enumValues, true)) require.Nil(t, EnumCase("test", "body", "bb", enumValues, true)) require.Error(t, EnumCase("test", "body", "BB", enumValues, true)) require.Error(t, EnumCase("test", "body", "a", enumValues, false)) require.Nil(t, EnumCase("test", "body", "bb", enumValues, false)) require.Nil(t, EnumCase("test", "body", "BB", enumValues, false)) require.Error(t, EnumCase("test", "body", int64(1), enumValues, false)) } func TestValues_ValidateUniqueItems(t *testing.T) { itemsNonUnique := []interface{}{ []int32{1, 2, 3, 4, 4, 5}, []string{"aa", "bb", "cc", "cc", "dd"}, } for _, v := range itemsNonUnique { require.Error(t, UniqueItems("test", "body", v)) } itemsUnique := []interface{}{ []int32{1, 2, 3}, "I'm a string", map[string]int{ "aaa": 1111, "b": 2, "ccc": 333, }, nil, } for _, v := range itemsUnique { require.Nil(t, UniqueItems("test", "body", v)) } } func TestValues_ValidateMinLength(t *testing.T) { const minLength = int64(5) require.Error(t, MinLength("test", "body", "aa", minLength)) require.Nil(t, MinLength("test", "body", "aaaaa", minLength)) } func TestValues_ValidateMaxLength(t *testing.T) { const maxLength = int64(5) require.Error(t, MaxLength("test", "body", "bbbbbb", maxLength)) require.Nil(t, MaxLength("test", "body", "aa", maxLength)) } func TestValues_ReadOnly(t *testing.T) { const ( path = "test" in = "body" ) ReadOnlySuccess := []interface{}{ "", 0, nil, } // fail only when operation type is request ReadOnlyFail := []interface{}{ " ", "bla-bla-bla", 2, []interface{}{21, []int{}, "testString"}, } t.Run("No operation context", func(t *testing.T) { // readonly should not have any effect ctx := context.Background() for _, v := range ReadOnlySuccess { require.Nil(t, ReadOnly(ctx, path, in, v)) } for _, v := range ReadOnlyFail { require.Nil(t, ReadOnly(ctx, path, in, v)) } }) t.Run("operationType request", func(t *testing.T) { ctx := WithOperationRequest(context.Background()) for _, v := range ReadOnlySuccess { require.Nil(t, ReadOnly(ctx, path, in, v)) } for _, v := range ReadOnlyFail { require.Error(t, ReadOnly(ctx, path, in, v)) } }) t.Run("operationType response", func(t *testing.T) { ctx := WithOperationResponse(context.Background()) for _, v := range ReadOnlySuccess { require.Nil(t, ReadOnly(ctx, path, in, v)) } for _, v := range ReadOnlyFail { require.Nil(t, ReadOnly(ctx, path, in, v)) } }) } func TestValues_ValidateRequired(t *testing.T) { const ( path = "test" in = "body" ) RequiredFail := []interface{}{ "", 0, nil, } for _, v := range RequiredFail { require.Error(t, Required(path, in, v)) } RequiredSuccess := []interface{}{ " ", "bla-bla-bla", 2, []interface{}{21, []int{}, "testString"}, } for _, v := range RequiredSuccess { require.Nil(t, Required(path, in, v)) } } func TestValues_ValidateRequiredNumber(t *testing.T) { require.Error(t, RequiredNumber("test", "body", 0)) require.Nil(t, RequiredNumber("test", "body", 1)) } func TestValuMultipleOf(t *testing.T) { // positive require.Nil(t, MultipleOf("test", "body", 9, 3)) require.Nil(t, MultipleOf("test", "body", 9.3, 3.1)) require.Nil(t, MultipleOf("test", "body", 9.1, 0.1)) require.Nil(t, MultipleOf("test", "body", 3, 0.3)) require.Nil(t, MultipleOf("test", "body", 6, 0.3)) require.Nil(t, MultipleOf("test", "body", 1, 0.25)) require.Nil(t, MultipleOf("test", "body", 8, 0.2)) // zero require.Error(t, MultipleOf("test", "body", 9, 0)) require.Error(t, MultipleOf("test", "body", 9.1, 0)) // negative require.Error(t, MultipleOf("test", "body", 3, 0.4)) require.Error(t, MultipleOf("test", "body", 9.1, 0.2)) require.Error(t, MultipleOf("test", "body", 9.34, 0.1)) // error on negative factor require.Error(t, MultipleOf("test", "body", 9.34, -0.1)) } // Test edge case for Pattern (in regular spec, no invalid regexp should reach there) func TestValues_Pattern_Edgecases(t *testing.T) { require.Nil(t, Pattern("path", "in", "pick-a-boo", `.*-[a-z]-.*`)) t.Run("with invalid regexp", func(t *testing.T) { err := Pattern("path", "in", "pick-a-boo", `.*-[a(-z]-^).*`) require.Error(t, err) assert.Equal(t, int(err.Code()), int(errors.PatternFailCode)) assert.Contains(t, err.Error(), "pattern is invalid") }) t.Run("with valid regexp, invalid pattern", func(t *testing.T) { err := Pattern("path", "in", "pick-8-boo", `.*-[a-z]-.*`) require.Error(t, err) assert.Equal(t, int(err.Code()), int(errors.PatternFailCode)) assert.NotContains(t, err.Error(), "pattern is invalid") assert.Contains(t, err.Error(), "should match") }) } // Test edge cases in FormatOf // not easily tested with full specs func TestValues_FormatOf_EdgeCases(t *testing.T) { var err *errors.Validation err = FormatOf("path", "in", "bugz", "", nil) require.Error(t, err) assert.Equal(t, int(err.Code()), int(errors.InvalidTypeCode)) assert.Contains(t, err.Error(), "bugz is an invalid type name") err = FormatOf("path", "in", "bugz", "", strfmt.Default) require.Error(t, err) assert.Equal(t, int(err.Code()), int(errors.InvalidTypeCode)) assert.Contains(t, err.Error(), "bugz is an invalid type name") } // Test edge cases in MaximumNativeType // not easily exercised with full specs func TestValues_MaximumNative(t *testing.T) { require.Nil(t, MaximumNativeType("path", "in", int(5), 10, false)) require.Nil(t, MaximumNativeType("path", "in", uint(5), 10, true)) require.Nil(t, MaximumNativeType("path", "in", int8(5), 10, true)) require.Nil(t, MaximumNativeType("path", "in", uint8(5), 10, true)) require.Nil(t, MaximumNativeType("path", "in", int16(5), 10, true)) require.Nil(t, MaximumNativeType("path", "in", uint16(5), 10, true)) require.Nil(t, MaximumNativeType("path", "in", int32(5), 10, true)) require.Nil(t, MaximumNativeType("path", "in", uint32(5), 10, true)) require.Nil(t, MaximumNativeType("path", "in", int64(5), 10, true)) require.Nil(t, MaximumNativeType("path", "in", uint64(5), 10, true)) require.Nil(t, MaximumNativeType("path", "in", float32(5.5), 10, true)) require.Nil(t, MaximumNativeType("path", "in", float64(5.5), 10, true)) var err *errors.Validation err = MaximumNativeType("path", "in", int32(10), 10, true) require.Error(t, err) code := int(err.Code()) assert.Equal(t, errors.MaxFailCode, code) err = MaximumNativeType("path", "in", uint(10), 10, true) require.Error(t, err) code = int(err.Code()) assert.Equal(t, errors.MaxFailCode, code) err = MaximumNativeType("path", "in", int64(12), 10, false) require.Error(t, err) code = int(err.Code()) assert.Equal(t, errors.MaxFailCode, code) err = MaximumNativeType("path", "in", float32(12.6), 10, false) require.Error(t, err) code = int(err.Code()) assert.Equal(t, int(errors.MaxFailCode), code) err = MaximumNativeType("path", "in", float64(12.6), 10, false) require.Error(t, err) code = int(err.Code()) assert.Equal(t, int(errors.MaxFailCode), code) err = MaximumNativeType("path", "in", uint(5), -10, true) require.Error(t, err) code = int(err.Code()) assert.Equal(t, int(errors.MaxFailCode), code) } // Test edge cases in MinimumNativeType // not easily exercised with full specs func TestValues_MinimumNative(t *testing.T) { require.Nil(t, MinimumNativeType("path", "in", int(5), 0, false)) require.Nil(t, MinimumNativeType("path", "in", uint(5), 0, true)) require.Nil(t, MinimumNativeType("path", "in", int8(5), 0, true)) require.Nil(t, MinimumNativeType("path", "in", uint8(5), 0, true)) require.Nil(t, MinimumNativeType("path", "in", int16(5), 0, true)) require.Nil(t, MinimumNativeType("path", "in", uint16(5), 0, true)) require.Nil(t, MinimumNativeType("path", "in", int32(5), 0, true)) require.Nil(t, MinimumNativeType("path", "in", uint32(5), 0, true)) require.Nil(t, MinimumNativeType("path", "in", int64(5), 0, true)) require.Nil(t, MinimumNativeType("path", "in", uint64(5), 0, true)) require.Nil(t, MinimumNativeType("path", "in", float32(5.5), 0, true)) require.Nil(t, MinimumNativeType("path", "in", float64(5.5), 0, true)) var err *errors.Validation err = MinimumNativeType("path", "in", uint(10), 10, true) require.Error(t, err) code := int(err.Code()) assert.Equal(t, int(errors.MinFailCode), code) err = MinimumNativeType("path", "in", uint(10), 10, true) require.Error(t, err) code = int(err.Code()) assert.Equal(t, int(errors.MinFailCode), code) err = MinimumNativeType("path", "in", int64(8), 10, false) require.Error(t, err) code = int(err.Code()) assert.Equal(t, int(errors.MinFailCode), code) err = MinimumNativeType("path", "in", float32(12.6), 20, false) require.Error(t, err) code = int(err.Code()) assert.Equal(t, int(errors.MinFailCode), code) err = MinimumNativeType("path", "in", float64(12.6), 20, false) require.Error(t, err) code = int(err.Code()) assert.Equal(t, int(errors.MinFailCode), code) require.Nil(t, MinimumNativeType("path", "in", uint(5), -10, true)) } // Test edge cases in MaximumNativeType // not easily exercised with full specs func TestValues_MultipleOfNative(t *testing.T) { require.Nil(t, MultipleOfNativeType("path", "in", int(5), 1)) require.Nil(t, MultipleOfNativeType("path", "in", uint(5), 1)) require.Nil(t, MultipleOfNativeType("path", "in", int8(5), 1)) require.Nil(t, MultipleOfNativeType("path", "in", uint8(5), 1)) require.Nil(t, MultipleOfNativeType("path", "in", int16(5), 1)) require.Nil(t, MultipleOfNativeType("path", "in", uint16(5), 1)) require.Nil(t, MultipleOfNativeType("path", "in", int32(5), 1)) require.Nil(t, MultipleOfNativeType("path", "in", uint32(5), 1)) require.Nil(t, MultipleOfNativeType("path", "in", int64(5), 1)) require.Nil(t, MultipleOfNativeType("path", "in", uint64(5), 1)) var err *errors.Validation err = MultipleOfNativeType("path", "in", int64(5), 0) require.Error(t, err) code := int(err.Code()) assert.Equal(t, int(errors.MultipleOfMustBePositiveCode), code) err = MultipleOfNativeType("path", "in", uint64(5), 0) require.Error(t, err) code = int(err.Code()) assert.Equal(t, int(errors.MultipleOfMustBePositiveCode), code) err = MultipleOfNativeType("path", "in", int64(5), -1) require.Error(t, err) code = int(err.Code()) assert.Equal(t, int(errors.MultipleOfMustBePositiveCode), code) err = MultipleOfNativeType("path", "in", int64(11), 5) require.Error(t, err) code = int(err.Code()) assert.Equal(t, int(errors.MultipleOfFailCode), code) err = MultipleOfNativeType("path", "in", uint64(11), 5) require.Error(t, err) code = int(err.Code()) assert.Equal(t, int(errors.MultipleOfFailCode), code) } // Test edge cases in IsValueValidAgainstRange // not easily exercised with full specs: we did not simulate these formats in full specs func TestValues_IsValueValidAgainstRange(t *testing.T) { require.NoError(t, IsValueValidAgainstRange(float32(123.45), "number", "float32", "prefix", "path")) require.NoError(t, IsValueValidAgainstRange(float64(123.45), "number", "float32", "prefix", "path")) require.NoError(t, IsValueValidAgainstRange(int64(123), "number", "float", "prefix", "path")) require.NoError(t, IsValueValidAgainstRange(int64(123), "integer", "", "prefix", "path")) require.NoError(t, IsValueValidAgainstRange(int64(123), "integer", "int64", "prefix", "path")) require.NoError(t, IsValueValidAgainstRange(int64(123), "integer", "uint64", "prefix", "path")) require.NoError(t, IsValueValidAgainstRange(int64(2147483647), "integer", "int32", "prefix", "path")) require.NoError(t, IsValueValidAgainstRange(int64(2147483647), "integer", "uint32", "prefix", "path")) var err error // Error case (do not occur in normal course of a validation) err = IsValueValidAgainstRange(float64(math.MaxFloat64), "integer", "", "prefix", "path") require.Error(t, err) assert.Contains(t, err.Error(), "must be of type integer (default format)") // Checking a few limits err = IsValueValidAgainstRange("123", "number", "", "prefix", "path") require.Error(t, err) assert.Contains(t, err.Error(), "called with invalid (non numeric) val type") }