From 6e0e0b7690ed15413408e5164d33e64e52874e07 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Mon, 11 Nov 2019 12:07:41 +0100 Subject: [PATCH] Test for varnish trough the eeacms/varnish component --- CHANGELOG.md | 5 + api/Dockerfile | 11 +- api/docker/varnish/conf/agent_secret | 1 + api/docker/varnish/conf/default.vcl | 30 +-- api/helm/templates/api-deployment.yaml | 16 +- api/helm/templates/api-loadbalancer.yaml | 6 +- api/helm/templates/api-service.yaml | 12 +- api/helm/templates/php-deployment.yaml | 21 +- api/helm/templates/php-service.yaml | 12 +- api/helm/templates/varnish-deployment.yaml | 17 +- api/helm/templates/varnish-service.yaml | 12 +- api/helm/values.yaml | 1 + api/public/schema/openapi.yaml | 224 +++++++++++++++------ docker-compose.yml | 2 +- 14 files changed, 235 insertions(+), 135 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 api/docker/varnish/conf/agent_secret diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..12501b42 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog + +## 2019-11-11 (v.0.0.1) + +- Initial public release \ No newline at end of file diff --git a/api/Dockerfile b/api/Dockerfile index 3e02fac6..1b028ba9 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -137,16 +137,17 @@ COPY --from=api_platform_php /srv/api/public public/ # "varnish" stage # ############################# # does not depend on any of the above stages, but placed here to keep everything in one Dockerfile -FROM cooptilleuls/varnish:${VARNISH_VERSION}-alpine AS api_platform_varnish -#FROM eeacms/varnish AS api_platform_varnish +#FROM cooptilleuls/varnish:${VARNISH_VERSION}-alpine AS api_platform_varnish +FROM eeacms/varnish AS api_platform_varnish #FROM varnish:6.3 AS api_platform_varnish +COPY docker/varnish/conf/default.vcl /etc/varnish/conf.d/ # Lets install envsubst -RUN apk --no-cache add gettext +#RUN apk --no-cache add gettext -COPY docker/varnish/conf /usr/local/etc/varnish/ +#COPY docker/varnish/conf /usr/local/etc/varnish/ -RUN envsubst '$PHP_SERVICE' < /usr/local/etc/varnish/default.vcl.template > /usr/local/etc/varnish/default.vcl +#RUN envsubst '$PHP_SERVICE' < /usr/local/etc/varnish/default.vcl.template > /usr/local/etc/varnish/default.vcl # Lets parse the toml file # RUN envsubst < /usr/local/etc/varnish/default.vcl.template > /usr/local/etc/varnish/default.vcl diff --git a/api/docker/varnish/conf/agent_secret b/api/docker/varnish/conf/agent_secret new file mode 100644 index 00000000..8a5c9a66 --- /dev/null +++ b/api/docker/varnish/conf/agent_secret @@ -0,0 +1 @@ +admin:admin diff --git a/api/docker/varnish/conf/default.vcl b/api/docker/varnish/conf/default.vcl index ee4b45c3..ff8d2496 100644 --- a/api/docker/varnish/conf/default.vcl +++ b/api/docker/varnish/conf/default.vcl @@ -1,10 +1,10 @@ vcl 4.0; -import std; +#import std; -backend default { - .host = "php"; - .port = "80"; +#backend default { + # .host = "php"; + # .port = "80"; # Health check #.probe = { # .url = "/"; @@ -13,17 +13,17 @@ backend default { # .window = 5; # .threshold = 3; #} -} +#} # Hosts allowed to send BAN requests -acl invalidators { - "localhost"; - "php"; +#acl invalidators { +# "localhost"; +# "php"; # local Kubernetes network - "10.0.0.0"/8; - "172.16.0.0"/12; - "192.168.0.0"/16; -} +# "10.0.0.0"/8; +# "172.16.0.0"/12; +# "192.168.0.0"/16; +#} sub vcl_recv { if (req.restarts > 0) { @@ -35,9 +35,9 @@ sub vcl_recv { # To allow API Platform to ban by cache tags if (req.method == "BAN") { - if (client.ip !~ invalidators) { - return (synth(405, "Not allowed")); - } + #if (client.ip !~ invalidators) { + # return (synth(405, "Not allowed")); + #} if (req.http.ApiPlatform-Ban-Regex) { ban("obj.http.Cache-Tags ~ " + req.http.ApiPlatform-Ban-Regex); diff --git a/api/helm/templates/api-deployment.yaml b/api/helm/templates/api-deployment.yaml index 28a49457..2a195137 100644 --- a/api/helm/templates/api-deployment.yaml +++ b/api/helm/templates/api-deployment.yaml @@ -1,26 +1,26 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: {{ include "name" . }}-{{ .Values.settings.env }}-nginx + name: {{ include "name" . }}-nginx labels: - app.kubernetes.io/name: {{ include "name" . }}-{{ .Values.settings.env }}-nginx - app.kubernetes.io/part-of: {{ include "name" . }}-{{ .Values.settings.env }} + app.kubernetes.io/name: {{ include "name" . }}-nginx + app.kubernetes.io/part-of: {{ include "name" . }} helm.sh/chart: {{ include "chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }}-{{ .Values.settings.env }} + app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: replicas: 1 template: metadata: labels: - app.kubernetes.io/name: {{ include "name" . }}-{{ .Values.settings.env }}-nginx - app.kubernetes.io/part-of: {{ include "name" . }}-{{ .Values.settings.env }} + app.kubernetes.io/name: {{ include "name" . }}-nginx + app.kubernetes.io/part-of: {{ include "name" . }} helm.sh/chart: {{ include "chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }}-{{ .Values.settings.env }} + app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: containers: - - name: {{ include "name" . }}-{{ .Values.settings.env }}-nginx + - name: {{ include "name" . }}-nginx image: "{{ .Values.settings.registryBase }}/{{ .Values.settings.projectName }}-nginx:{{ .Values.settings.env }}" imagePullPolicy: {{ .Values.settings.pullPolicy }} ports: diff --git a/api/helm/templates/api-loadbalancer.yaml b/api/helm/templates/api-loadbalancer.yaml index 770eb5bd..67a2f44a 100644 --- a/api/helm/templates/api-loadbalancer.yaml +++ b/api/helm/templates/api-loadbalancer.yaml @@ -2,11 +2,11 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "name" . }}-{{ .Values.settings.env }}-api-loadbalancer + name: {{ include "name" . }}-api-loadbalancer spec: selector: - app.kubernetes.io/name: {{ include "name" . }}-{{ .Values.settings.env }}-nginx - app.kubernetes.io/instance: {{ .Release.Name }}-{{ .Values.settings.env }} + app.kubernetes.io/name: {{ include "name" . }}-nginx + app.kubernetes.io/instance: {{ .Release.Name }} type: LoadBalancer ports: - protocol: TCP diff --git a/api/helm/templates/api-service.yaml b/api/helm/templates/api-service.yaml index 7f198043..6915c2ca 100644 --- a/api/helm/templates/api-service.yaml +++ b/api/helm/templates/api-service.yaml @@ -1,12 +1,12 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "name" . }}-{{ .Values.settings.env }} + name: {{ include "name" . }} labels: - app.kubernetes.io/name: {{ include "name" . }}-{{ .Values.settings.env }} - app.kubernetes.io/part-of: {{ include "name" . }}-{{ .Values.settings.env }} + app.kubernetes.io/name: {{ include "name" . } + app.kubernetes.io/part-of: {{ include "name" . }} helm.sh/chart: {{ include "chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }}-{{ .Values.settings.env }} + app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: type: NodePort @@ -15,5 +15,5 @@ spec: targetPort: 80 protocol: TCP selector: - app.kubernetes.io/name: {{ include "name" . }}-{{ .Values.settings.env }}-nginx - app.kubernetes.io/instance: {{ .Release.Name }}-{{ .Values.settings.env }} + app.kubernetes.io/name: {{ include "name" . }}-nginx + app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/api/helm/templates/php-deployment.yaml b/api/helm/templates/php-deployment.yaml index 4baa30aa..bd471b70 100644 --- a/api/helm/templates/php-deployment.yaml +++ b/api/helm/templates/php-deployment.yaml @@ -1,26 +1,26 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: {{ include "name" . }}-{{ .Values.settings.env }}-php + name: {{ include "name" . }}-php labels: - app.kubernetes.io/name: {{ include "name" . }}-{{ .Values.settings.env }}-php - app.kubernetes.io/part-of: {{ include "name" . }}-{{ .Values.settings.env }} + app.kubernetes.io/name: {{ include "name" . }}-php + app.kubernetes.io/part-of: {{ include "name" . }} helm.sh/chart: {{ include "chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }}-{{ .Values.settings.env }} + app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: replicas: {{ .Values.php.replicaCount }} template: metadata: labels: - app.kubernetes.io/name: {{ include "name" . }}-{{ .Values.settings.env }}-php - app.kubernetes.io/part-of: {{ include "name" . }}-{{ .Values.settings.env }} + app.kubernetes.io/name: {{ include "name" . }}-php + app.kubernetes.io/part-of: {{ include "name" . }} helm.sh/chart: {{ include "chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }}-{{ .Values.settings.env }} + app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: containers: - - name: {{ include "name" . }}-{{ .Values.settings.env }}-php + - name: {{ include "name" . }}-php image: "{{ .Values.settings.registryBase }}/{{ .Values.settings.projectName }}-php:{{ .Values.settings.env }}" imagePullPolicy: {{ .Values.settings.pullPolicy }} ports: @@ -63,10 +63,7 @@ spec: name: {{ template "fullname" . }} key: cors-allow-origin - name: VARNISH_URL - valueFrom: - configMapKeyRef: - name: {{ template "fullname" . }} - key: varnish-url + value: {{ include "name" . }}-varnish - name: APP_SECRET valueFrom: secretKeyRef: diff --git a/api/helm/templates/php-service.yaml b/api/helm/templates/php-service.yaml index ce957939..7f213a47 100644 --- a/api/helm/templates/php-service.yaml +++ b/api/helm/templates/php-service.yaml @@ -1,17 +1,17 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "name" . }}-{{ .Values.settings.env }}-php + name: {{ include "name" . }}-php labels: - app.kubernetes.io/name: {{ include "name" . }}-{{ .Values.settings.env }}-php - app.kubernetes.io/part-of: {{ include "name" . }}-{{ .Values.settings.env }} + app.kubernetes.io/name: {{ include "name" . }}-php + app.kubernetes.io/part-of: {{ include "name" . }} helm.sh/chart: {{ include "chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }}-{{ .Values.settings.env }} + app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: type: ClusterIP ports: - port: 9000 selector: - app.kubernetes.io/name: {{ include "name" . }}-{{ .Values.settings.env }}-php - app.kubernetes.io/instance: {{ .Release.Name }}-{{ .Values.settings.env }} + app.kubernetes.io/name: {{ include "name" . }}-php + app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/api/helm/templates/varnish-deployment.yaml b/api/helm/templates/varnish-deployment.yaml index 87a4bcb7..325f938f 100644 --- a/api/helm/templates/varnish-deployment.yaml +++ b/api/helm/templates/varnish-deployment.yaml @@ -2,19 +2,19 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: {{ include "name" . }}-{{ .Values.settings.env }}-varnish + name: {{ include "name" . }}-varnish labels: - app.kubernetes.io/name: {{ include "name" . }}-{{ .Values.settings.env }}-varnish - app.kubernetes.io/part-of: {{ include "name" . }}-{{ .Values.settings.env }} + app.kubernetes.io/name: {{ include "name" . }}-varnish + app.kubernetes.io/part-of: {{ include "name" . }} helm.sh/chart: {{ include "chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }}-{{ .Values.settings.env }} + app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: replicas: {{ .Values.varnish.replicaCount }} template: metadata: labels: - app.kubernetes.io/name: {{ include "name" . }}-{{ .Values.settings.env }}-varnish + app.kubernetes.io/name: {{ include "name" . }}-varnish helm.sh/chart: {{ include "chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} @@ -23,8 +23,11 @@ spec: - name: {{ include "name" . }}-varnish image: "{{ .Values.settings.registryBase }}/{{ .Values.settings.projectName }}-varnish:{{ .Values.settings.env }}" imagePullPolicy: {{ .Values.settings.pullPolicy }} - command: ["varnishd"] - args: ["-F", "-f", "/usr/local/etc/varnish/default.vcl", "-p", "http_resp_hdr_len=65536", "-p", "http_resp_size=98304"] + env: + - name: BACKENDS + value: {{ include "name" . }}-php + #command: ["varnishd"] + #args: ["-F", "-f", "/usr/local/etc/varnish/default.vcl", "-p", "http_resp_hdr_len=65536", "-p", "http_resp_size=98304"] ports: - containerPort: 80 livenessProbe: diff --git a/api/helm/templates/varnish-service.yaml b/api/helm/templates/varnish-service.yaml index 9c90c4da..7943479f 100644 --- a/api/helm/templates/varnish-service.yaml +++ b/api/helm/templates/varnish-service.yaml @@ -2,12 +2,12 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "name" . }}-{{ .Values.settings.env }}-varnish + name: {{ include "name" . }}-varnish labels: - app.kubernetes.io/name: {{ include "name" . }}-{{ .Values.settings.env }}-varnish - app.kubernetes.io/part-of: {{ include "name" . }}-{{ .Values.settings.env }} + app.kubernetes.io/name: {{ include "name" . }}-varnish + app.kubernetes.io/part-of: {{ include "name" . }} helm.sh/chart: {{ include "chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }}-{{ .Values.settings.env }} + app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: type: NodePort @@ -16,6 +16,6 @@ spec: targetPort: 80 protocol: TCP selector: - app.kubernetes.io/name: {{ include "name" . }}-{{ .Values.settings.env }}-varnish - app.kubernetes.io/instance: {{ .Release.Name }}-{{ .Values.settings.env }} + app.kubernetes.io/name: {{ include "name" . }}-varnish + app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} diff --git a/api/helm/values.yaml b/api/helm/values.yaml index b53a056a..fd5426c0 100644 --- a/api/helm/values.yaml +++ b/api/helm/values.yaml @@ -5,6 +5,7 @@ settings: registryBase: docker.io/conduction projectName: pc + version: dev env: dev debug: 1 replicaCount: 1 diff --git a/api/public/schema/openapi.yaml b/api/public/schema/openapi.yaml index 753a595d..cb1cc166 100644 --- a/api/public/schema/openapi.yaml +++ b/api/public/schema/openapi.yaml @@ -32,42 +32,42 @@ paths: schema: type: array items: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/ld+json: schema: type: array items: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/vnd.api+json: schema: type: array items: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/json: schema: type: array items: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/xml: schema: type: array items: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/x-yaml: schema: type: array items: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' text/csv: schema: type: array items: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' text/html: schema: type: array items: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' parameters: - name: like_name @@ -117,6 +117,44 @@ paths: name: X-Audit-Clarification description: 'A clarification as to why a request has been made (doelbinding)' in: header + - + name: 'extend[]' + required: false + description: 'An array of nested objects to include in the return object' + in: query + schema: + type: array + - + name: 'fields[]' + required: false + description: 'An array of fields to return in output, wil return all fields is not supplied' + in: query + schema: + type: array + - + name: validOn + required: false + description: 'Returns object as valid on a given date time' + schema: + type: string + format: date-time + in: query + - + name: validFrom + required: false + description: 'Returns objects valid from a given date time' + schema: + type: string + format: date-time + in: query + - + name: validUntil + required: false + description: 'Returns objects valid until a given date time' + schema: + type: string + format: date-time + in: query post: tags: - ExampleEntity @@ -128,28 +166,28 @@ paths: content: application/hal+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/ld+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/vnd.api+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/xml: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/x-yaml: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' text/csv: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' text/html: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' links: GetExampleEntityItem: parameters: @@ -164,28 +202,28 @@ paths: content: application/hal+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' application/ld+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' application/vnd.api+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' application/json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' application/xml: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' application/x-yaml: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' text/csv: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' text/html: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' description: 'The new ExampleEntity resource' parameters: - @@ -259,34 +297,72 @@ paths: name: X-Audit-Clarification description: 'A clarification as to why a request has been made (doelbinding)' in: header + - + name: 'extend[]' + required: false + description: 'An array of nested objects to include in the return object' + in: query + schema: + type: array + - + name: 'fields[]' + required: false + description: 'An array of fields to return in output, wil return all fields is not supplied' + in: query + schema: + type: array + - + name: validOn + required: false + description: 'Returns object as valid on a given date time' + schema: + type: string + format: date-time + in: query + - + name: validFrom + required: false + description: 'Returns objects valid from a given date time' + schema: + type: string + format: date-time + in: query + - + name: validUntil + required: false + description: 'Returns objects valid until a given date time' + schema: + type: string + format: date-time + in: query responses: 200: description: 'ExampleEntity resource response' content: application/hal+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/ld+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/vnd.api+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/xml: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/x-yaml: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' text/csv: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' text/html: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' 404: description: 'Resource not found' delete: @@ -382,28 +458,28 @@ paths: content: application/hal+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/ld+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/vnd.api+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/xml: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/x-yaml: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' text/csv: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' text/html: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' 400: description: 'Invalid input' 404: @@ -412,28 +488,28 @@ paths: content: application/hal+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' application/ld+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' application/vnd.api+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' application/json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' application/xml: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' application/x-yaml: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' text/csv: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' text/html: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' description: 'The updated ExampleEntity resource' patch: tags: @@ -482,28 +558,28 @@ paths: content: application/hal+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/ld+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/vnd.api+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/xml: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' application/x-yaml: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' text/csv: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' text/html: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-read' 400: description: 'Invalid input' 404: @@ -512,41 +588,57 @@ paths: content: application/hal+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' application/ld+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' application/vnd.api+json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' application/json: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' application/xml: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' application/x-yaml: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' text/csv: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' text/html: schema: - $ref: '#/components/schemas/ExampleEntity' + $ref: '#/components/schemas/ExampleEntity-write' description: 'The updated ExampleEntity resource' components: schemas: - ExampleEntity: + ExampleEntity-read: type: object description: '' properties: id: readOnly: true - type: integer + type: string + name: + description: 'The name of this example property' + type: string + description: + description: 'The description of this example property' + type: string + required: + - name + ExampleEntity-write: + type: object + description: '' + required: + - name + properties: name: + description: 'The name of this example property' type: string description: + description: 'The description of this example property' type: string host: irc.zaakonline.nl servers: diff --git a/docker-compose.yml b/docker-compose.yml index 0663610f..1506d754 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -79,7 +79,7 @@ services: ports: - "8081:80" environment: - - PHP_SERVICE=api + - BACKENDS=php nlx-outway: image: ${CONTAINER_REGISTRY_BASE}/${CONTAINER_PROJECT_NAME}-nlx-outway:${APP_ENV}