Skip to content

importing openapi file that contains extended field "x-apisix-..." doesnt work on apisix dashboard #2971

Open
@SatriyoJati

Description

@SatriyoJati

Issue description

When I try to import openapi file containing extended field to apisix dashboard routes as like shown in this guide : https://apisix.apache.org/docs/dashboard/2.6/IMPORT_OPENAPI_USER_GUIDE/ , fileds that start with "x-apisix-..." , those are not imported.
image

Expected behavior

the "x-apisix.." fields should also imported to the dashboard : plugins, upstream, even the published status, but they are not imported.

How to Reproduce

  1. prepare openapi docs file containing "x-apisix-..." field. like this :
openapi: 3.0.0
info:
 version: 1.0.0-oas3
 description: test desc
 license:
   name: Apache License 2.0
   url: 'http://www.apache.org/licenses/LICENSE-2.0'
 title: test title
paths:
 /hello:
   get:
     description: hello world.
     operationId: hello
     x-apisix-upstream:
       type: roundrobin
       nodes:
         - host: 172.16.238.20
           port: 1980
           weight: 1
     x-apisix-plugins:
       limit-count:  
         count: 2
         time_window: 60
         rejected_code: 503
         key: remote_addr
     x-apisix-status: 0
     responses:
       '200':
         description: list response
       default:
         description: unexpected error 
  1. Open apisix dashboard, then go to Route Tab, open Advance and Import the openapi file.

Screenshots

image

image

image

Environment

  • apisix version : 3.10
  • OS : Windows 11
  • etcd version : 3.5.11
  • apisix-dashboard : 3.0.1

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions