Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove old swagger #3066

Merged
merged 14 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ spar.integration-aws.yaml
integration-aws.yaml
DOCKER_ID*
swagger-ui
!charts/nginz/static/swagger-ui

services/nginz/integration-test/conf/nginz/zwagger-ui/*

deploy/dockerephemeral/build/airdock_base-all/
deploy/dockerephemeral/build/airdock_base/
Expand Down
77 changes: 0 additions & 77 deletions charts/nginz/static/swagger-ui/index.html

This file was deleted.

221 changes: 0 additions & 221 deletions charts/nginz/static/swagger-ui/tab.html

This file was deleted.

39 changes: 0 additions & 39 deletions charts/nginz/templates/conf/_nginx.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,6 @@ http {
{{- if hasKey $location "envs" -}}
{{- range $env := $location.envs -}}
{{- if or (eq $env $.Values.nginx_conf.env) (eq $env "all") -}}

{{- if and (not (eq $.Values.nginx_conf.env "prod")) ($location.doc) -}}

rewrite ^/api-docs{{ $location.path }} {{ $location.path }}/api-docs?base_url=https://{{ $.Values.nginx_conf.env }}-nginz-https.{{ $.Values.nginx_conf.external_env_domain }}/ break;
{{- end }}

{{- if $location.strip_version }}

rewrite ^/v[0-9]+({{ $location.path }}) $1;
Expand Down Expand Up @@ -326,39 +320,6 @@ http {
{{- end -}}
{{- end }}

{{ if not (eq $.Values.nginx_conf.env "prod") }}
#
# Swagger Resource Listing
#
location /api-docs {
zauth off;
default_type application/json;
root {{ $.Values.nginx_conf.swagger_root }};
index resources.json;
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Methods' "GET, POST, PUT, DELETE, OPTIONS";
add_header 'Access-Control-Allow-Headers' "$http_access_control_request_headers, DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type";
add_header 'Content-Type' 'text/plain; charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
more_set_headers 'Access-Control-Allow-Origin: $http_origin';
}

# Swagger UI
location /swagger-ui {
zauth off;
gzip off;
alias /opt/zwagger-ui;
types {
application/javascript js;
text/css css;
text/html html;
image/png png;
}
}
{{ end }}

{{- if hasKey .Values.nginx_conf "deeplink" }}
location ~* ^/deeplink.(json|html)$ {
zauth off;
Expand Down
13 changes: 0 additions & 13 deletions charts/nginz/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ spec:
annotations:
# An annotation of the configmap checksum ensures changes to the configmap cause a redeployment upon `helm upgrade`
checksum/configmap: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/swagger-ui-configmap: {{ include (print .Template.BasePath "/swagger-ui-configmap.yaml") . | sha256sum }}
checksum/swagger-resources-configmap: {{ include (print .Template.BasePath "/swagger-resources-configmap.yaml") . | sha256sum }}
checksum/secret: {{ include (print .Template.BasePath "/secret.yaml") . | sha256sum }}
fluentbit.io/parser-nginz: nginz
spec:
Expand All @@ -53,11 +51,6 @@ spec:
- name: upstreams
mountPath: /etc/wire/nginz/upstreams
readOnly: true
- name: swagger-ui
mountPath: /opt/zwagger-ui
readOnly: true
- name: swagger-resources
mountPath: {{ .Values.nginx_conf.swagger_root }}/api-docs
ports:
- name: http
containerPort: {{ .Values.config.http.httpPort }}
Expand Down Expand Up @@ -90,9 +83,3 @@ spec:
secretName: nginz
- name: upstreams
emptyDir: {}
- name: swagger-ui
configMap:
name: nginz-swagger-ui
- name: swagger-resources
configMap:
name: nginz-swagger-resources
Loading