s0l4r opened a new issue, #2753:
URL: https://github.com/apache/apisix-dashboard/issues/2753

   ### Issue description
   
   When trying to import an OpenAPI specification, the following error occurs:
   
   ```
   schema validate failed: upstream_id: Must validate at least one schema 
(anyOf) upstream_id: Does not match pattern '^[a-zA-Z0-9-_.]+$'
   ```
   
   I was testing with our own API and got the same errors for each route. When 
testing a more simple example such as the Pet Store, same issue occurs.
   
   The following is the example OpenAPI spec I tested:
   https://petstore3.swagger.io/api/v3/openapi.json
   
   I tried adding the custom extension to the openapi.json file:
   ```
     "x-apisix-upstream": {
       "id": "449148007154188936",
       "timeout": {
         "connect": 6,
         "send": 6,
         "read": 6
       },
       "type": "roundrobin",
       "scheme": "http",
       "discovery_type": "kubernetes",
       "pass_host": "pass",
       "name": "petstore-api",
       "service_name": "default/petstore-api-svc:http",
       "keepalive_pool": {
         "idle_timeout": 60,
         "requests": 1000,
         "size": 320
       }
     }
   ```
   
   But still the same error. Is there something else I missed, I tried reading 
the docs at https://apisix.apache.org/docs/dashboard/IMPORT_OPENAPI_USER_GUIDE/ 
but my understanding is that APISIX will add these automatically after import?
   
   
   ### Expected behavior
   
   Able to import standard OpenAPI 3 spec.
   
   ### How to Reproduce
   
   1. Go to Route -> Advanced
   2. Click Import
   3. Select Data Loader type OpenAPI 3
   4. Enable Merge HTTP Methods
   5. Upload File
   6. Click Submit
   7. Import error occurs
   
   ### Screenshots
   
   <img width="458" alt="Screenshot 2023-02-24 at 16 44 56" 
src="https://user-images.githubusercontent.com/2366752/221222463-0880b80f-ba6d-44e8-8bbc-786c442a5c13.png";>
   
   
   ### Environment
   
   - apisix version: 3.1.1
   - apisix-dashboard version: 3.0.0
   - Browser version: Chrome 109.0.5414.119 (Official Build) (x86_64)
   
   ### Additional context
   
   _No response_


-- 
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]

Reply via email to