So this fix focuses on order of checks performed when validating.
So for example we were checking everything even when some where mutually exclusive. Previously we'd check for upstream even when the Path was already disabled.
Sample API I used for testing:
openapi: 3.0.0
servers:
- url: http://localhost:8080
info:
title: simple-api
version: 0.1.0
description: A simple API example to test Kusk Gateway with
license:
name: MIT
url: https://github.com/kubeshop/kusk-gateway/blob/main/LICENSE
paths:
/hello:
x-kusk:
disabled: true
upstream:
service:
name: hello-world-svc
namespace: default
port: 8080
# mocking:
# enabled: true
# redirect:
# scheme_redirect: https
# host_redirect: thenewhost.com
# response_code: 302
get:
summary: Returns a Hello world to the user
responses:
'200':
description: A simple hello world!
content:
application/json; charset=utf-8:
schema:
type: object
properties:
message:
type: string
required:
- message
So this fix focuses on order of checks performed when validating.
So for example we were checking everything even when some where mutually exclusive. Previously we'd check for upstream even when the Path was already disabled.
Sample API I used for testing:
Signed-off-by: jasmingacic jasmin.gacic@gmail.com