Ordering operations not working with various url path
See original GitHub issueHi,
Following the issue raised here: https://github.com/apideck-libraries/portman/issues/423 I found that there is indeed a minimal reproductible case when we have 2 http requests without any folder:
GET /users/
POST /users/search
Here is the following openAPI yaml corresponding to that:
openapi: 3.0.0
info:
title: Sample API
description: Sample desc
version: 0.1.9
servers:
- url: http://api.example.com/v1
description: Optional server description, e.g. Main (production) server
paths:
/users:
get:
summary: Returns a list of users.
responses:
'200':
description: A JSON array of user names
content:
application/json:
schema:
type: array
items:
type: string
/users/search:
post:
summary: search for user
responses:
'201':
description: A JSON array of searched user names
content:
application/json:
schema:
type: array
items:
type: string
Given the following portman config yaml:
{
"version": 1.0,
"tests": {},
"globals": {
"orderOfOperations": ["GET::/users/", "POST::/users/search"]
}
}
I would expect to have the GET operation performed before the POST one. However, the generated collection has the the POST request before the GET, it is confirmed whenever newman is running it:
→ search for user
POST https://api.toto.com/users/search
→ Returns a list of users.
GET https://api.toto.com/users
Collection run completed.
Is there any workaround that could exist ? I could put a tag
but this does not really scale when we have like > 20 requests
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
Django URL order - pycharm - Stack Overflow
Using the URLconf defined in pyshop.urls, Django tried these URL patterns, in this order: admin/ products/ The empty path didn't match any of ......
Read more >URL maps overview | Load Balancing - Google Cloud
How URL maps work; Naming; URL map components. Order of operations; Path matcher constraints; URL maps and protocols; Simplest URL map.
Read more >Different approaches to HTTP routing in Go - Ben Hoyt
My goal here is to route the same 11 URLs with eight different approaches. These URLs are based on a subset of URLs...
Read more >URL Dispatch - Actix
URL dispatch provides a simple way for mapping URLs to handler code using a simple pattern matching language. If one of the patterns...
Read more >HTTP Request Methods – Get vs Put vs Post Explained with ...
In this article, we'll be discussing the get, put, and post HTTP methods. You'll learn what each HTTP method is used for as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Gosh yes it totally did, thanks for helping me to notice that !
@laurent-lemke If the above explanation helped you solve your issue, could you please close the item? Otherwise we will auto-close it after 7 days?