jaymin2609 opened a new issue, #12622:
URL: https://github.com/apache/apisix/issues/12622
### Current Behavior
- I am trying to create route with `upstream_id` from the dashboard ui.
- After adding details, and click on `Add` button it showing error :
-` invalid configuration: property "upstream" validation failed: value
should match only one schema, but matches none`
- Issue is with JSON generated from the dashboard UI
> {
> "uri": "/api/*",
> "methods": [
> "GET",
> "POST",
> "PUT"
> ],
> "upstream": {
> "scheme": "https",
> "type": "roundrobin",
> "hash_on": "vars",
> "pass_host": "pass",
> "tls": {
> "verify": false
> }
> },
> "upstream_id": "00000000000000004635",
> "enable_websocket": false,
> "priority": 0,
> "status": 1,
> "name": "test"
> }
- Devtool screenshots:
<img width="1365" height="584" alt="Image"
src="https://github.com/user-attachments/assets/1e8d653e-4b47-42c5-a292-82cec48c9fa6"
/>
<img width="1365" height="712" alt="Image"
src="https://github.com/user-attachments/assets/0f3f7477-605c-4a33-a959-3e13d8c6abb4"
/>
- Postman screenshots with Admin API: Error
<img width="935" height="526" alt="Image"
src="https://github.com/user-attachments/assets/fed9307f-283f-44ac-a819-f6cd0e998ecd"
/>
### Expected Behavior
- Dahboard ui should generate the valid JSON :
> {
> "uri": "/api/*",
> "methods": [
> "GET",
> "POST",
> "PUT"
> ],
> "upstream_id": "00000000000000004635",
> "enable_websocket": false,
> "priority": 0,
> "status": 1,
> "name": "test"
> }
- Postman screenshot with valid JSON: Success
<img width="961" height="555" alt="Image"
src="https://github.com/user-attachments/assets/6b1e0aa0-e0e6-46b8-8fa8-cfbdabc5d57c"
/>
### Error Logs
- Error message:
`invalid configuration: property \"upstream\" validation failed: value
should match only one schema, but matches none`
### Steps to Reproduce
1. Run APISIX with docker
`docker-compose -p docker-apisix up -d`
3. Open dashboard ui from : `http://localhost:9180/ui`
4. Navigate to `Routes`
5. Add Route
6. Details : <img width="1353" height="673" alt="Image"
src="https://github.com/user-attachments/assets/54ce2950-58d9-4e10-9912-2fdd3039521a"
/>
<img width="1355" height="673" alt="Image"
src="https://github.com/user-attachments/assets/194905fc-6209-4264-a046-49a9859403b0"
/>
<img width="1359" height="681" alt="Image"
src="https://github.com/user-attachments/assets/56028e70-1efe-4e0e-a1cb-aa50107650be"
/>
<img width="1360" height="679" alt="Image"
src="https://github.com/user-attachments/assets/db1d5a44-ec67-42c1-a401-7f920904c7af"
/>
<img width="1364" height="674" alt="Image"
src="https://github.com/user-attachments/assets/47167161-6e7b-450a-afc1-ce4127c2b44b"
/>
<img width="1364" height="678" alt="Image"
src="https://github.com/user-attachments/assets/d52ec154-6c9b-4de5-a2eb-fe080968c2d7"
/>
<img width="1365" height="683" alt="Image"
src="https://github.com/user-attachments/assets/f9df1cbd-d2aa-4580-b32d-a29d56543b14"
/>
<img width="1361" height="672" alt="Image"
src="https://github.com/user-attachments/assets/38faba24-52d1-49fa-be59-74b0637ff915"
/>
<img width="1360" height="674" alt="Image"
src="https://github.com/user-attachments/assets/83cf3a4e-bdad-43e4-9f61-95cf3c10dcf9"
/>
<img width="1365" height="686" alt="Image"
src="https://github.com/user-attachments/assets/19564ff0-a1dc-4789-b662-4c48037f5b75"
/>
<img width="1362" height="671" alt="Image"
src="https://github.com/user-attachments/assets/83735c62-b6dc-4b89-8b47-f4020b176c9f"
/>
### Environment
APISIX docker compose file `docker-compose.yml`
```
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# version: "3"
services:
apisix:
#build: .
image: apache/apisix:${APISIX_IMAGE_TAG:-3.13.0-debian}
restart: always
volumes:
- ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
-
./plugins/my-plugin.lua:/usr/local/apisix/apisix/plugins/my-plugin.lua:ro
- apisix_logs:/usr/local/apisix/logs
environment:
- APISIX_LISTEN_ADDRESS=/tmp/runner.sock
- APISIX_CONF_EXPIRE_TIME=7200
depends_on:
- etcd
- loki
##network_mode: host
ports:
- "80:80"
- "9180:9180/tcp"
- "9080:9080/tcp"
- "9091:9091/tcp"
- "9443:9443/tcp"
- "9092:9092/tcp"
networks:
apisix:
etcd:
image: bitnami/etcd:3.5.11
restart: always
volumes:
- etcd_data:/bitnami/etcd
environment:
ETCD_ENABLE_V2: "true"
ALLOW_NONE_AUTHENTICATION: "yes"
ETCD_ADVERTISE_CLIENT_URLS: "http://etcd:2379"
ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
ports:
- "2379:2379/tcp"
networks:
apisix:
prometheus:
image: prom/prometheus:v2.25.0
restart: always
volumes:
- ./prometheus_conf/prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
networks:
apisix:
grafana:
image: grafana/grafana:12.2.0-17389662039-ubuntu
restart: always
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=${GF_SECURITY_ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD}
- GF_AUTH_ANONYMOUS_ENABLED=${GF_AUTH_ANONYMOUS_ENABLED}
volumes:
- "./grafana_conf/provisioning:/etc/grafana/provisioning"
- "./grafana_conf/dashboards:/var/lib/grafana/dashboards"
- "./grafana_conf/config/grafana.ini:/etc/grafana/grafana.ini"
networks:
apisix:
loki:
image: grafana/loki:3.2.1
restart: always
command: -config.file=/etc/loki/local-config.yaml
volumes:
- ./loki_confg/local-config.yaml:/etc/loki/local-config.yaml
- ./loki_data:/tmp/loki
ports:
- "3100:3100"
networks:
apisix:
promtail:
image: grafana/promtail:2.9.0
restart: always
volumes:
- ./promtail_conf/promtail-config.yml:/etc/promtail/promtail.yml
- apisix_logs:/var/log/apisix
- promtail_positions:/tmp
command: -config.file=/etc/promtail/promtail.yml
networks:
apisix:
depends_on:
- loki
networks:
apisix:
driver: bridge
volumes:
etcd_data:
driver: local
apisix_logs:
driver: local
promtail_positions:
# loki_data:
# driver: local
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]