diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..590c5c2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,149 @@ +name: ci-build + +# Run this workflow every time a new commit pushed to your repository +on: + push: + branches: + - master + - stable/1.0.x + tags: + - '*' + pull_request: + workflow_dispatch: + +env: + IMAGE_NAME: vngr/gemma-brc + DJANGO_SETTINGS_MODULE: brc.conf.jenkins + SECRET_KEY: dummy + DB_USER: postgres + DB_PASSWORD: '' + DEPLOYMENT: brc + +jobs: + tests: + runs-on: ubuntu-latest + strategy: + matrix: + postgres: ['10', '11', '12'] + + name: Tests (PG ${{ matrix.postgres }}) + + services: + postgres: + image: postgres:${{ matrix.postgres }} + env: + POSTGRES_HOST_AUTH_METHOD: trust + ports: + - 5432:5432 + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.6' + - uses: actions/setup-node@v2-beta + with: + node-version: '12' + + # - name: Install system packages + # run: sudo apt-get install libgdal-dev gdal-bin + + - name: Install dependencies + run: pip install -r requirements/jenkins.txt codecov + + - name: Build frontend + run: | + npm ci + npm run build + - name: Run tests + run: | + python src/manage.py collectstatic --noinput --link + coverage run src/manage.py test src + + - name: Publish coverage report + uses: codecov/codecov-action@v1 + + docker: + runs-on: ubuntu-latest + name: Docker image build + + steps: + - uses: actions/checkout@v2 + - name: Determine tag/commit hash + id: vars + run: | + # Strip git ref prefix from version + VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') + # Strip "v" prefix from tag name (if present at all) + [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') + # Use Docker `latest` tag convention + [ "$VERSION" == "master" ] && VERSION=latest + echo ::set-output name=tag::${VERSION} + echo ::set-output name=git_hash::${GITHUB_SHA} + - name: Build the Docker image + run: | + docker build . \ + --build-arg COMMIT_HASH=${{ steps.vars.outputs.git_hash }} + # - run: docker image save -o image.tar $IMAGE_NAME:${{ steps.vars.outputs.tag }} + # - name: Store image artifact + # uses: actions/upload-artifact@v2 + # with: + # name: docker-image + # path: image.tar + # retention-days: 1 + + publish: + needs: + - tests + - docker + + name: Push Docker image + runs-on: ubuntu-latest + if: github.event_name == 'push' # exclude PRs/forks + + steps: + - uses: actions/checkout@v2 + # - name: Download built image + # uses: actions/download-artifact@v2 + # with: + # name: docker-image + - name: Publish latest image + env: # Or as an environment variable + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} + DEPLOY_BOT_TOKEN: ${{ secrets.DEPLOY_BOT_TOKEN }} + run: | + BRANCH=$(git rev-parse --abbrev-ref HEAD) + if [ "$BRANCH" == "master" ]; then + bash bin/cicd.sh latest no + fi + + - name: Publish tagged image + env: # Or as an environment variable + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} + DEPLOY_BOT_TOKEN: ${{ secrets.DEPLOY_BOT_TOKEN }} + run: | + TAG=$(git name-rev --tags --name-only $(git rev-parse HEAD)) + if [ "$TAG" != "undefined" ]; then + bash bin/cicd.sh $TAG yes + fi + + # - name: Determine tag/commit hash + # id: vars + # run: | + # # Strip git ref prefix from version + # VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') + # # Strip "v" prefix from tag name (if present at all) + # [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') + # # Use Docker `latest` tag convention + # [ "$VERSION" == "develop" ] && VERSION=latest + # echo ::set-output name=tag::${VERSION} + # - name: Load image + # run: | + # docker image load -i image.tar + # - name: Log into registry + # run: echo "${{ secrets.DOCKER_TOKEN }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin + + # - name: Push the Docker image + # run: docker push $IMAGE_NAME:${{ steps.vars.outputs.tag }} diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml new file mode 100644 index 0000000..f4bd1f4 --- /dev/null +++ b/.github/workflows/code_quality.yml @@ -0,0 +1,43 @@ +name: Code quality checks + +# Run this workflow every time a new commit pushed to your repository +on: + push: + branches: + - master + - stable/1.0.x + paths: + - '**.py' + pull_request: + paths: + - '**.py' + workflow_dispatch: + +jobs: + isort: + name: Code imports + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.6' + - name: Install dependencies + run: pip install -r requirements/jenkins.txt + - name: Run isort + run: isort --check-only --diff . + + black: + name: Code format + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.6' + - name: Install dependencies + run: pip install -r requirements/jenkins.txt + - name: Run black + run: black --check --diff src docs diff --git a/.github/workflows/generate-postman-collection.yml b/.github/workflows/generate-postman-collection.yml new file mode 100644 index 0000000..3fb5bd6 --- /dev/null +++ b/.github/workflows/generate-postman-collection.yml @@ -0,0 +1,26 @@ +name: generate-postman-collection + +on: + push: + paths: + - "src/openapi.yaml" + - ".github/workflows/generate-postman-collection.yml" + branches: + - '**' + workflow_dispatch: + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: '12' + - name: Install dependencies + run: npm install -g openapi-to-postmanv2 + - name: Create tests folder + run: mkdir -p ./tests/postman + - name: Generate Postman collection + run: openapi2postmanv2 -s ./src/openapi.yaml -o ./tests/postman/collection.json --pretty diff --git a/.github/workflows/generate-sdks.yml b/.github/workflows/generate-sdks.yml new file mode 100644 index 0000000..0ecb939 --- /dev/null +++ b/.github/workflows/generate-sdks.yml @@ -0,0 +1,36 @@ +name: generate-sdks + +on: + push: + paths: + - "src/openapi.yaml" + - ".github/workflows/generate-sdks.yml" + branches: + - '**' + workflow_dispatch: + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: '12' + - name: Install dependencies + run: npm install -g @openapitools/openapi-generator-cli + - name: Validate schema + run: openapi-generator-cli validate -i ./src/openapi.yaml + - name: Generate Java client + run: openapi-generator-cli generate -i ./src/openapi.yaml --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \ + -o ./sdks/java -g java --additional-properties=dateLibrary=java8,java8=true,optionalProjectFile=false,optionalAssemblyInfo=false + - name: Generate .NET Core client + run: openapi-generator-cli generate -i ./src/openapi.yaml --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \ + -o ./sdks/netcore -g csharp-netcore --additional-properties=optionalProjectFile=false,optionalAssemblyInfo=false + - name: Generate .NET Full Framework client + run: openapi-generator-cli generate -i ./src/openapi.yaml --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \ + -o ./sdks/net -g csharp --additional-properties=optionalProjectFile=false,optionalAssemblyInfo=false + - name: Generate Python client + run: openapi-generator-cli generate -i ./src/openapi.yaml --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \ + -o ./sdks/python -g python --additional-properties=optionalProjectFile=false,optionalAssemblyInfo=false+ diff --git a/.github/workflows/lint-oas.yml b/.github/workflows/lint-oas.yml new file mode 100644 index 0000000..2283754 --- /dev/null +++ b/.github/workflows/lint-oas.yml @@ -0,0 +1,24 @@ +name: lint-oas + +on: + push: + paths: + - src/openapi.yaml + - .github/workflows/lint-oas.yml + branches: + - '**' + workflow_dispatch: + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: '12' + - name: Install spectral + run: npm install -g @stoplight/spectral + - name: Run OAS linter + run: spectral lint ./src/openapi.yaml diff --git a/.gitignore b/.gitignore index 83ffac6..4454f25 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,8 @@ local.py .env docs/_build + +# Statics generated by Workflows +/tests/postman +/sdks/ +openapitools.json diff --git a/.spectral.yaml b/.spectral.yaml new file mode 100644 index 0000000..6102bd8 --- /dev/null +++ b/.spectral.yaml @@ -0,0 +1 @@ + extends: spectral:oas diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bfa586d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,55 +0,0 @@ -language: python -cache: pip - -python: - - "3.6" - -services: - - postgresql - -addons: - postgresql: "10" - -env: - global: - - DJANGO_SETTINGS_MODULE=brc.conf.jenkins - - SECRET_KEY=dummy - - DB_USER=postgres - - DB_PASSWORD= - - DEPLOYMENT=brc - matrix: - - TOXENV=django_tests - - TOXENV=isort - - TOXENV=black - -install: - - pip install tox tox-travis - -script: tox - -jobs: - include: - # First stage is 'Tests' by default and populated from env matrix - # expansion - - stage: Docker images - name: Test docker image build - services: - - docker - install: skip - script: - - bash bin/release-docker-image.sh - after_success: echo "deploying..." - deploy: - - provider: script - script: bash bin/cicd.sh latest yes - on: - branch: master - - - provider: script - script: bash bin/cicd.sh $TRAVIS_TAG yes - on: - tags: true - -after_success: - - pip install codecov - - codecov diff --git a/Dockerfile b/Dockerfile index 6d68012..cccc770 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,6 +58,9 @@ COPY ./bin/runtests.sh /runtests.sh COPY --from=frontend-build /app/src/brc/static/fonts /app/src/brc/static/fonts COPY --from=frontend-build /app/src/brc/static/css /app/src/brc/static/css COPY ./src /app/src +ARG COMMIT_HASH +ENV GIT_SHA=${COMMIT_HASH} + RUN mkdir /app/log && rm /app/src/brc/conf/test.py CMD ["/runtests.sh"] @@ -94,6 +97,8 @@ COPY --from=frontend-build /app/src/brc/static/fonts /app/src/brc/static/fonts COPY --from=frontend-build /app/src/brc/static/css /app/src/brc/static/css COPY ./src /app/src COPY ./docs /app/docs +ARG COMMIT_HASH +ENV GIT_SHA=${COMMIT_HASH} ENV DJANGO_SETTINGS_MODULE=brc.conf.docker diff --git a/README.rst b/README.rst index c3ea407..bca3b6f 100644 --- a/README.rst +++ b/README.rst @@ -1,65 +1,117 @@ -============================ -besluitregistratiecomponent -============================ +============= +Besluiten API +============= :Version: 1.0.1 -:Source: https://github.com/VNG-Realisatie/gemma-besluitregistratiecomponent +:Source: https://github.com/VNG-Realisatie/besluiten-api :Keywords: zaken, zaakgericht werken, GEMMA, RGBZ, BRC -:PythonVersion: 3.6 -|build-status| |black| +Introductie +=========== + +De API ondersteunt het opslaan en het naar andere applicaties ontsluiten van +gegevens over alle gemeentelijke besluiten, van elk type. Voorlopig dient deze +API vooral voor besluiten binnen zaakgericht werken maar in de toekomst kan de +Besluiten API ook voor andere domeinen worden ingezet. + +API specificaties +================= + +|lint-oas| |generate-sdks| |generate-postman-collection| + +========== ============== ==================================================================================================================================================================================================== ======================================================================================================================= ================================================================================================================================= +Versie Release datum API specificatie Autorisaties Notificaties +========== ============== ==================================================================================================================================================================================================== ======================================================================================================================= ================================================================================================================================= +1.0.x n.v.t. `ReDoc `_, `Scopes `_ `Berichtkenmerken `_ + `Swagger `_ + (`verschillen `_) +1.0.1 2019-12-16 `ReDoc `_, `Scopes `_ `Berichtkenmerken `_ + `Swagger `_ + (`verschillen `_) +1.0.0 2019-11-18 `ReDoc `_, `Scopes `_ `Berichtkenmerken `_ + `Swagger `_ +========== ============== ==================================================================================================================================================================================================== ======================================================================================================================= ================================================================================================================================= + +Zie ook: `Alle versies en wijzigingen `_ + +Ondersteuning +------------- + +========== ============== ========================== ================= +Versie Release datum Einddatum ondersteuning Documentatie +========== ============== ========================== ================= +1.x 2019-11-18 (nog niet bekend) `Documentatie `_ +========== ============== ========================== ================= + +Referentie implementatie +======================== -Referentieimplementatie van de besluitregistratiecomponent (BRC). +|build-status| |coverage| |docker| |black| |python-versions| -Introduction -============ +Referentieimplementatie van de Besluiten API. Ook wel +Besluitregistratiecomponent (BRC) genoemd) -Binnen het Nederlandse gemeentelandschap wordt zaakgericht werken nagestreefd. -Om dit mogelijk te maken is er gegevensuitwisseling nodig. Er is een behoefte -om informatieobjecten (documenten) te relateren aan zaken. +Ontwikkeld door `Maykin Media B.V. `_ in opdracht +van VNG Realisatie. Deze referentieimplementatie toont aan dat de API specificatie voor de -besluitregistratiecomponent (hierna BRC) implementeerbaar is, en vormt een -voorbeeld voor andere implementaties indien ergens twijfel bestaat. +Besluiten API implementeerbaar is, en vormt een voorbeeld voor andere +implementaties indien ergens twijfel bestaat. -Deze component heeft ook een `testomgeving`_ waar leveranciers tegenaan kunnen +Deze component heeft ook een `demo omgeving`_ waar leveranciers tegenaan kunnen testen. -Documentation -============= +Links +===== -See ``docs/contents/installation`` for installation instructions, available settings and -commands. +* Deze API is onderdeel van de `VNG standaard "API's voor Zaakgericht werken" `_. +* Lees de `functionele specificatie `_ bij de API specificatie. +* Bekijk de `demo omgeving`_ met de laatst gepubliceerde versie. +* Bekijk de `test omgeving `_ met de laatste ontwikkel versie. +* Rapporteer `issues `_ bij vragen, fouten of wensen. +* Bekijk de `code `_ van de referentie implementatie. -If you intend to develop on the component, we recommend the ``development.rst`` -document, otherwise ``docker.rst`` is recommended. +.. _`demo omgeving`: https://besluiten-api.vng.cloud/ +Licentie +======== -References -========== +Copyright © VNG Realisatie 2018 - 2020 -* `Issues `_ -* `Code `_ +Licensed under the EUPL_ +.. _EUPL: LICENCE.md -.. |build-status| image:: https://travis-ci.org/VNG-Realisatie/gemma-besluitregistratiecomponent.svg?branch=develop +.. |build-status| image:: https://github.com/VNG-Realisatie/besluiten-api/workflows/ci-build/badge.svg :alt: Build status - :target: https://travis-ci.org/VNG-Realisatie/gemma-besluitregistratiecomponent + :target: https://github.com/VNG-Realisatie/besluiten-api/actions?query=workflow%3Aci-build -.. |requirements| image:: https://requires.io/github/VNG-Realisatie/gemma-besluitregistratiecomponent/requirements.svg?branch=master - :target: https://requires.io/github/VNG-Realisatie/gemma-besluitregistratiecomponent/requirements/?branch=master +.. |requirements| image:: https://requires.io/github/VNG-Realisatie/besluiten-api/requirements.svg?branch=master :alt: Requirements status +.. |coverage| image:: https://codecov.io/github/VNG-Realisatie/besluiten-api/branch/master/graphs/badge.svg?branch=master + :alt: Coverage + :target: https://codecov.io/gh/VNG-Realisatie/besluiten-api + +.. |docker| image:: https://img.shields.io/badge/docker-latest-blue.svg + :alt: Docker image + :target: https://hub.docker.com/r/vngr/gemma-brc/ + .. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg + :alt: Code style :target: https://github.com/psf/black -.. _testomgeving: https://ref.tst.vng.cloud/brc/ +.. |python-versions| image:: https://img.shields.io/badge/python-3.6%2B-blue.svg + :alt: Supported Python version -Licentie -======== +.. |lint-oas| image:: https://github.com/VNG-Realisatie/besluiten-api/workflows/lint-oas/badge.svg + :alt: Lint OAS + :target: https://github.com/VNG-Realisatie/besluiten-api/actions?query=workflow%3Alint-oas -Copyright © VNG Realisatie 2018 - -Licensed under the EUPL_ +.. |generate-sdks| image:: https://github.com/VNG-Realisatie/besluiten-api/workflows/generate-sdks/badge.svg + :alt: Generate SDKs + :target: https://github.com/VNG-Realisatie/besluiten-api/actions?query=workflow%3Agenerate-sdks -.. _EUPL: LICENSE.md +.. |generate-postman-collection| image:: https://github.com/VNG-Realisatie/besluiten-api/workflows/generate-postman-collection/badge.svg + :alt: Generate Postman collection + :target: https://github.com/VNG-Realisatie/besluiten-api/actions?query=workflow%3Agenerate-postman-collection diff --git a/bin/cicd.sh b/bin/cicd.sh index 24852fb..b3eaafc 100644 --- a/bin/cicd.sh +++ b/bin/cicd.sh @@ -2,13 +2,13 @@ set -u -echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin +echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin release_tag=$1 do_deploy=$2 shift -JOB_NAME=push ./bin/release-docker-image.sh $release_tag +JOB_NAME=push ./bin/docker_push.sh $release_tag deploy() { diff --git a/bin/docker_push.sh b/bin/docker_push.sh new file mode 100755 index 0000000..148e626 --- /dev/null +++ b/bin/docker_push.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# Build and push the docker image to Docker Hub. +# +# Usage: ./bin/docker_push.sh [image_tag] +# + +# error on unset variables, exit on error +set -eu +set +x + +git_hash=${TRAVIS_COMMIT:-`git rev-parse HEAD`} + +# Login to Docker Hub +echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin + +# Echo script commands +set -x + +REPO=vngr/gemma-brc +TAG=${1:-latest} + +# Build the image +docker build \ + -t $REPO:$TAG \ + --build-arg COMMIT_HASH=$git_hash \ + --build-arg RELEASE=$TAG \ + . + +# Push the image +docker push $REPO:$TAG diff --git a/bin/docker_start.sh b/bin/docker_start.sh index c70912b..c7f7c59 100755 --- a/bin/docker_start.sh +++ b/bin/docker_start.sh @@ -39,6 +39,7 @@ fi >&2 echo "Starting server" uwsgi \ --http :$uwsgi_port \ + --http-keepalive \ --module brc.wsgi \ --static-map /static=/app/static \ --static-map /media=/app/media \ diff --git a/bin/release-docker-image.sh b/bin/release-docker-image.sh deleted file mode 100755 index 5306645..0000000 --- a/bin/release-docker-image.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -set -e # exit on error -set -x # echo commands - -CONTAINER_REPO=vngr/gemma-brc - -git_tag=$(git tag --points-at HEAD) &>/dev/null -git_branch=$(git rev-parse --abbrev-ref HEAD) - - -build_image() { - tag=$1 - docker build \ - --target production \ - -t ${CONTAINER_REPO}:$tag \ - -f Dockerfile . -} - -get_release_tag() { - if [[ -n "$git_tag" ]]; then - release_tag=$git_tag - elif [[ $git_branch -eq "develop" ]]; then - release_tag=develop - else - release_tag=${RELEASE_TAG:-latest} - fi - echo $release_tag -} - -push_image() { - # JOB_NAME is set by Jenkins - # only push the image if running in CI - release_tag=$1 - if [[ -n "$JOB_NAME" ]]; then - docker push ${CONTAINER_REPO}:$release_tag - - # if this is a tag, and this is master -> push latest as well - if [[ -n "$git_tag" && $git_branch -eq "master" ]]; then - build_image latest - docker push ${CONTAINER_REPO}:latest - fi - - write_deploy_params - else - echo "Not pushing image, set the JOB_NAME envvar to push after building" - fi -} - -write_deploy_params() { - # if on jenkins AND it's a tagged release -> prepare deployment - if [[ -n "$JENKINS_URL" && -n "$git_tag" ]]; then - echo " -VERSION=${git_tag} -" > deployment-parameters - fi -} - - -if [[ -n "$git_tag" ]]; then - echo "Building image for git tag $git_tag" -fi - -release_tag=$(get_release_tag) -build_image $release_tag -push_image $release_tag diff --git a/docs/Makefile b/docs/Makefile index e973edc..169839d 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -4,7 +4,7 @@ # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build -SPHINXPROJ = BesluitRegistratieComponent +SPHINXPROJ = Besluiten API SOURCEDIR = . BUILDDIR = _build diff --git a/docs/conf.py b/docs/conf.py index 518eb0c..05c739c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,9 +16,9 @@ # full list see the documentation: # http://www.sphinx-doc.org/en/master/config -sys.path.insert(0, os.path.abspath('../src')) +sys.path.insert(0, os.path.abspath("../src")) -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'drc.conf.dev') +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "drc.conf.dev") django.setup() @@ -28,12 +28,12 @@ # -- Project information ----------------------------------------------------- -project = 'BesluitRegistratieComponent' -copyright = '2018, VNG Realisatie' +project = "Besluiten API" +copyright = "2018, VNG Realisatie" author = brc.__author__ # The short X.Y version -version = '.'.join(map(str, brc.VERSION[0:2])) +version = ".".join(map(str, brc.VERSION[0:2])) # The full version, including alpha/beta/rc tags release = brc.__version__ @@ -47,23 +47,19 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.intersphinx', - 'sphinx.ext.coverage' -] +extensions = ["sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx.ext.coverage"] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] -source_suffix = '.rst' +source_suffix = ".rst" # The master toctree document. -master_doc = 'index' +master_doc = "index" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -75,10 +71,10 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path . -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = "sphinx" # -- Options for HTML output ------------------------------------------------- @@ -86,18 +82,18 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +html_theme = "alabaster" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = { - 'github_user': 'VNG-Realisatie', - 'github_banner': True, - 'github_repo': 'gemma-besluitregistratiecomponent', - 'travis_button': True, - 'codecov_button': True, + "github_user": "VNG-Realisatie", + "github_banner": True, + "github_repo": "besluiten-api", + "travis_button": True, + "codecov_button": True, # 'analytics_id': '', } @@ -115,11 +111,11 @@ # 'searchbox.html']``. # html_sidebars = { - '**': [ + "**": [ # 'sidebar-intro.html', - 'navigation.html', - 'relations.html', # needs 'show_related': True theme option to display - 'searchbox.html', + "navigation.html", + "relations.html", # needs 'show_related': True theme option to display + "searchbox.html", ] } @@ -129,7 +125,7 @@ # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. -htmlhelp_basename = 'brcdoc' +htmlhelp_basename = "brcdoc" # -- Options for LaTeX output ------------------------------------------------ @@ -138,15 +134,12 @@ # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. # # 'preamble': '', - # Latex figure (float) alignment # # 'figure_align': 'htbp', @@ -156,8 +149,13 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'brc.tex', 'document\\_registratie\\_component Documentation', - 'VNG Realisatie', 'manual'), + ( + master_doc, + "brc.tex", + "document\\_registratie\\_component Documentation", + "VNG Realisatie", + "manual", + ) ] @@ -165,10 +163,7 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'brc', 'brc Documentation', - [author], 1) -] +man_pages = [(master_doc, "brc", "brc Documentation", [author], 1)] # -- Options for Texinfo output ---------------------------------------------- @@ -177,13 +172,19 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'brc', 'brc Documentation', - author, 'brc', 'One line description of project.', - 'Miscellaneous'), + ( + master_doc, + "brc", + "brc Documentation", + author, + "brc", + "One line description of project.", + "Miscellaneous", + ) ] # -- Extension configuration ------------------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'https://docs.python.org/': None} +intersphinx_mapping = {"https://docs.python.org/": None} diff --git a/docs/contents/installation/development.rst b/docs/contents/installation/development.rst index b995043..4dc488a 100644 --- a/docs/contents/installation/development.rst +++ b/docs/contents/installation/development.rst @@ -32,13 +32,13 @@ You can retrieve the source code using the following command: .. code-block:: bash - $ git clone git@github.com:VNG-realisatie/gemma-besluitregistratiecomponent.git brc + $ git clone git@github.com:VNG-realisatie/besluiten-api.git brc **Note:** You can also use the HTTPS syntax: .. code-block:: bash - $ git clone https://github.com/VNG-realisatie/gemma-besluitregistratiecomponent.git brc + $ git clone https://github.com/VNG-realisatie/besluiten-api.git brc Setting up virtualenv ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/contents/installation/docker.rst b/docs/contents/installation/docker.rst index 3e88874..10a5d97 100644 --- a/docs/contents/installation/docker.rst +++ b/docs/contents/installation/docker.rst @@ -19,7 +19,7 @@ Docker basics .. code-block:: bash - $ git clone https://github.com/VNG-realisatie/gemma-besluitregistratiecomponent.git brc + $ git clone https://github.com/VNG-realisatie/besluiten-api.git brc Cloning into 'brc'... ... @@ -104,6 +104,6 @@ You can override this location through the ``FIXTURES_DIR`` environment variable. Only ``*.json`` files are considered. -.. _Github: https://github.com/VNG-realisatie/gemma-besluitregistratiecomponent +.. _Github: https://github.com/VNG-realisatie/besluiten-api .. _Docker: https://docs.docker.com/install/ .. _Docker Compose: https://docs.docker.com/compose/install/ diff --git a/docs/index.rst b/docs/index.rst index 695e6f4..65de4d9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,7 +3,7 @@ besluitregistratiecomponent =========================== :Version: 1.0.1 -:Source: https://github.com/VNG-Realisatie/gemma-besluitregistratiecomponent +:Source: https://github.com/VNG-Realisatie/besluiten-api :Keywords: zaken, zaakgericht werken, GEMMA, RGBZ, BRC :PythonVersion: 3.6 @@ -45,16 +45,16 @@ Contents References ============ -* `Issues `_ -* `Code `_ +* `Issues `_ +* `Code `_ -.. |build-status| image:: http://jenkins.nlx.io/buildStatus/icon?job=gemma-besluitregistratiecomponent-stable +.. |build-status| image:: http://jenkins.nlx.io/buildStatus/icon?job=besluiten-api-stable :alt: Build status - :target: http://jenkins.nlx.io/job/gemma-besluitregistratiecomponent-stable + :target: http://jenkins.nlx.io/job/besluiten-api-stable -.. |requirements| image:: https://requires.io/github/VNG-Realisatie/gemma-besluitregistratiecomponent/requirements.svg?branch=master - :target: https://requires.io/github/VNG-Realisatie/gemma-besluitregistratiecomponent/requirements/?branch=master +.. |requirements| image:: https://requires.io/github/VNG-Realisatie/besluiten-api/requirements.svg?branch=master + :target: https://requires.io/github/VNG-Realisatie/besluiten-api/requirements/?branch=master :alt: Requirements status .. _testomgeving: https://besluiten-api.vng.cloud/ diff --git a/requirements/base.in b/requirements/base.in index 37ff784..3f96731 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -1,4 +1,4 @@ -pip-tools +Pillow psycopg2-binary python-dotenv python-dateutil @@ -14,6 +14,5 @@ django-choices==1.7.0 django-cors-middleware django-markup==1.3 django_redis - djangorestframework -vng-api-common +vng-api-common<1.1.0 diff --git a/requirements/base.txt b/requirements/base.txt index 06fac89..54b9ac1 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,67 +1,165 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.6 # To update, run: # -# pip-compile --no-index --output-file requirements/base.txt requirements/base.in +# ./bin/compile_dependencies.sh # -alabaster==0.7.12 # via sphinx -babel==2.6.0 # via sphinx -certifi==2018.8.24 # via requests -chardet==3.0.4 # via requests -click==6.7 # via pip-tools -coreapi==2.3.3 # via drf-yasg -coreschema==0.0.4 # via coreapi, drf-yasg -django-appconf==1.0.2 # via django-axes +alabaster==0.7.12 + # via sphinx +babel==2.6.0 + # via sphinx +certifi==2018.8.24 + # via requests +chardet==3.0.4 + # via requests +coreapi==2.3.3 + # via drf-yasg +coreschema==0.0.4 + # via + # coreapi + # drf-yasg +django==2.2.8 + # via + # -r requirements/base.in + # django-choices + # django-filter + # django-markup + # django-redis + # drf-nested-routers + # drf-yasg + # vng-api-common +django-appconf==1.0.2 + # via django-axes django-axes==4.4.0 + # via -r requirements/base.in django-choices==1.7.0 + # via + # -r requirements/base.in + # vng-api-common django-cors-middleware==1.3.1 -django-filter==2.1.0 # via vng-api-common -django-ipware==2.1.0 # via django-axes + # via -r requirements/base.in +django-filter==2.1.0 + # via vng-api-common +django-ipware==2.1.0 + # via django-axes django-markup==1.3 + # via -r requirements/base.in django-redis==4.10.0 -django-rest-framework-condition==0.1.1 # via vng-api-common -django-solo==1.1.3 # via vng-api-common -django==2.2.8 -djangorestframework-camel-case==0.2.0 # via vng-api-common + # via -r requirements/base.in +django-solo==1.1.3 + # via vng-api-common djangorestframework==3.9.4 -docutils==0.14 # via sphinx -drf-nested-routers==0.90.2 # via vng-api-common -drf-yasg==1.16.0 # via vng-api-common -gemma-zds-client==0.11.0 # via vng-api-common -idna==2.7 # via requests -imagesize==1.1.0 # via sphinx -inflection==0.3.1 # via drf-yasg -iso-639==0.4.5 # via vng-api-common -isodate==0.6.0 # via vng-api-common -itypes==1.1.0 # via coreapi -jinja2==2.11.2 # via coreschema, sphinx + # via + # -r requirements/base.in + # drf-nested-routers + # drf-yasg + # vng-api-common +djangorestframework-camel-case==0.2.0 + # via vng-api-common +docutils==0.14 + # via sphinx +drf-nested-routers==0.90.2 + # via vng-api-common +drf-yasg==1.16.0 + # via vng-api-common +gemma-zds-client==0.11.0 + # via vng-api-common +idna==2.7 + # via requests +imagesize==1.1.0 + # via sphinx +inflection==0.3.1 + # via drf-yasg +iso-639==0.4.5 + # via vng-api-common +isodate==0.6.0 + # via vng-api-common +itypes==1.1.0 + # via coreapi +jinja2==2.11.2 + # via + # coreschema + # sphinx markdown==3.1 -markupsafe==1.1.1 # via jinja2 -oyaml==0.7 # via vng-api-common -packaging==19.0 # via sphinx -pip-tools==4.2.0 + # via -r requirements/base.in +markupsafe==1.1.1 + # via jinja2 +oyaml==0.7 + # via vng-api-common +packaging==19.0 + # via sphinx +pillow==5.2.0 + # via -r requirements/base.in psycopg2-binary==2.7.5 -pygments==2.3.1 # via sphinx -pyjwt==1.6.4 # via gemma-zds-client, vng-api-common -pyparsing==2.3.1 # via packaging + # via -r requirements/base.in +pygments==2.3.1 + # via sphinx +pyjwt==1.6.4 + # via + # gemma-zds-client + # vng-api-common +pyparsing==2.3.1 + # via packaging python-dateutil==2.7.3 + # via -r requirements/base.in python-dotenv==0.9.1 + # via -r requirements/base.in pytz==2018.5 -pyyaml==3.13 # via gemma-zds-client, oyaml, vng-api-common + # via + # -r requirements/base.in + # babel + # django + # django-axes +pyyaml==3.13 + # via + # gemma-zds-client + # oyaml + # vng-api-common raven==6.9.0 -redis==3.3.6 # via django-redis -requests==2.21 # via coreapi, gemma-zds-client, sphinx, vng-api-common -ruamel.yaml==0.15.64 # via drf-yasg -six==1.11.0 # via django-markup, drf-yasg, isodate, packaging, pip-tools, python-dateutil, sphinx -snowballstemmer==1.2.1 # via sphinx -sphinx-rtd-theme==0.4.3 + # via -r requirements/base.in +redis==3.3.6 + # via django-redis +requests==2.21 + # via + # coreapi + # gemma-zds-client + # sphinx + # vng-api-common +ruamel.yaml==0.15.64 + # via drf-yasg +six==1.11.0 + # via + # django-markup + # drf-yasg + # isodate + # packaging + # python-dateutil + # sphinx +snowballstemmer==1.2.1 + # via sphinx sphinx==1.8.4 -sphinxcontrib-websupport==1.1.0 # via sphinx -sqlparse==0.3.0 # via django -unidecode==1.0.22 # via vng-api-common -uritemplate==3.0.0 # via coreapi, drf-yasg -urllib3==1.24.3 # via requests -vng-api-common==1.4.4 + # via + # -r requirements/base.in + # sphinx-rtd-theme +sphinx-rtd-theme==0.4.3 + # via -r requirements/base.in +sphinxcontrib-websupport==1.1.0 + # via sphinx +sqlparse==0.3.0 + # via django +unidecode==1.0.22 + # via vng-api-common +uritemplate==3.0.0 + # via + # coreapi + # drf-yasg +urllib3==1.24.3 + # via requests +vng-api-common==1.0.56 + # via -r requirements/base.in # The following packages are considered to be unsafe in a requirements file: -# setuptools==42.0.2 # via markdown, sphinx +setuptools==59.6.0 + # via + # markdown + # sphinx diff --git a/requirements/jenkins.txt b/requirements/jenkins.txt index ec1dfa6..e77d865 100644 --- a/requirements/jenkins.txt +++ b/requirements/jenkins.txt @@ -1,79 +1,298 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.6 # To update, run: # -# pip-compile --no-index --output-file requirements/jenkins.txt requirements/base.txt requirements/testing.in requirements/jenkins.in +# ./bin/compile_dependencies.sh # alabaster==0.7.12 -astroid==1.6.5 # via pylint + # via + # -r requirements/base.txt + # sphinx +appdirs==1.4.4 + # via black +astroid==1.6.5 + # via pylint babel==2.6.0 + # via + # -r requirements/base.txt + # sphinx +black==20.8b1 + # via -r requirements/testing.in certifi==2018.8.24 + # via + # -r requirements/base.txt + # requests chardet==3.0.4 -click==6.7 + # via + # -r requirements/base.txt + # requests +click==7.1.2 + # via black coreapi==2.3.3 + # via + # -r requirements/base.txt + # drf-yasg coreschema==0.0.4 + # via + # -r requirements/base.txt + # coreapi + # drf-yasg coverage==4.5.1 + # via -r requirements/testing.in +dataclasses==0.8 + # via black +django==2.2.8 + # via + # -r requirements/base.txt + # django-choices + # django-filter + # django-jenkins + # django-markup + # django-redis + # drf-nested-routers + # drf-yasg + # vng-api-common django-appconf==1.0.2 + # via + # -r requirements/base.txt + # django-axes django-axes==4.4.0 + # via -r requirements/base.txt django-choices==1.7.0 + # via + # -r requirements/base.txt + # vng-api-common django-cors-middleware==1.3.1 + # via -r requirements/base.txt django-filter==2.1.0 + # via + # -r requirements/base.txt + # vng-api-common django-ipware==2.1.0 + # via + # -r requirements/base.txt + # django-axes django-jenkins==0.110.0 + # via -r requirements/jenkins.in django-markup==1.3 + # via -r requirements/base.txt django-redis==4.10.0 -django-rest-framework-condition==0.1.1 + # via -r requirements/base.txt django-solo==1.1.3 -django==2.2.8 -djangorestframework-camel-case==0.2.0 + # via + # -r requirements/base.txt + # vng-api-common djangorestframework==3.9.4 + # via + # -r requirements/base.txt + # drf-nested-routers + # drf-yasg + # vng-api-common +djangorestframework-camel-case==0.2.0 + # via + # -r requirements/base.txt + # vng-api-common docutils==0.14 + # via + # -r requirements/base.txt + # sphinx drf-nested-routers==0.90.2 + # via + # -r requirements/base.txt + # vng-api-common drf-yasg==1.16.0 -factory-boy==2.11.1 -faker==0.9.0 # via factory-boy + # via + # -r requirements/base.txt + # vng-api-common +factory-boy==3.0.1 + # via -r requirements/testing.in +faker==13.15.1 + # via factory-boy freezegun==0.3.10 + # via -r requirements/testing.in gemma-zds-client==0.11.0 + # via + # -r requirements/base.txt + # vng-api-common idna==2.7 + # via + # -r requirements/base.txt + # requests imagesize==1.1.0 + # via + # -r requirements/base.txt + # sphinx inflection==0.3.1 + # via + # -r requirements/base.txt + # drf-yasg iso-639==0.4.5 + # via + # -r requirements/base.txt + # vng-api-common isodate==0.6.0 -isort==4.3.4 + # via + # -r requirements/base.txt + # vng-api-common +isort==5.6.4 + # via + # -r requirements/testing.in + # pylint itypes==1.1.0 + # via + # -r requirements/base.txt + # coreapi jinja2==2.11.2 -lazy-object-proxy==1.3.1 # via astroid + # via + # -r requirements/base.txt + # coreschema + # sphinx +lazy-object-proxy==1.3.1 + # via astroid markdown==3.1 + # via -r requirements/base.txt markupsafe==1.1.1 -mccabe==0.6.1 # via pylint + # via + # -r requirements/base.txt + # jinja2 +mccabe==0.6.1 + # via pylint +mypy-extensions==0.4.3 + # via black oyaml==0.7 + # via + # -r requirements/base.txt + # vng-api-common packaging==19.0 + # via + # -r requirements/base.txt + # sphinx +pathspec==0.8.1 + # via black pep8==1.7.1 -pip-tools==4.2.0 + # via -r requirements/testing.in +pillow==5.2.0 + # via -r requirements/base.txt psycopg2-binary==2.7.5 + # via -r requirements/base.txt pygments==2.3.1 + # via + # -r requirements/base.txt + # sphinx pyjwt==1.6.4 + # via + # -r requirements/base.txt + # gemma-zds-client + # vng-api-common pylint==1.9.3 + # via -r requirements/testing.in pyparsing==2.3.1 + # via + # -r requirements/base.txt + # packaging python-dateutil==2.7.3 + # via + # -r requirements/base.txt + # faker + # freezegun python-dotenv==0.9.1 + # via -r requirements/base.txt pytz==2018.5 + # via + # -r requirements/base.txt + # babel + # django + # django-axes pyyaml==3.13 + # via + # -r requirements/base.txt + # gemma-zds-client + # oyaml + # vng-api-common raven==6.9.0 + # via -r requirements/base.txt redis==3.3.6 -requests-mock==1.7.0 + # via + # -r requirements/base.txt + # django-redis +regex==2020.11.13 + # via black requests==2.21 + # via + # -r requirements/base.txt + # coreapi + # gemma-zds-client + # requests-mock + # sphinx + # vng-api-common +requests-mock==1.7.0 + # via -r requirements/testing.in ruamel.yaml==0.15.64 + # via + # -r requirements/base.txt + # drf-yasg six==1.11.0 + # via + # -r requirements/base.txt + # astroid + # django-markup + # drf-yasg + # freezegun + # isodate + # packaging + # pylint + # python-dateutil + # requests-mock + # sphinx snowballstemmer==1.2.1 -sphinx-rtd-theme==0.4.3 + # via + # -r requirements/base.txt + # sphinx sphinx==1.8.4 + # via + # -r requirements/base.txt + # sphinx-rtd-theme +sphinx-rtd-theme==0.4.3 + # via -r requirements/base.txt sphinxcontrib-websupport==1.1.0 + # via + # -r requirements/base.txt + # sphinx sqlparse==0.3.0 + # via + # -r requirements/base.txt + # django tblib==1.3.2 -text-unidecode==1.2 # via faker + # via -r requirements/testing.in +toml==0.10.2 + # via black +typed-ast==1.4.1 + # via black +typing-extensions==4.1.1 + # via + # black + # faker unidecode==1.0.22 + # via + # -r requirements/base.txt + # vng-api-common uritemplate==3.0.0 + # via + # -r requirements/base.txt + # coreapi + # drf-yasg urllib3==1.24.3 -vng-api-common==1.4.4 -wrapt==1.10.11 # via astroid + # via + # -r requirements/base.txt + # requests +vng-api-common==1.0.56 + # via -r requirements/base.txt +wrapt==1.10.11 + # via astroid + +# The following packages are considered to be unsafe in a requirements file: +setuptools==59.6.0 + # via + # -r requirements/base.txt + # markdown + # sphinx diff --git a/requirements/testing.in b/requirements/testing.in index b63e7eb..0dc23c1 100644 --- a/requirements/testing.in +++ b/requirements/testing.in @@ -1,6 +1,7 @@ # Shared between dev and jenkins requirements to run our tests +black coverage -factory_boy +factory-boy==3.0.1 freezegun isort pep8 diff --git a/requirements/testing.txt b/requirements/testing.txt index 5c97e68..e7f1f5f 100644 --- a/requirements/testing.txt +++ b/requirements/testing.txt @@ -1,7 +1,8 @@ # Shared between dev and jenkins requirements to run our tests +black coverage django-webtest -factory_boy +factory_boy==3.0.1 freezegun isort mock diff --git a/src/autorisaties.md b/src/autorisaties.md new file mode 100644 index 0000000..6663d22 --- /dev/null +++ b/src/autorisaties.md @@ -0,0 +1,65 @@ + +# Autorisaties +## Scopes voor Besluiten API + +Scopes worden typisch per component gedefinieerd en geven aan welke rechten er zijn. +Zie de repository van de [Autorisaties API](https://github.com/VNG-Realisatie/autorisaties-api) + + +### audittrails.lezen + +**Scope** +`audittrails.lezen` + + +**Laat toe om**: + +* audittrails op te lijsten +* audittrail details op te vragen + + +### besluiten.aanmaken + +**Scope** +`besluiten.aanmaken` + + +**Laat toe om**: + +* besluiten aan te maken + + +### besluiten.bijwerken + +**Scope** +`besluiten.bijwerken` + + +**Laat toe om**: + +* attributen van een besluit te wijzingen + + +### besluiten.lezen + +**Scope** +`besluiten.lezen` + + +**Laat toe om**: + +* besluiten te lezen +* besluitdetails op te vragen + + +### besluiten.verwijderen + +**Scope** +`besluiten.verwijderen` + + +**Laat toe om**: + +* besluiten te verwijderen + + diff --git a/src/brc/__init__.py b/src/brc/__init__.py index ad51bf3..c159ab3 100644 --- a/src/brc/__init__.py +++ b/src/brc/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""BesluitRegistratieComponent""" +"""Besluiten API""" # :copyright: (c) 2018, VNG Realisatie # All rights reserved. # :license: EUPL 1.2, see LICENSE for more details. @@ -9,7 +9,7 @@ __version__ = "0.1.5" __author__ = "VNG Realisatie" -__homepage__ = "https://github.com/VNG-Realisatie/gemma-besluitregistratiecomponent" +__homepage__ = "https://github.com/VNG-Realisatie/besluiten-api" __docformat__ = "restructuredtext" # -eof meta- diff --git a/src/brc/api/schema.py b/src/brc/api/schema.py index d32ee81..54b5d1a 100644 --- a/src/brc/api/schema.py +++ b/src/brc/api/schema.py @@ -40,8 +40,8 @@ **Handige links** -* [Documentatie](https://zaakgerichtwerken.vng.cloud/standaard) -* [Zaakgericht werken](https://zaakgerichtwerken.vng.cloud) +* [Documentatie]({settings.DOCUMENTATION_URL}/standaard) +* [Zaakgericht werken]({settings.DOCUMENTATION_URL}) """ info = openapi.Info( @@ -49,8 +49,7 @@ default_version=settings.API_VERSION, description=description, contact=openapi.Contact( - email="standaarden.ondersteuning@vng.nl", - url="https://zaakgerichtwerken.vng.cloud", + email="standaarden.ondersteuning@vng.nl", url=settings.DOCUMENTATION_URL ), license=openapi.License( name="EUPL 1.2", url="https://opensource.org/licenses/EUPL-1.2" diff --git a/src/brc/api/tests/test_audittrails.py b/src/brc/api/tests/test_audittrails.py index e81501a..7727edc 100644 --- a/src/brc/api/tests/test_audittrails.py +++ b/src/brc/api/tests/test_audittrails.py @@ -143,10 +143,7 @@ def test_create_besluitinformatieobject_audittrail(self, *mocks): with mock_client(self.responses): response = self.client.post( url, - { - "besluit": besluit_data["url"], - "informatieobject": INFORMATIE_OBJECT, - }, + {"besluit": besluit_data["url"], "informatieobject": INFORMATIE_OBJECT}, ) besluitinformatieobject_response = response.data diff --git a/src/brc/api/tests/test_besluit.py b/src/brc/api/tests/test_besluit.py index f9910d8..ba077e4 100644 --- a/src/brc/api/tests/test_besluit.py +++ b/src/brc/api/tests/test_besluit.py @@ -2,7 +2,8 @@ from rest_framework.test import APITestCase from vng_api_common.tests import JWTAuthMixin, get_operation_url, get_validation_errors -from brc.datamodel.tests.factories import BesluitFactory +from brc.datamodel.models import BesluitInformatieObject +from brc.datamodel.tests.factories import BesluitFactory, BesluitInformatieObjectFactory from .mixins import MockSyncMixin diff --git a/src/brc/api/tests/test_caching.py b/src/brc/api/tests/test_caching.py deleted file mode 100644 index 3fce4a5..0000000 --- a/src/brc/api/tests/test_caching.py +++ /dev/null @@ -1,113 +0,0 @@ -""" -Test that the caching mechanisms are in place. -""" -from rest_framework import status -from rest_framework.test import APITestCase, APITransactionTestCase -from vng_api_common.tests import CacheMixin, JWTAuthMixin, generate_jwt_auth, reverse -from vng_api_common.tests.schema import get_spec - -from brc.datamodel.tests.factories import BesluitFactory, BesluitInformatieObjectFactory - -from .mixins import MockSyncMixin - - -class BesluitCacheTests(CacheMixin, JWTAuthMixin, APITestCase): - heeft_alle_autorisaties = True - - def test_besluit_get_cache_header(self): - besluit = BesluitFactory.create() - - response = self.client.get(reverse(besluit)) - - self.assertHasETag(response) - - def test_besluit_head_cache_header(self): - besluit = BesluitFactory.create() - - self.assertHeadHasETag(reverse(besluit)) - - def test_head_in_apischema(self): - spec = get_spec() - - endpoint = spec["paths"]["/besluiten/{uuid}"] - - self.assertIn("head", endpoint) - - def test_conditional_get_304(self): - besluit = BesluitFactory.create(with_etag=True) - response = self.client.get( - reverse(besluit), HTTP_IF_NONE_MATCH=f'"{besluit._etag}"' - ) - - self.assertEqual(response.status_code, status.HTTP_304_NOT_MODIFIED) - - def test_conditional_get_stale(self): - besluit = BesluitFactory.create(with_etag=True) - - response = self.client.get(reverse(besluit), HTTP_IF_NONE_MATCH=f'"not-an-md5"') - - self.assertEqual(response.status_code, status.HTTP_200_OK) - - -class BesluitInformatieObjectCacheTests( - MockSyncMixin, CacheMixin, JWTAuthMixin, APITestCase -): - heeft_alle_autorisaties = True - - def test_besluit_get_cache_header(self): - bio = BesluitInformatieObjectFactory.create() - - response = self.client.get(reverse(bio)) - - self.assertHasETag(response) - - def test_besluit_head_cache_header(self): - bio = BesluitInformatieObjectFactory.create() - - self.assertHeadHasETag(reverse(bio)) - - def test_head_in_apischema(self): - spec = get_spec() - - endpoint = spec["paths"]["/besluitinformatieobjecten/{uuid}"] - - self.assertIn("head", endpoint) - - def test_conditional_get_304(self): - bio = BesluitInformatieObjectFactory.create(with_etag=True) - response = self.client.get(reverse(bio), HTTP_IF_NONE_MATCH=f'"{bio._etag}"') - - self.assertEqual(response.status_code, status.HTTP_304_NOT_MODIFIED) - - def test_conditional_get_stale(self): - bio = BesluitInformatieObjectFactory.create(with_etag=True) - - response = self.client.get(reverse(bio), HTTP_IF_NONE_MATCH=f'"not-an-md5"') - - self.assertEqual(response.status_code, status.HTTP_200_OK) - - -class BesluitCacheTransactionTests(JWTAuthMixin, APITransactionTestCase): - heeft_alle_autorisaties = True - - def setUp(self): - super().setUp() - self._create_credentials( - self.client_id, - self.secret, - self.heeft_alle_autorisaties, - self.max_vertrouwelijkheidaanduiding, - ) - - def test_invalidate_etag_after_change(self): - """ - Because changes are made to the besluit, a code 200 should be returned - """ - besluit = BesluitFactory.create(toelichting="", with_etag=True) - etag = besluit._etag - - besluit.toelichting = "bla" - besluit.save() - - response = self.client.get(reverse(besluit), HTTP_IF_NONE_MATCH=f"{etag}") - self.assertEqual(response.status_code, status.HTTP_200_OK) diff --git a/src/brc/api/viewsets.py b/src/brc/api/viewsets.py index b54b3a8..feb455a 100644 --- a/src/brc/api/viewsets.py +++ b/src/brc/api/viewsets.py @@ -8,7 +8,6 @@ AuditTrailViewSet, AuditTrailViewsetMixin, ) -from vng_api_common.caching import conditional_retrieve from vng_api_common.notifications.viewsets import ( NotificationCreateMixin, NotificationDestroyMixin, @@ -32,7 +31,6 @@ from .serializers import BesluitInformatieObjectSerializer, BesluitSerializer -@conditional_retrieve() class BesluitViewSet( NotificationViewSetMixin, CheckQueryParamsMixin, @@ -121,7 +119,6 @@ class BesluitViewSet( audit = AUDIT_BRC -@conditional_retrieve() class BesluitInformatieObjectViewSet( NotificationCreateMixin, NotificationDestroyMixin, diff --git a/src/brc/conf/api.py b/src/brc/conf/api.py index 3e8c012..0bfb63a 100644 --- a/src/brc/conf/api.py +++ b/src/brc/conf/api.py @@ -1,3 +1,5 @@ +import os + from vng_api_common.conf.api import * # noqa - imports white-listed API_VERSION = "1.0.1" @@ -41,3 +43,7 @@ zrc_repo = "vng-Realisatie/gemma-zaakregistratiecomponent" zrc_commit = "8ea1950fe4ec2ad99504d345eba60a175eea3edf" ZRC_API_SPEC = f"https://raw.githubusercontent.com/{zrc_repo}/{zrc_commit}/src/openapi.yaml" # noqa + +SELF_REPO = "VNG-Realisatie/besluiten-api" +SELF_BRANCH = os.getenv("SELF_BRANCH") or API_VERSION +GITHUB_API_SPEC = f"https://raw.githubusercontent.com/{SELF_REPO}/{SELF_BRANCH}/src/openapi.yaml" # noqa diff --git a/src/brc/conf/base.py b/src/brc/conf/base.py index 8e3e84c..97200a9 100644 --- a/src/brc/conf/base.py +++ b/src/brc/conf/base.py @@ -3,6 +3,8 @@ # Django-hijack (and Django-hijack-admin) from django.urls import reverse_lazy +import raven + from .api import * # noqa SITE_ID = int(os.getenv("SITE_ID", 1)) @@ -297,16 +299,18 @@ # Django-CORS-middleware CORS_ORIGIN_ALLOW_ALL = True +if "GIT_SHA" in os.environ: + GIT_SHA = os.getenv("GIT_SHA") +else: + GIT_SHA = raven.fetch_git_sha(BASE_DIR) + # Raven SENTRY_DSN = os.getenv("SENTRY_DSN") if SENTRY_DSN: INSTALLED_APPS = INSTALLED_APPS + ["raven.contrib.django.raven_compat"] - RAVEN_CONFIG = { - "dsn": SENTRY_DSN, - # 'release': raven.fetch_git_sha(BASE_DIR), doesn't work in Docker - } + RAVEN_CONFIG = {"dsn": SENTRY_DSN, "release": GIT_SHA} LOGGING["handlers"].update( { "sentry": { @@ -327,3 +331,6 @@ # settings for sending notifications NOTIFICATIONS_KANAAL = "besluiten" + +# URL for documentation that's shown in API schema +DOCUMENTATION_URL = "https://vng-realisatie.github.io/gemma-zaken" diff --git a/src/brc/datamodel/migrations/0011_auto_20190910_1037.py b/src/brc/datamodel/migrations/0011_auto_20190910_1037.py deleted file mode 100644 index 0cc8aa0..0000000 --- a/src/brc/datamodel/migrations/0011_auto_20190910_1037.py +++ /dev/null @@ -1,36 +0,0 @@ -# Generated by Django 2.2.4 on 2019-09-10 10:37 - -from django.db import migrations, models -import vng_api_common.fields - - -class Migration(migrations.Migration): - - dependencies = [("datamodel", "0010_migrate_to_flattened_urls")] - - operations = [ - migrations.AddField( - model_name="besluit", - name="_etag", - field=models.CharField( - default="", - editable=False, - help_text="MD5 hash of the resource representation in its current version.", - max_length=32, - verbose_name="etag value", - ), - preserve_default=False, - ), - migrations.AddField( - model_name="besluitinformatieobject", - name="_etag", - field=models.CharField( - default="", - editable=False, - help_text="MD5 hash of the resource representation in its current version.", - max_length=32, - verbose_name="etag value", - ), - preserve_default=False, - ), - ] diff --git a/src/brc/datamodel/migrations/0011_auto_20220811_1308.py b/src/brc/datamodel/migrations/0011_auto_20220811_1308.py new file mode 100644 index 0000000..ee4af77 --- /dev/null +++ b/src/brc/datamodel/migrations/0011_auto_20220811_1308.py @@ -0,0 +1,49 @@ +# Generated by Django 2.2.8 on 2022-08-11 13:08 + +from django.db import migrations, models +import vng_api_common.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ("datamodel", "0010_migrate_to_flattened_urls"), + ] + + operations = [ + migrations.AlterField( + model_name="besluit", + name="besluittype", + field=models.URLField( + help_text="URL-referentie naar het BESLUITTYPE (in de Catalogi API).", + verbose_name="besluittype", + ), + ), + migrations.AlterField( + model_name="besluit", + name="verantwoordelijke_organisatie", + field=vng_api_common.fields.RSINField( + help_text="Het RSIN van de niet-natuurlijk persoon zijnde de organisatie die het besluit heeft vastgesteld.", + max_length=9, + verbose_name="verantwoordelijke organisatie", + ), + ), + migrations.AlterField( + model_name="besluit", + name="zaak", + field=models.URLField( + blank=True, + help_text="URL-referentie naar de ZAAK (in de Zaken API) waarvan dit besluit uitkomst is.", + verbose_name="zaak", + ), + ), + migrations.AlterField( + model_name="besluitinformatieobject", + name="informatieobject", + field=models.URLField( + help_text="URL-referentie naar het INFORMATIEOBJECT (in de Documenten API) waarin (een deel van) het besluit beschreven is.", + max_length=1000, + verbose_name="informatieobject", + ), + ), + ] diff --git a/src/brc/datamodel/models.py b/src/brc/datamodel/models.py index 646eaf5..150d456 100644 --- a/src/brc/datamodel/models.py +++ b/src/brc/datamodel/models.py @@ -4,7 +4,6 @@ from django.db import models from django.utils.translation import ugettext_lazy as _ -from vng_api_common.caching import ETagMixin from vng_api_common.fields import RSINField from vng_api_common.models import APIMixin from vng_api_common.utils import ( @@ -22,7 +21,7 @@ logger = logging.getLogger(__name__) -class Besluit(ETagMixin, APIMixin, models.Model): +class Besluit(APIMixin, models.Model): uuid = models.UUIDField(default=_uuid.uuid4) identificatie = models.CharField( @@ -143,7 +142,7 @@ def unique_representation(self): return f"{self.identificatie}" -class BesluitInformatieObject(ETagMixin, models.Model): +class BesluitInformatieObject(models.Model): """ Aanduiding van het (de) INFORMATIEOBJECT(en) waarin het BESLUIT beschreven is. diff --git a/src/brc/datamodel/tests/factories.py b/src/brc/datamodel/tests/factories.py index f835e65..49971d3 100644 --- a/src/brc/datamodel/tests/factories.py +++ b/src/brc/datamodel/tests/factories.py @@ -21,12 +21,7 @@ def ingangsdatum(self): end_date=self.datum + timedelta(days=180), tzinfo=timezone.utc, ) - return _ingangsdatum.evaluate(self, None, None).date() - - class Params: - with_etag = factory.Trait( - _etag=factory.PostGenerationMethodCall("calculate_etag_value") - ) + return _ingangsdatum.evaluate(self, None, None) class BesluitInformatieObjectFactory(factory.django.DjangoModelFactory): @@ -35,8 +30,3 @@ class BesluitInformatieObjectFactory(factory.django.DjangoModelFactory): class Meta: model = "datamodel.BesluitInformatieObject" - - class Params: - with_etag = factory.Trait( - _etag=factory.PostGenerationMethodCall("calculate_etag_value") - ) diff --git a/src/brc/utils/context_processors.py b/src/brc/utils/context_processors.py index 398d642..913e6e2 100644 --- a/src/brc/utils/context_processors.py +++ b/src/brc/utils/context_processors.py @@ -8,6 +8,11 @@ def settings(request): "SHOW_ALERT", "PROJECT_NAME", "SITE_TITLE", + "API_VERSION", + "GIT_SHA", + "GITHUB_API_SPEC", + "SELF_REPO", + "SELF_BRANCH", ) return { diff --git a/src/notificaties.md b/src/notificaties.md new file mode 100644 index 0000000..09fca65 --- /dev/null +++ b/src/notificaties.md @@ -0,0 +1,35 @@ +## Notificaties +## Berichtkenmerken voor Besluiten API + +Kanalen worden typisch per component gedefinieerd. Producers versturen berichten op bepaalde kanalen, +consumers ontvangen deze. Consumers abonneren zich via een notificatiecomponent (zoals https://notificaties-api.vng.cloud/api/v1/schema/) op berichten. + +Hieronder staan de kanalen beschreven die door deze component gebruikt worden, met de kenmerken bij elk bericht. + +De architectuur van de notificaties staat beschreven op https://github.com/VNG-Realisatie/notificaties-api. + + +### besluiten + +**Kanaal** +`besluiten` + +**Main resource** + +`besluit` + + + +**Kenmerken** + +* `verantwoordelijke_organisatie`: Het RSIN van de niet-natuurlijk persoon zijnde de organisatie die het besluit heeft vastgesteld. +* `besluittype`: URL-referentie naar het BESLUITTYPE (in de Catalogi API). + +**Resources en acties** + + +* besluit: create, update, destroy + +* besluitinformatieobject: create, destroy + + diff --git a/src/openapi.yaml b/src/openapi.yaml index 836406d..40c951d 100644 --- a/src/openapi.yaml +++ b/src/openapi.yaml @@ -85,13 +85,13 @@ info: **Handige links** - * [Documentatie](https://zaakgerichtwerken.vng.cloud/standaard) + * [Documentatie](https://vng-realisatie.github.io/gemma-zaken/standaard) - * [Zaakgericht werken](https://zaakgerichtwerken.vng.cloud) + * [Zaakgericht werken](https://vng-realisatie.github.io/gemma-zaken) ' contact: - url: https://zaakgerichtwerken.vng.cloud + url: https://vng-realisatie.github.io/gemma-zaken email: standaarden.ondersteuning@vng.nl license: name: EUPL 1.2 @@ -173,113 +173,23 @@ paths: items: $ref: '#/components/schemas/Besluit' '400': - description: Bad request - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ValidatieFout' + $ref: '#/components/responses/400' '401': - description: Unauthorized - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/401' '403': - description: Forbidden - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/403' '406': - description: Not acceptable - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/406' '409': - description: Conflict - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/409' '410': - description: Gone - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/410' '415': - description: Unsupported media type - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/415' '429': - description: Too many requests - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/429' '500': - description: Internal server error - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/500' tags: - besluiten security: @@ -297,17 +207,9 @@ paths: \ vorm van een ZAAK hebben.\n- `datum` in het verleden of nu\n- publicatie\ \ `besluittype` - `concept` moet `false` zijn" parameters: - - name: X-NLX-Request-Application-Id + - name: X-NLX-Logrecord-ID in: header - description: Identificatie van de applicatie die het verzoek stuurt (indien - NLX wordt gebruikt). - required: false - schema: - type: string - - name: X-NLX-Request-User-Id - in: header - description: Identificatie van de gebruiker die het verzoek stuurt (indien - NLX wordt gebruikt). + description: Identifier of the request, traceable throughout the network required: false schema: type: string @@ -338,113 +240,23 @@ paths: schema: $ref: '#/components/schemas/Besluit' '400': - description: Bad request - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ValidatieFout' + $ref: '#/components/responses/400' '401': - description: Unauthorized - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/401' '403': - description: Forbidden - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/403' '406': - description: Not acceptable - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/406' '409': - description: Conflict - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/409' '410': - description: Gone - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/410' '415': - description: Unsupported media type - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/415' '429': - description: Too many requests - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/429' '500': - description: Internal server error - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/500' tags: - besluiten security: @@ -472,101 +284,21 @@ paths: items: $ref: '#/components/schemas/AuditTrail' '401': - description: Unauthorized - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/401' '403': - description: Forbidden - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/403' '406': - description: Not acceptable - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/406' '409': - description: Conflict - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/409' '410': - description: Gone - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/410' '415': - description: Unsupported media type - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/415' '429': - description: Too many requests - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/429' '500': - description: Internal server error - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/500' tags: - besluiten security: @@ -585,35 +317,10 @@ paths: operationId: audittrail_read summary: Een specifieke audit trail regel opvragen. description: Een specifieke audit trail regel opvragen. - parameters: - - name: If-None-Match - in: header - description: "Voer een voorwaardelijk verzoek uit. Deze header moet \xE9\xE9\ - n of meerdere ETag-waardes bevatten van resources die de consumer gecached\ - \ heeft. Indien de waarde van de ETag van de huidige resource voorkomt in\ - \ deze set, dan antwoord de provider met een lege HTTP 304 request. Zie\ - \ [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match)\ - \ voor meer informatie." - required: false - examples: - multipleValues: - summary: Meerdere ETag-waardes - value: '"79054025255fb1a26e4bc422aef54eb4", "e4d909c290d0fb1ca068ffaddf22cbd0"' - oneValue: - summary: "E\xE9n ETag-waarde" - value: '"79054025255fb1a26e4bc422aef54eb4"' - schema: - type: string responses: '200': description: OK headers: - ETag: - description: De ETag berekend op de response body JSON. Indien twee - resources exact dezelfde ETag hebben, dan zijn deze resources identiek - aan elkaar. Je kan de ETag gebruiken om caching te implementeren. - schema: - type: string API-version: schema: type: string @@ -624,7 +331,51 @@ paths: schema: $ref: '#/components/schemas/AuditTrail' '401': - description: Unauthorized + $ref: '#/components/responses/401' + '403': + $ref: '#/components/responses/403' + '404': + $ref: '#/components/responses/404' + '406': + $ref: '#/components/responses/406' + '409': + $ref: '#/components/responses/409' + '410': + $ref: '#/components/responses/410' + '415': + $ref: '#/components/responses/415' + '429': + $ref: '#/components/responses/429' + '500': + $ref: '#/components/responses/500' + tags: + - besluiten + security: + - JWT-Claims: + - audittrails.lezen + parameters: + - name: besluit_uuid + in: path + required: true + description: Unieke resource identifier (UUID4) + schema: + type: string + format: uuid + - name: uuid + in: path + description: Unieke identificatie van de audit regel. + required: true + schema: + type: string + format: uuid + /besluiten/{uuid}: + get: + operationId: besluit_read + summary: Een specifiek BESLUIT opvragen. + description: Een specifiek BESLUIT opvragen. + responses: + '200': + description: OK headers: API-version: schema: @@ -632,319 +383,27 @@ paths: description: 'Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1.' content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - '403': - description: Forbidden - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - '404': - description: Not found - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - '406': - description: Not acceptable - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - '409': - description: Conflict - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - '410': - description: Gone - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - '415': - description: Unsupported media type - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - '429': - description: Too many requests - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - '500': - description: Internal server error - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - tags: - - besluiten - security: - - JWT-Claims: - - audittrails.lezen - parameters: - - name: besluit_uuid - in: path - required: true - description: Unieke resource identifier (UUID4) - schema: - type: string - format: uuid - - name: uuid - in: path - description: Unieke identificatie van de audit regel. - required: true - schema: - type: string - format: uuid - /besluiten/{uuid}: - get: - operationId: besluit_read - summary: Een specifiek BESLUIT opvragen. - description: Een specifiek BESLUIT opvragen. - parameters: - - name: If-None-Match - in: header - description: "Voer een voorwaardelijk verzoek uit. Deze header moet \xE9\xE9\ - n of meerdere ETag-waardes bevatten van resources die de consumer gecached\ - \ heeft. Indien de waarde van de ETag van de huidige resource voorkomt in\ - \ deze set, dan antwoord de provider met een lege HTTP 304 request. Zie\ - \ [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match)\ - \ voor meer informatie." - required: false - examples: - multipleValues: - summary: Meerdere ETag-waardes - value: '"79054025255fb1a26e4bc422aef54eb4", "e4d909c290d0fb1ca068ffaddf22cbd0"' - oneValue: - summary: "E\xE9n ETag-waarde" - value: '"79054025255fb1a26e4bc422aef54eb4"' - schema: - type: string - responses: - '200': - description: OK - headers: - ETag: - description: De ETag berekend op de response body JSON. Indien twee - resources exact dezelfde ETag hebben, dan zijn deze resources identiek - aan elkaar. Je kan de ETag gebruiken om caching te implementeren. - schema: - type: string - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/json: + application/json: schema: $ref: '#/components/schemas/Besluit' '401': - description: Unauthorized - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/401' '403': - description: Forbidden - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/403' '404': - description: Not found - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/404' '406': - description: Not acceptable - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/406' '409': - description: Conflict - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/409' '410': - description: Gone - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/410' '415': - description: Unsupported media type - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/415' '429': - description: Too many requests - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/429' '500': - description: Internal server error - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - tags: - - besluiten - security: - - JWT-Claims: - - besluiten.lezen - head: - operationId: besluit_headers - summary: De headers voor een specifiek(e) BESLUIT opvragen - description: Vraag de headers op die je bij een GET request zou krijgen. - parameters: - - name: If-None-Match - in: header - description: "Voer een voorwaardelijk verzoek uit. Deze header moet \xE9\xE9\ - n of meerdere ETag-waardes bevatten van resources die de consumer gecached\ - \ heeft. Indien de waarde van de ETag van de huidige resource voorkomt in\ - \ deze set, dan antwoord de provider met een lege HTTP 304 request. Zie\ - \ [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match)\ - \ voor meer informatie." - required: false - examples: - multipleValues: - summary: Meerdere ETag-waardes - value: '"79054025255fb1a26e4bc422aef54eb4", "e4d909c290d0fb1ca068ffaddf22cbd0"' - oneValue: - summary: "E\xE9n ETag-waarde" - value: '"79054025255fb1a26e4bc422aef54eb4"' - schema: - type: string - responses: - '200': - description: OK - headers: - ETag: - description: De ETag berekend op de response body JSON. Indien twee - resources exact dezelfde ETag hebben, dan zijn deze resources identiek - aan elkaar. Je kan de ETag gebruiken om caching te implementeren. - schema: - type: string - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' + $ref: '#/components/responses/500' tags: - besluiten security: @@ -960,17 +419,9 @@ paths: \ hebben.\n- `datum` in het verleden of nu\n- publicatie `besluittype` - `concept`\ \ moet `false` zijn" parameters: - - name: X-NLX-Request-Application-Id - in: header - description: Identificatie van de applicatie die het verzoek stuurt (indien - NLX wordt gebruikt). - required: false - schema: - type: string - - name: X-NLX-Request-User-Id + - name: X-NLX-Logrecord-ID in: header - description: Identificatie van de gebruiker die het verzoek stuurt (indien - NLX wordt gebruikt). + description: Identifier of the request, traceable throughout the network required: false schema: type: string @@ -996,125 +447,25 @@ paths: schema: $ref: '#/components/schemas/Besluit' '400': - description: Bad request - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ValidatieFout' + $ref: '#/components/responses/400' '401': - description: Unauthorized - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/401' '403': - description: Forbidden - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/403' '404': - description: Not found - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/404' '406': - description: Not acceptable - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/406' '409': - description: Conflict - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/409' '410': - description: Gone - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/410' '415': - description: Unsupported media type - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/415' '429': - description: Too many requests - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/429' '500': - description: Internal server error - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/500' tags: - besluiten security: @@ -1130,17 +481,9 @@ paths: \ hebben.\n- `datum` in het verleden of nu\n- publicatie `besluittype` - `concept`\ \ moet `false` zijn" parameters: - - name: X-NLX-Request-Application-Id + - name: X-NLX-Logrecord-ID in: header - description: Identificatie van de applicatie die het verzoek stuurt (indien - NLX wordt gebruikt). - required: false - schema: - type: string - - name: X-NLX-Request-User-Id - in: header - description: Identificatie van de gebruiker die het verzoek stuurt (indien - NLX wordt gebruikt). + description: Identifier of the request, traceable throughout the network required: false schema: type: string @@ -1152,69 +495,9 @@ paths: type: string requestBody: $ref: '#/components/requestBodies/Besluit' - responses: - '200': - description: OK - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/json: - schema: - $ref: '#/components/schemas/Besluit' - '400': - description: Bad request - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ValidatieFout' - '401': - description: Unauthorized - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - '403': - description: Forbidden - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - '404': - description: Not found - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - '406': - description: Not acceptable + responses: + '200': + description: OK headers: API-version: schema: @@ -1222,69 +505,29 @@ paths: description: 'Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1.' content: - application/problem+json: + application/json: schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/schemas/Besluit' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '403': + $ref: '#/components/responses/403' + '404': + $ref: '#/components/responses/404' + '406': + $ref: '#/components/responses/406' '409': - description: Conflict - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/409' '410': - description: Gone - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/410' '415': - description: Unsupported media type - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/415' '429': - description: Too many requests - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/429' '500': - description: Internal server error - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/500' tags: - besluiten security: @@ -1303,17 +546,9 @@ paths: - audit trail regels' parameters: - - name: X-NLX-Request-Application-Id - in: header - description: Identificatie van de applicatie die het verzoek stuurt (indien - NLX wordt gebruikt). - required: false - schema: - type: string - - name: X-NLX-Request-User-Id + - name: X-NLX-Logrecord-ID in: header - description: Identificatie van de gebruiker die het verzoek stuurt (indien - NLX wordt gebruikt). + description: Identifier of the request, traceable throughout the network required: false schema: type: string @@ -1333,113 +568,23 @@ paths: description: 'Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1.' '401': - description: Unauthorized - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/401' '403': - description: Forbidden - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/403' '404': - description: Not found - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/404' '406': - description: Not acceptable - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/406' '409': - description: Conflict - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/409' '410': - description: Gone - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/410' '415': - description: Unsupported media type - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/415' '429': - description: Too many requests - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/429' '500': - description: Internal server error - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/500' tags: - besluiten security: @@ -1489,113 +634,23 @@ paths: items: $ref: '#/components/schemas/BesluitInformatieObject' '400': - description: Bad request - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ValidatieFout' + $ref: '#/components/responses/400' '401': - description: Unauthorized - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/401' '403': - description: Forbidden - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/403' '406': - description: Not acceptable - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/406' '409': - description: Conflict - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/409' '410': - description: Gone - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/410' '415': - description: Unsupported media type - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/415' '429': - description: Too many requests - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/429' '500': - description: Internal server error - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/500' tags: - besluitinformatieobjecten security: @@ -1607,23 +662,14 @@ paths: description: "Registreer een INFORMATIEOBJECT bij een BESLUIT. Er worden twee\ \ types van\nrelaties met andere objecten gerealiseerd:\n\n**Er wordt gevalideerd\ \ op**\n- geldigheid `besluit` URL\n- geldigheid `informatieobject` URL\n\ - - de combinatie `informatieobject` en `besluit` moet uniek zijn\n- `informatieobject.informatieobjecttype`\ - \ moet in het ZTC gerelateerd zijn\n aan `besluit.besluittype`\n\n**Opmerkingen**\n\ + - de combinatie `informatieobject` en `besluit` moet uniek zijn\n\n**Opmerkingen**\n\ - De `registratiedatum` wordt door het systeem op 'NU' gezet. De\n `aardRelatie`\ \ wordt ook door het systeem gezet.\n- Bij het aanmaken wordt ook in de Documenten\ \ API de gespiegelde relatie\n aangemaakt, echter zonder de relatie-informatie." parameters: - - name: X-NLX-Request-Application-Id - in: header - description: Identificatie van de applicatie die het verzoek stuurt (indien - NLX wordt gebruikt). - required: false - schema: - type: string - - name: X-NLX-Request-User-Id + - name: X-NLX-Logrecord-ID in: header - description: Identificatie van de gebruiker die het verzoek stuurt (indien - NLX wordt gebruikt). + description: Identifier of the request, traceable throughout the network required: false schema: type: string @@ -1640,131 +686,41 @@ paths: $ref: '#/components/schemas/BesluitInformatieObject' required: true responses: - '201': - description: Created - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - Location: - schema: - type: string - format: uri - description: URL waar de resource leeft. - content: - application/json: - schema: - $ref: '#/components/schemas/BesluitInformatieObject' - '400': - description: Bad request - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ValidatieFout' - '401': - description: Unauthorized - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - '403': - description: Forbidden - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - '406': - description: Not acceptable - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - '409': - description: Conflict + '201': + description: Created headers: API-version: schema: type: string description: 'Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - '410': - description: Gone - headers: - API-version: + Location: schema: type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' + format: uri + description: URL waar de resource leeft. content: - application/problem+json: + application/json: schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/schemas/BesluitInformatieObject' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '403': + $ref: '#/components/responses/403' + '406': + $ref: '#/components/responses/406' + '409': + $ref: '#/components/responses/409' + '410': + $ref: '#/components/responses/410' '415': - description: Unsupported media type - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/415' '429': - description: Too many requests - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/429' '500': - description: Internal server error - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/500' tags: - besluitinformatieobjecten security: @@ -1776,35 +732,10 @@ paths: operationId: besluitinformatieobject_read summary: Een specifieke BESLUIT-INFORMATIEOBJECT relatie opvragen. description: Een specifieke BESLUIT-INFORMATIEOBJECT relatie opvragen. - parameters: - - name: If-None-Match - in: header - description: "Voer een voorwaardelijk verzoek uit. Deze header moet \xE9\xE9\ - n of meerdere ETag-waardes bevatten van resources die de consumer gecached\ - \ heeft. Indien de waarde van de ETag van de huidige resource voorkomt in\ - \ deze set, dan antwoord de provider met een lege HTTP 304 request. Zie\ - \ [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match)\ - \ voor meer informatie." - required: false - examples: - multipleValues: - summary: Meerdere ETag-waardes - value: '"79054025255fb1a26e4bc422aef54eb4", "e4d909c290d0fb1ca068ffaddf22cbd0"' - oneValue: - summary: "E\xE9n ETag-waarde" - value: '"79054025255fb1a26e4bc422aef54eb4"' - schema: - type: string responses: '200': description: OK headers: - ETag: - description: De ETag berekend op de response body JSON. Indien twee - resources exact dezelfde ETag hebben, dan zijn deze resources identiek - aan elkaar. Je kan de ETag gebruiken om caching te implementeren. - schema: - type: string API-version: schema: type: string @@ -1815,156 +746,23 @@ paths: schema: $ref: '#/components/schemas/BesluitInformatieObject' '401': - description: Unauthorized - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/401' '403': - description: Forbidden - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/403' '404': - description: Not found - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/404' '406': - description: Not acceptable - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/406' '409': - description: Conflict - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/409' '410': - description: Gone - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/410' '415': - description: Unsupported media type - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/415' '429': - description: Too many requests - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/429' '500': - description: Internal server error - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' - tags: - - besluitinformatieobjecten - security: - - JWT-Claims: - - besluiten.lezen - head: - operationId: besluitinformatieobject_headers - summary: De headers voor een specifiek(e) BESLUITINFORMATIEOBJECT opvragen - description: Vraag de headers op die je bij een GET request zou krijgen. - parameters: - - name: If-None-Match - in: header - description: "Voer een voorwaardelijk verzoek uit. Deze header moet \xE9\xE9\ - n of meerdere ETag-waardes bevatten van resources die de consumer gecached\ - \ heeft. Indien de waarde van de ETag van de huidige resource voorkomt in\ - \ deze set, dan antwoord de provider met een lege HTTP 304 request. Zie\ - \ [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match)\ - \ voor meer informatie." - required: false - examples: - multipleValues: - summary: Meerdere ETag-waardes - value: '"79054025255fb1a26e4bc422aef54eb4", "e4d909c290d0fb1ca068ffaddf22cbd0"' - oneValue: - summary: "E\xE9n ETag-waarde" - value: '"79054025255fb1a26e4bc422aef54eb4"' - schema: - type: string - responses: - '200': - description: OK - headers: - ETag: - description: De ETag berekend op de response body JSON. Indien twee - resources exact dezelfde ETag hebben, dan zijn deze resources identiek - aan elkaar. Je kan de ETag gebruiken om caching te implementeren. - schema: - type: string - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' + $ref: '#/components/responses/500' tags: - besluitinformatieobjecten security: @@ -1975,17 +773,9 @@ paths: summary: Verwijder een BESLUIT-INFORMATIEOBJECT relatie. description: Verwijder een BESLUIT-INFORMATIEOBJECT relatie. parameters: - - name: X-NLX-Request-Application-Id + - name: X-NLX-Logrecord-ID in: header - description: Identificatie van de applicatie die het verzoek stuurt (indien - NLX wordt gebruikt). - required: false - schema: - type: string - - name: X-NLX-Request-User-Id - in: header - description: Identificatie van de gebruiker die het verzoek stuurt (indien - NLX wordt gebruikt). + description: Identifier of the request, traceable throughout the network required: false schema: type: string @@ -2005,113 +795,23 @@ paths: description: 'Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1.' '401': - description: Unauthorized - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/401' '403': - description: Forbidden - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/403' '404': - description: Not found - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/404' '406': - description: Not acceptable - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/406' '409': - description: Conflict - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/409' '410': - description: Gone - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/410' '415': - description: Unsupported media type - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/415' '429': - description: Too many requests - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/429' '500': - description: Internal server error - headers: - API-version: - schema: - type: string - description: 'Geeft een specifieke API-versie aan in de context van - een specifieke aanroep. Voorbeeld: 1.2.1.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Fout' + $ref: '#/components/responses/500' tags: - besluitinformatieobjecten security: @@ -2125,14 +825,142 @@ paths: schema: type: string format: uuid -tags: -- name: besluiten - description: '' -- name: besluitinformatieobjecten - description: '' servers: - url: /api/v1 components: + responses: + '400': + description: Bad request + headers: + API-version: + schema: + type: string + description: 'Geeft een specifieke API-versie aan in de context van een + specifieke aanroep. Voorbeeld: 1.2.1.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ValidatieFout' + '401': + description: Unauthorized + headers: + API-version: + schema: + type: string + description: 'Geeft een specifieke API-versie aan in de context van een + specifieke aanroep. Voorbeeld: 1.2.1.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Fout' + '403': + description: Forbidden + headers: + API-version: + schema: + type: string + description: 'Geeft een specifieke API-versie aan in de context van een + specifieke aanroep. Voorbeeld: 1.2.1.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Fout' + '404': + description: Not found + headers: + API-version: + schema: + type: string + description: 'Geeft een specifieke API-versie aan in de context van een + specifieke aanroep. Voorbeeld: 1.2.1.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Fout' + '406': + description: Not acceptable + headers: + API-version: + schema: + type: string + description: 'Geeft een specifieke API-versie aan in de context van een + specifieke aanroep. Voorbeeld: 1.2.1.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Fout' + '409': + description: Conflict + headers: + API-version: + schema: + type: string + description: 'Geeft een specifieke API-versie aan in de context van een + specifieke aanroep. Voorbeeld: 1.2.1.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Fout' + '410': + description: Gone + headers: + API-version: + schema: + type: string + description: 'Geeft een specifieke API-versie aan in de context van een + specifieke aanroep. Voorbeeld: 1.2.1.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Fout' + '412': + description: Precondition failed + headers: + API-version: + schema: + type: string + description: 'Geeft een specifieke API-versie aan in de context van een + specifieke aanroep. Voorbeeld: 1.2.1.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Fout' + '415': + description: Unsupported media type + headers: + API-version: + schema: + type: string + description: 'Geeft een specifieke API-versie aan in de context van een + specifieke aanroep. Voorbeeld: 1.2.1.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Fout' + '429': + description: Too many requests + headers: + API-version: + schema: + type: string + description: 'Geeft een specifieke API-versie aan in de context van een + specifieke aanroep. Voorbeeld: 1.2.1.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Fout' + '500': + description: Internal server error + headers: + API-version: + schema: + type: string + description: 'Geeft een specifieke API-versie aan in de context van een + specifieke aanroep. Voorbeeld: 1.2.1.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Fout' requestBodies: Besluit: content: @@ -2401,19 +1229,17 @@ components: Uitleg bij mogelijke waarden: - * `ac` - Autorisatiecomponent - - * `nrc` - Notificatierouteringcomponent + * `ac` - Autorisaties API - * `zrc` - Zaakregistratiecomponent + * `nrc` - Notificaties API - * `ztc` - Zaaktypecatalogus + * `zrc` - Zaken API - * `drc` - Documentregistratiecomponent + * `ztc` - Catalogi API - * `brc` - Besluitregistratiecomponent + * `drc` - Documenten API - * `kic` - Klantinteractiescomponent' + * `brc` - Besluiten API' type: string enum: - ac @@ -2422,13 +1248,6 @@ components: - ztc - drc - brc - - kic - requestId: - title: Request id - description: Een globaal "request" ID om een verzoek door het netwerk heen - te traceren. - type: string - maxLength: 255 applicatieId: title: Applicatie id description: Unieke identificatie van de applicatie, binnen de organisatie. diff --git a/src/resources.md b/src/resources.md index 082c010..15067e5 100755 --- a/src/resources.md +++ b/src/resources.md @@ -43,14 +43,12 @@ Objecttype op [GEMMA Online](https://www.gemmaonline.nl/index.php/Rgbz_1.0/doc/o Uitleg bij mogelijke waarden: -* `ac` - Autorisatiecomponent -* `nrc` - Notificatierouteringcomponent -* `zrc` - Zaakregistratiecomponent -* `ztc` - Zaaktypecatalogus -* `drc` - Documentregistratiecomponent -* `brc` - Besluitregistratiecomponent -* `kic` - Klantinteractiescomponent | string | ja | C​R​U​D | -| requestId | Een globaal "request" ID om een verzoek door het netwerk heen te traceren. | string | nee | C​R​U​D | +* `ac` - Autorisaties API +* `nrc` - Notificaties API +* `zrc` - Zaken API +* `ztc` - Catalogi API +* `drc` - Documenten API +* `brc` - Besluiten API | string | ja | C​R​U​D | | applicatieId | Unieke identificatie van de applicatie, binnen de organisatie. | string | nee | C​R​U​D | | applicatieWeergave | Vriendelijke naam van de applicatie. | string | nee | C​R​U​D | | gebruikersId | Unieke identificatie van de gebruiker die binnen de organisatie herleid kan worden naar een persoon. | string | nee | C​R​U​D | diff --git a/src/swagger2.0.json b/src/swagger2.0.json index f1168fa..775b084 100755 --- a/src/swagger2.0.json +++ b/src/swagger2.0.json @@ -2,9 +2,9 @@ "swagger": "2.0", "info": { "title": "Besluiten API", - "description": "Een API om een besluitregistratiecomponent (BRC) te benaderen.\n\nEen BESLUIT wordt veelal schriftelijk vastgelegd maar dit is niet\nnoodzakelijk. Omgekeerd kan het voorkomen dat in een INFORMATIEOBJECT meerdere\nbesluiten vastgelegd zijn. Vandaar de N:M-relatie naar INFORMATIEOBJECT. Een\nbesluit komt voort uit een zaak van de zaakbehandelende organisatie dan wel is\neen besluit van een andere organisatie dat het onderwerp (object) is van een\nzaak van de zaakbehandelende organisatie. BESLUIT heeft dan ook een optionele\nrelatie met de ZAAK waarvan het een uitkomst is.\n\nDe typering van BESLUITen is in de Catalogi API (ZTC) ondergebracht in de vorm\nvan BESLUITTYPEn.\n\n**Afhankelijkheden**\n\nDeze API is afhankelijk van:\n\n* Catalogi API\n* Notificaties API\n* Documenten API *(optioneel)*\n* Zaken API *(optioneel)*\n* Autorisaties API *(optioneel)*\n\n**Autorisatie**\n\nDeze API vereist autorisatie. Je kan de\n[token-tool](https://zaken-auth.vng.cloud/) gebruiken om JWT-tokens te\ngenereren.\n\n### Notificaties\n\nDeze API publiceert notificaties op het kanaal `besluiten`.\n\n**Main resource**\n\n`besluit`\n\n\n\n**Kenmerken**\n\n* `verantwoordelijke_organisatie`: Het RSIN van de niet-natuurlijk persoon zijnde de organisatie die het besluit heeft vastgesteld.\n* `besluittype`: URL-referentie naar het BESLUITTYPE (in de Catalogi API).\n\n**Resources en acties**\n- `besluit`: create, update, destroy\n- `besluitinformatieobject`: create, destroy\n\n\n**Handige links**\n\n* [Documentatie](https://zaakgerichtwerken.vng.cloud/standaard)\n* [Zaakgericht werken](https://zaakgerichtwerken.vng.cloud)\n", + "description": "Een API om een besluitregistratiecomponent (BRC) te benaderen.\n\nEen BESLUIT wordt veelal schriftelijk vastgelegd maar dit is niet\nnoodzakelijk. Omgekeerd kan het voorkomen dat in een INFORMATIEOBJECT meerdere\nbesluiten vastgelegd zijn. Vandaar de N:M-relatie naar INFORMATIEOBJECT. Een\nbesluit komt voort uit een zaak van de zaakbehandelende organisatie dan wel is\neen besluit van een andere organisatie dat het onderwerp (object) is van een\nzaak van de zaakbehandelende organisatie. BESLUIT heeft dan ook een optionele\nrelatie met de ZAAK waarvan het een uitkomst is.\n\nDe typering van BESLUITen is in de Catalogi API (ZTC) ondergebracht in de vorm\nvan BESLUITTYPEn.\n\n**Afhankelijkheden**\n\nDeze API is afhankelijk van:\n\n* Catalogi API\n* Notificaties API\n* Documenten API *(optioneel)*\n* Zaken API *(optioneel)*\n* Autorisaties API *(optioneel)*\n\n**Autorisatie**\n\nDeze API vereist autorisatie. Je kan de\n[token-tool](https://zaken-auth.vng.cloud/) gebruiken om JWT-tokens te\ngenereren.\n\n### Notificaties\n\nDeze API publiceert notificaties op het kanaal `besluiten`.\n\n**Main resource**\n\n`besluit`\n\n\n\n**Kenmerken**\n\n* `verantwoordelijke_organisatie`: Het RSIN van de niet-natuurlijk persoon zijnde de organisatie die het besluit heeft vastgesteld.\n* `besluittype`: URL-referentie naar het BESLUITTYPE (in de Catalogi API).\n\n**Resources en acties**\n- `besluit`: create, update, destroy\n- `besluitinformatieobject`: create, destroy\n\n\n**Handige links**\n\n* [Documentatie](https://vng-realisatie.github.io/gemma-zaken/standaard)\n* [Zaakgericht werken](https://vng-realisatie.github.io/gemma-zaken)\n", "contact": { - "url": "https://zaakgerichtwerken.vng.cloud", + "url": "https://vng-realisatie.github.io/gemma-zaken", "email": "standaarden.ondersteuning@vng.nl" }, "license": { @@ -118,130 +118,31 @@ } }, "400": { - "description": "Bad request", - "schema": { - "$ref": "#/definitions/ValidatieFout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/400" }, "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/401" }, "403": { - "description": "Forbidden", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/403" }, "406": { - "description": "Not acceptable", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/406" }, "409": { - "description": "Conflict", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/409" }, "410": { - "description": "Gone", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/410" }, "415": { - "description": "Unsupported media type", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/415" }, "429": { - "description": "Too many requests", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/429" }, "500": { - "description": "Internal server error", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/500" } }, "tags": [ @@ -269,16 +170,9 @@ } }, { - "name": "X-NLX-Request-Application-Id", - "in": "header", - "description": "Identificatie van de applicatie die het verzoek stuurt (indien NLX wordt gebruikt).", - "required": false, - "type": "string" - }, - { - "name": "X-NLX-Request-User-Id", + "name": "X-NLX-Logrecord-ID", "in": "header", - "description": "Identificatie van de gebruiker die het verzoek stuurt (indien NLX wordt gebruikt).", + "description": "Identifier of the request, traceable throughout the network", "required": false, "type": "string" }, @@ -313,130 +207,31 @@ } }, "400": { - "description": "Bad request", - "schema": { - "$ref": "#/definitions/ValidatieFout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/400" }, "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/401" }, "403": { - "description": "Forbidden", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/403" }, "406": { - "description": "Not acceptable", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/406" }, "409": { - "description": "Conflict", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/409" }, "410": { - "description": "Gone", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/410" }, "415": { - "description": "Unsupported media type", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/415" }, "429": { - "description": "Too many requests", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/429" }, "500": { - "description": "Internal server error", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/500" } }, "tags": [ @@ -477,37 +272,63 @@ } }, "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/401" }, "403": { - "description": "Forbidden", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/403" }, "406": { - "description": "Not acceptable", + "$ref": "#/responses/406" + }, + "409": { + "$ref": "#/responses/409" + }, + "410": { + "$ref": "#/responses/410" + }, + "415": { + "$ref": "#/responses/415" + }, + "429": { + "$ref": "#/responses/429" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "tags": [ + "besluiten" + ], + "security": [ + { + "JWT-Claims": [ + "audittrails.lezen" + ] + } + ] + }, + "parameters": [ + { + "name": "besluit_uuid", + "in": "path", + "required": true, + "type": "string", + "format": "uuid", + "description": "Unieke resource identifier (UUID4)" + } + ] + }, + "/besluiten/{besluit_uuid}/audittrail/{uuid}": { + "get": { + "operationId": "audittrail_read", + "summary": "Een specifieke audit trail regel opvragen.", + "description": "Een specifieke audit trail regel opvragen.", + "parameters": [], + "responses": { + "200": { + "description": "OK", "schema": { - "$ref": "#/definitions/Fout" + "$ref": "#/definitions/AuditTrail" }, "headers": { "API-version": { @@ -518,75 +339,32 @@ } } }, - "409": { - "description": "Conflict", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + }, + "406": { + "$ref": "#/responses/406" + }, + "409": { + "$ref": "#/responses/409" }, "410": { - "description": "Gone", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/410" }, "415": { - "description": "Unsupported media type", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/415" }, "429": { - "description": "Too many requests", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/429" }, "500": { - "description": "Internal server error", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/500" } }, "tags": [ @@ -608,44 +386,30 @@ "type": "string", "format": "uuid", "description": "Unieke resource identifier (UUID4)" + }, + { + "name": "uuid", + "in": "path", + "description": "Unieke identificatie van de audit regel.", + "required": true, + "type": "string", + "format": "uuid" } ] }, - "/besluiten/{besluit_uuid}/audittrail/{uuid}": { + "/besluiten/{uuid}": { "get": { - "operationId": "audittrail_read", - "summary": "Een specifieke audit trail regel opvragen.", - "description": "Een specifieke audit trail regel opvragen.", - "parameters": [ - { - "name": "If-None-Match", - "in": "header", - "description": "Voer een voorwaardelijk verzoek uit. Deze header moet \u00e9\u00e9n of meerdere ETag-waardes bevatten van resources die de consumer gecached heeft. Indien de waarde van de ETag van de huidige resource voorkomt in deze set, dan antwoord de provider met een lege HTTP 304 request. Zie [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match) voor meer informatie.", - "required": false, - "type": "string", - "examples": { - "multipleValues": { - "summary": "Meerdere ETag-waardes", - "value": "\"79054025255fb1a26e4bc422aef54eb4\", \"e4d909c290d0fb1ca068ffaddf22cbd0\"" - }, - "oneValue": { - "summary": "E\u00e9n ETag-waarde", - "value": "\"79054025255fb1a26e4bc422aef54eb4\"" - } - } - } - ], + "operationId": "besluit_read", + "summary": "Een specifiek BESLUIT opvragen.", + "description": "Een specifiek BESLUIT opvragen.", + "parameters": [], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/AuditTrail" + "$ref": "#/definitions/Besluit" }, "headers": { - "ETag": { - "description": "De ETag berekend op de response body JSON. Indien twee resources exact dezelfde ETag hebben, dan zijn deze resources identiek aan elkaar. Je kan de ETag gebruiken om caching te implementeren.", - "type": "string" - }, "API-version": { "schema": { "type": "string" @@ -655,130 +419,31 @@ } }, "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/401" }, "403": { - "description": "Forbidden", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/403" }, "404": { - "description": "Not found", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/404" }, "406": { - "description": "Not acceptable", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/406" }, "409": { - "description": "Conflict", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/409" }, "410": { - "description": "Gone", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/410" }, "415": { - "description": "Unsupported media type", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/415" }, "429": { - "description": "Too many requests", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/429" }, "500": { - "description": "Internal server error", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/500" } }, "tags": [ @@ -787,52 +452,37 @@ "security": [ { "JWT-Claims": [ - "audittrails.lezen" + "besluiten.lezen" ] } ] }, - "parameters": [ - { - "name": "besluit_uuid", - "in": "path", - "required": true, - "type": "string", - "format": "uuid", - "description": "Unieke resource identifier (UUID4)" - }, - { - "name": "uuid", - "in": "path", - "description": "Unieke identificatie van de audit regel.", - "required": true, - "type": "string", - "format": "uuid" - } - ] - }, - "/besluiten/{uuid}": { - "get": { - "operationId": "besluit_read", - "summary": "Een specifiek BESLUIT opvragen.", - "description": "Een specifiek BESLUIT opvragen.", + "put": { + "operationId": "besluit_update", + "summary": "Werk een BESLUIT in zijn geheel bij.", + "description": "Er wordt gevalideerd op:\n- uniciteit van `verantwoorlijkeOrganisatie` + `identificatie`\n- geldigheid `verantwoorlijkeOrganisatie` RSIN\n- het `besluittype` mag niet gewijzigd worden\n- geldigheid `zaak` URL - de resource moet opgevraagd kunnen worden\n uit de Zaken API en de vorm van een ZAAK hebben.\n- `datum` in het verleden of nu\n- publicatie `besluittype` - `concept` moet `false` zijn", "parameters": [ { - "name": "If-None-Match", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Besluit" + } + }, + { + "name": "X-NLX-Logrecord-ID", "in": "header", - "description": "Voer een voorwaardelijk verzoek uit. Deze header moet \u00e9\u00e9n of meerdere ETag-waardes bevatten van resources die de consumer gecached heeft. Indien de waarde van de ETag van de huidige resource voorkomt in deze set, dan antwoord de provider met een lege HTTP 304 request. Zie [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match) voor meer informatie.", + "description": "Identifier of the request, traceable throughout the network", "required": false, - "type": "string", - "examples": { - "multipleValues": { - "summary": "Meerdere ETag-waardes", - "value": "\"79054025255fb1a26e4bc422aef54eb4\", \"e4d909c290d0fb1ca068ffaddf22cbd0\"" - }, - "oneValue": { - "summary": "E\u00e9n ETag-waarde", - "value": "\"79054025255fb1a26e4bc422aef54eb4\"" - } - } + "type": "string" + }, + { + "name": "X-Audit-Toelichting", + "in": "header", + "description": "Toelichting waarom een bepaald verzoek wordt gedaan", + "required": false, + "type": "string" } ], "responses": { @@ -842,10 +492,6 @@ "$ref": "#/definitions/Besluit" }, "headers": { - "ETag": { - "description": "De ETag berekend op de response body JSON. Indien twee resources exact dezelfde ETag hebben, dan zijn deze resources identiek aan elkaar. Je kan de ETag gebruiken om caching te implementeren.", - "type": "string" - }, "API-version": { "schema": { "type": "string" @@ -854,182 +500,35 @@ } } }, + "400": { + "$ref": "#/responses/400" + }, "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/401" }, "403": { - "description": "Forbidden", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/403" }, "404": { - "description": "Not found", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/404" }, "406": { - "description": "Not acceptable", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/406" }, "409": { - "description": "Conflict", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/409" }, "410": { - "description": "Gone", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/410" }, "415": { - "description": "Unsupported media type", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/415" }, "429": { - "description": "Too many requests", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/429" }, "500": { - "description": "Internal server error", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - } - }, - "tags": [ - "besluiten" - ], - "security": [ - { - "JWT-Claims": [ - "besluiten.lezen" - ] - } - ] - }, - "head": { - "operationId": "besluit_headers", - "summary": "De headers voor een specifiek(e) BESLUIT opvragen", - "description": "Vraag de headers op die je bij een GET request zou krijgen.", - "parameters": [ - { - "name": "If-None-Match", - "in": "header", - "description": "Voer een voorwaardelijk verzoek uit. Deze header moet \u00e9\u00e9n of meerdere ETag-waardes bevatten van resources die de consumer gecached heeft. Indien de waarde van de ETag van de huidige resource voorkomt in deze set, dan antwoord de provider met een lege HTTP 304 request. Zie [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match) voor meer informatie.", - "required": false, - "type": "string", - "examples": { - "multipleValues": { - "summary": "Meerdere ETag-waardes", - "value": "\"79054025255fb1a26e4bc422aef54eb4\", \"e4d909c290d0fb1ca068ffaddf22cbd0\"" - }, - "oneValue": { - "summary": "E\u00e9n ETag-waarde", - "value": "\"79054025255fb1a26e4bc422aef54eb4\"" - } - } - } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "ETag": { - "description": "De ETag berekend op de response body JSON. Indien twee resources exact dezelfde ETag hebben, dan zijn deze resources identiek aan elkaar. Je kan de ETag gebruiken om caching te implementeren.", - "type": "string" - }, - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/500" } }, "tags": [ @@ -1038,14 +537,14 @@ "security": [ { "JWT-Claims": [ - "besluiten.lezen" + "besluiten.bijwerken" ] } ] }, - "put": { - "operationId": "besluit_update", - "summary": "Werk een BESLUIT in zijn geheel bij.", + "patch": { + "operationId": "besluit_partial_update", + "summary": "Werk een BESLUIT deels bij.", "description": "Er wordt gevalideerd op:\n- uniciteit van `verantwoorlijkeOrganisatie` + `identificatie`\n- geldigheid `verantwoorlijkeOrganisatie` RSIN\n- het `besluittype` mag niet gewijzigd worden\n- geldigheid `zaak` URL - de resource moet opgevraagd kunnen worden\n uit de Zaken API en de vorm van een ZAAK hebben.\n- `datum` in het verleden of nu\n- publicatie `besluittype` - `concept` moet `false` zijn", "parameters": [ { @@ -1057,16 +556,9 @@ } }, { - "name": "X-NLX-Request-Application-Id", - "in": "header", - "description": "Identificatie van de applicatie die het verzoek stuurt (indien NLX wordt gebruikt).", - "required": false, - "type": "string" - }, - { - "name": "X-NLX-Request-User-Id", + "name": "X-NLX-Logrecord-ID", "in": "header", - "description": "Identificatie van de gebruiker die het verzoek stuurt (indien NLX wordt gebruikt).", + "description": "Identifier of the request, traceable throughout the network", "required": false, "type": "string" }, @@ -1094,144 +586,34 @@ } }, "400": { - "description": "Bad request", - "schema": { - "$ref": "#/definitions/ValidatieFout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/400" }, "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/401" }, "403": { - "description": "Forbidden", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/403" }, "404": { - "description": "Not found", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/404" }, "406": { - "description": "Not acceptable", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/406" }, "409": { - "description": "Conflict", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/409" }, "410": { - "description": "Gone", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/410" }, "415": { - "description": "Unsupported media type", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/415" }, "429": { - "description": "Too many requests", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/429" }, "500": { - "description": "Internal server error", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/500" } }, "tags": [ @@ -1245,30 +627,15 @@ } ] }, - "patch": { - "operationId": "besluit_partial_update", - "summary": "Werk een BESLUIT deels bij.", - "description": "Er wordt gevalideerd op:\n- uniciteit van `verantwoorlijkeOrganisatie` + `identificatie`\n- geldigheid `verantwoorlijkeOrganisatie` RSIN\n- het `besluittype` mag niet gewijzigd worden\n- geldigheid `zaak` URL - de resource moet opgevraagd kunnen worden\n uit de Zaken API en de vorm van een ZAAK hebben.\n- `datum` in het verleden of nu\n- publicatie `besluittype` - `concept` moet `false` zijn", + "delete": { + "operationId": "besluit_delete", + "summary": "Verwijder een BESLUIT.", + "description": "Verwijder een BESLUIT samen met alle gerelateerde resources binnen deze API.\n\n**De gerelateerde resources zijn**\n- `BESLUITINFORMATIEOBJECT`\n- audit trail regels", "parameters": [ { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Besluit" - } - }, - { - "name": "X-NLX-Request-Application-Id", + "name": "X-NLX-Logrecord-ID", "in": "header", - "description": "Identificatie van de applicatie die het verzoek stuurt (indien NLX wordt gebruikt).", - "required": false, - "type": "string" - }, - { - "name": "X-NLX-Request-User-Id", - "in": "header", - "description": "Identificatie van de gebruiker die het verzoek stuurt (indien NLX wordt gebruikt).", + "description": "Identifier of the request, traceable throughout the network", "required": false, "type": "string" }, @@ -1281,25 +648,8 @@ } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Besluit" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "#/definitions/ValidatieFout" - }, + "204": { + "description": "No content", "headers": { "API-version": { "schema": { @@ -1310,307 +660,31 @@ } }, "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "404": { - "description": "Not found", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "406": { - "description": "Not acceptable", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "409": { - "description": "Conflict", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "410": { - "description": "Gone", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "415": { - "description": "Unsupported media type", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "429": { - "description": "Too many requests", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - } - }, - "tags": [ - "besluiten" - ], - "security": [ - { - "JWT-Claims": [ - "besluiten.bijwerken" - ] - } - ] - }, - "delete": { - "operationId": "besluit_delete", - "summary": "Verwijder een BESLUIT.", - "description": "Verwijder een BESLUIT samen met alle gerelateerde resources binnen deze API.\n\n**De gerelateerde resources zijn**\n- `BESLUITINFORMATIEOBJECT`\n- audit trail regels", - "parameters": [ - { - "name": "X-NLX-Request-Application-Id", - "in": "header", - "description": "Identificatie van de applicatie die het verzoek stuurt (indien NLX wordt gebruikt).", - "required": false, - "type": "string" - }, - { - "name": "X-NLX-Request-User-Id", - "in": "header", - "description": "Identificatie van de gebruiker die het verzoek stuurt (indien NLX wordt gebruikt).", - "required": false, - "type": "string" - }, - { - "name": "X-Audit-Toelichting", - "in": "header", - "description": "Toelichting waarom een bepaald verzoek wordt gedaan", - "required": false, - "type": "string" - } - ], - "responses": { - "204": { - "description": "No content", - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/401" }, "403": { - "description": "Forbidden", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/403" }, "404": { - "description": "Not found", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/404" }, "406": { - "description": "Not acceptable", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/406" }, "409": { - "description": "Conflict", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/409" }, "410": { - "description": "Gone", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/410" }, "415": { - "description": "Unsupported media type", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/415" }, "429": { - "description": "Too many requests", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/429" }, "500": { - "description": "Internal server error", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/500" } }, "tags": [ @@ -1676,130 +750,31 @@ } }, "400": { - "description": "Bad request", - "schema": { - "$ref": "#/definitions/ValidatieFout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/400" }, "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/401" }, "403": { - "description": "Forbidden", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/403" }, "406": { - "description": "Not acceptable", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/406" }, "409": { - "description": "Conflict", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/409" }, "410": { - "description": "Gone", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/410" }, "415": { - "description": "Unsupported media type", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/415" }, "429": { - "description": "Too many requests", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/429" }, "500": { - "description": "Internal server error", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/500" } }, "tags": [ @@ -1816,7 +791,7 @@ "post": { "operationId": "besluitinformatieobject_create", "summary": "Maak een BESLUIT-INFORMATIEOBJECT relatie aan.", - "description": "Registreer een INFORMATIEOBJECT bij een BESLUIT. Er worden twee types van\nrelaties met andere objecten gerealiseerd:\n\n**Er wordt gevalideerd op**\n- geldigheid `besluit` URL\n- geldigheid `informatieobject` URL\n- de combinatie `informatieobject` en `besluit` moet uniek zijn\n- `informatieobject.informatieobjecttype` moet in het ZTC gerelateerd zijn\n aan `besluit.besluittype`\n\n**Opmerkingen**\n- De `registratiedatum` wordt door het systeem op 'NU' gezet. De\n `aardRelatie` wordt ook door het systeem gezet.\n- Bij het aanmaken wordt ook in de Documenten API de gespiegelde relatie\n aangemaakt, echter zonder de relatie-informatie.", + "description": "Registreer een INFORMATIEOBJECT bij een BESLUIT. Er worden twee types van\nrelaties met andere objecten gerealiseerd:\n\n**Er wordt gevalideerd op**\n- geldigheid `besluit` URL\n- geldigheid `informatieobject` URL\n- de combinatie `informatieobject` en `besluit` moet uniek zijn\n\n**Opmerkingen**\n- De `registratiedatum` wordt door het systeem op 'NU' gezet. De\n `aardRelatie` wordt ook door het systeem gezet.\n- Bij het aanmaken wordt ook in de Documenten API de gespiegelde relatie\n aangemaakt, echter zonder de relatie-informatie.", "parameters": [ { "name": "data", @@ -1827,16 +802,9 @@ } }, { - "name": "X-NLX-Request-Application-Id", + "name": "X-NLX-Logrecord-ID", "in": "header", - "description": "Identificatie van de applicatie die het verzoek stuurt (indien NLX wordt gebruikt).", - "required": false, - "type": "string" - }, - { - "name": "X-NLX-Request-User-Id", - "in": "header", - "description": "Identificatie van de gebruiker die het verzoek stuurt (indien NLX wordt gebruikt).", + "description": "Identifier of the request, traceable throughout the network", "required": false, "type": "string" }, @@ -1852,281 +820,7 @@ "201": { "description": "Created", "schema": { - "$ref": "#/definitions/BesluitInformatieObject" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - }, - "Location": { - "schema": { - "type": "string", - "format": "uri" - }, - "description": "URL waar de resource leeft." - } - } - }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "#/definitions/ValidatieFout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "406": { - "description": "Not acceptable", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "409": { - "description": "Conflict", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "410": { - "description": "Gone", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "415": { - "description": "Unsupported media type", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "429": { - "description": "Too many requests", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - } - }, - "tags": [ - "besluitinformatieobjecten" - ], - "security": [ - { - "JWT-Claims": [ - "besluiten.aanmaken" - ] - } - ] - }, - "parameters": [] - }, - "/besluitinformatieobjecten/{uuid}": { - "get": { - "operationId": "besluitinformatieobject_read", - "summary": "Een specifieke BESLUIT-INFORMATIEOBJECT relatie opvragen.", - "description": "Een specifieke BESLUIT-INFORMATIEOBJECT relatie opvragen.", - "parameters": [ - { - "name": "If-None-Match", - "in": "header", - "description": "Voer een voorwaardelijk verzoek uit. Deze header moet \u00e9\u00e9n of meerdere ETag-waardes bevatten van resources die de consumer gecached heeft. Indien de waarde van de ETag van de huidige resource voorkomt in deze set, dan antwoord de provider met een lege HTTP 304 request. Zie [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match) voor meer informatie.", - "required": false, - "type": "string", - "examples": { - "multipleValues": { - "summary": "Meerdere ETag-waardes", - "value": "\"79054025255fb1a26e4bc422aef54eb4\", \"e4d909c290d0fb1ca068ffaddf22cbd0\"" - }, - "oneValue": { - "summary": "E\u00e9n ETag-waarde", - "value": "\"79054025255fb1a26e4bc422aef54eb4\"" - } - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/BesluitInformatieObject" - }, - "headers": { - "ETag": { - "description": "De ETag berekend op de response body JSON. Indien twee resources exact dezelfde ETag hebben, dan zijn deze resources identiek aan elkaar. Je kan de ETag gebruiken om caching te implementeren.", - "type": "string" - }, - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "404": { - "description": "Not found", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "406": { - "description": "Not acceptable", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "409": { - "description": "Conflict", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "410": { - "description": "Gone", - "schema": { - "$ref": "#/definitions/Fout" + "$ref": "#/definitions/BesluitInformatieObject" }, "headers": { "API-version": { @@ -2134,50 +828,42 @@ "type": "string" }, "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } - }, - "415": { - "description": "Unsupported media type", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { + }, + "Location": { "schema": { - "type": "string" + "type": "string", + "format": "uri" }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." + "description": "URL waar de resource leeft." } } }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "406": { + "$ref": "#/responses/406" + }, + "409": { + "$ref": "#/responses/409" + }, + "410": { + "$ref": "#/responses/410" + }, + "415": { + "$ref": "#/responses/415" + }, "429": { - "description": "Too many requests", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/429" }, "500": { - "description": "Internal server error", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/500" } }, "tags": [ @@ -2186,42 +872,26 @@ "security": [ { "JWT-Claims": [ - "besluiten.lezen" + "besluiten.aanmaken" ] } ] }, - "head": { - "operationId": "besluitinformatieobject_headers", - "summary": "De headers voor een specifiek(e) BESLUITINFORMATIEOBJECT opvragen", - "description": "Vraag de headers op die je bij een GET request zou krijgen.", - "parameters": [ - { - "name": "If-None-Match", - "in": "header", - "description": "Voer een voorwaardelijk verzoek uit. Deze header moet \u00e9\u00e9n of meerdere ETag-waardes bevatten van resources die de consumer gecached heeft. Indien de waarde van de ETag van de huidige resource voorkomt in deze set, dan antwoord de provider met een lege HTTP 304 request. Zie [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match) voor meer informatie.", - "required": false, - "type": "string", - "examples": { - "multipleValues": { - "summary": "Meerdere ETag-waardes", - "value": "\"79054025255fb1a26e4bc422aef54eb4\", \"e4d909c290d0fb1ca068ffaddf22cbd0\"" - }, - "oneValue": { - "summary": "E\u00e9n ETag-waarde", - "value": "\"79054025255fb1a26e4bc422aef54eb4\"" - } - } - } - ], + "parameters": [] + }, + "/besluitinformatieobjecten/{uuid}": { + "get": { + "operationId": "besluitinformatieobject_read", + "summary": "Een specifieke BESLUIT-INFORMATIEOBJECT relatie opvragen.", + "description": "Een specifieke BESLUIT-INFORMATIEOBJECT relatie opvragen.", + "parameters": [], "responses": { "200": { "description": "OK", + "schema": { + "$ref": "#/definitions/BesluitInformatieObject" + }, "headers": { - "ETag": { - "description": "De ETag berekend op de response body JSON. Indien twee resources exact dezelfde ETag hebben, dan zijn deze resources identiek aan elkaar. Je kan de ETag gebruiken om caching te implementeren.", - "type": "string" - }, "API-version": { "schema": { "type": "string" @@ -2229,6 +899,33 @@ "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." } } + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + }, + "406": { + "$ref": "#/responses/406" + }, + "409": { + "$ref": "#/responses/409" + }, + "410": { + "$ref": "#/responses/410" + }, + "415": { + "$ref": "#/responses/415" + }, + "429": { + "$ref": "#/responses/429" + }, + "500": { + "$ref": "#/responses/500" } }, "tags": [ @@ -2248,16 +945,9 @@ "description": "Verwijder een BESLUIT-INFORMATIEOBJECT relatie.", "parameters": [ { - "name": "X-NLX-Request-Application-Id", - "in": "header", - "description": "Identificatie van de applicatie die het verzoek stuurt (indien NLX wordt gebruikt).", - "required": false, - "type": "string" - }, - { - "name": "X-NLX-Request-User-Id", + "name": "X-NLX-Logrecord-ID", "in": "header", - "description": "Identificatie van de gebruiker die het verzoek stuurt (indien NLX wordt gebruikt).", + "description": "Identifier of the request, traceable throughout the network", "required": false, "type": "string" }, @@ -2282,130 +972,31 @@ } }, "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/401" }, "403": { - "description": "Forbidden", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/403" }, "404": { - "description": "Not found", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/404" }, "406": { - "description": "Not acceptable", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/406" }, "409": { - "description": "Conflict", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/409" }, "410": { - "description": "Gone", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/410" }, "415": { - "description": "Unsupported media type", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/415" }, "429": { - "description": "Too many requests", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/429" }, "500": { - "description": "Internal server error", - "schema": { - "$ref": "#/definitions/Fout" - }, - "headers": { - "API-version": { - "schema": { - "type": "string" - }, - "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." - } - } + "$ref": "#/responses/500" } }, "tags": [ @@ -2711,7 +1302,7 @@ }, "bron": { "title": "Bron", - "description": "De naam van het component waar de wijziging in is gedaan.\n\nUitleg bij mogelijke waarden:\n\n* `ac` - Autorisatiecomponent\n* `nrc` - Notificatierouteringcomponent\n* `zrc` - Zaakregistratiecomponent\n* `ztc` - Zaaktypecatalogus\n* `drc` - Documentregistratiecomponent\n* `brc` - Besluitregistratiecomponent\n* `kic` - Klantinteractiescomponent", + "description": "De naam van het component waar de wijziging in is gedaan.\n\nUitleg bij mogelijke waarden:\n\n* `ac` - Autorisaties API\n* `nrc` - Notificaties API\n* `zrc` - Zaken API\n* `ztc` - Catalogi API\n* `drc` - Documenten API\n* `brc` - Besluiten API", "type": "string", "enum": [ "ac", @@ -2719,16 +1310,9 @@ "zrc", "ztc", "drc", - "brc", - "kic" + "brc" ] }, - "requestId": { - "title": "Request id", - "description": "Een globaal \"request\" ID om een verzoek door het netwerk heen te traceren.", - "type": "string", - "maxLength": 255 - }, "applicatieId": { "title": "Applicatie id", "description": "Unieke identificatie van de applicatie, binnen de organisatie.", @@ -2853,14 +1437,160 @@ } } }, - "tags": [ - { - "name": "besluiten", - "description": "" + "responses": { + "400": { + "description": "Bad request", + "schema": { + "$ref": "#/definitions/ValidatieFout" + }, + "headers": { + "API-version": { + "schema": { + "type": "string" + }, + "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." + } + } }, - { - "name": "besluitinformatieobjecten", - "description": "" + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Fout" + }, + "headers": { + "API-version": { + "schema": { + "type": "string" + }, + "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." + } + } + }, + "403": { + "description": "Forbidden", + "schema": { + "$ref": "#/definitions/Fout" + }, + "headers": { + "API-version": { + "schema": { + "type": "string" + }, + "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." + } + } + }, + "404": { + "description": "Not found", + "schema": { + "$ref": "#/definitions/Fout" + }, + "headers": { + "API-version": { + "schema": { + "type": "string" + }, + "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." + } + } + }, + "406": { + "description": "Not acceptable", + "schema": { + "$ref": "#/definitions/Fout" + }, + "headers": { + "API-version": { + "schema": { + "type": "string" + }, + "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." + } + } + }, + "409": { + "description": "Conflict", + "schema": { + "$ref": "#/definitions/Fout" + }, + "headers": { + "API-version": { + "schema": { + "type": "string" + }, + "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." + } + } + }, + "410": { + "description": "Gone", + "schema": { + "$ref": "#/definitions/Fout" + }, + "headers": { + "API-version": { + "schema": { + "type": "string" + }, + "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." + } + } + }, + "412": { + "description": "Precondition failed", + "schema": { + "$ref": "#/definitions/Fout" + }, + "headers": { + "API-version": { + "schema": { + "type": "string" + }, + "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." + } + } + }, + "415": { + "description": "Unsupported media type", + "schema": { + "$ref": "#/definitions/Fout" + }, + "headers": { + "API-version": { + "schema": { + "type": "string" + }, + "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." + } + } + }, + "429": { + "description": "Too many requests", + "schema": { + "$ref": "#/definitions/Fout" + }, + "headers": { + "API-version": { + "schema": { + "type": "string" + }, + "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/Fout" + }, + "headers": { + "API-version": { + "schema": { + "type": "string" + }, + "description": "Geeft een specifieke API-versie aan in de context van een specifieke aanroep. Voorbeeld: 1.2.1." + } + } } - ] + } }