I'm trying to import an OpenApi3.0 file to Apisix (from Apisix Dashboard), but I can't get it to work as expected (or probably I'm missing something)
I have the following:
- An upstream created and set up
- A service created and set up using the previous upstream
I'm trying to import a OpenApi3.0 yml file like this (exactly this):
openapi: 3.0.0
info:
title: REST API
description: ""
version: 1.0.0
paths:
/order:
post:
description: Test description.
x-apisix-service_id: 438901282904736682
labels:
environment: test
The service_id is the id of the service previously created
Then, I went to Routes panel, clicked on Advanced->Import, selected "test" as Task Name and uploaded my file.
What I expect is that when I go to the "Configure" page on the newly created route, it shows my service associated, but this didn't happen as shown below. Not only the service is not being associated, but also my labels and description are blank.
The route generated by the import, without service associated, labels and description
I'm using:
- Apisix 3.0.0 (I tried with 2.15 but it's the same)
- Apisix Dashboard 2.15 (I also tried with 2.14 but it's the same)
What I'm doing wrong? Or maybe it's a bug with Apisix Dashboard?
As far as I know, the version of the OpenAPI definition that still supports this format is
2.13.x
.In the new version
2.14.0
and2.15.0
, the community has introduced a new data loader implementation, which currently aims to prioritize support in the standard OpenAPI 3 specification (but still falls short) and does not add support for the old APISIX custom fields (x-apisix-xxxx
) for now.If you have a strong need for this, you will have to continue using APISIX Dashboard
2.13.x
.