Comments (5)
I think we'll need more detail to understand what's the problem :)
From what version to which one did you update?
What's the endpoint's definition? And what is an example failing request?
from tapir.
It has been quite a while since we last updated the version. Specifically, we were using version 0.19.4 before updating to the latest release.
the issue is we have two end points (importJobs) and (import-jobs), before updating the version both 2 end points were working fine, but after updating all the test related to (import-jobs) end point failed. I changed the (import-jobs) to (import-job) and that worked fine, so I am wondering what can be the issue?
here is the piece of code I'm referring
val importJobsOld: EndpointTypeAuthInQuery[Unit, Set[ImportJob]] =
.in("importJobs")
.name("getImportJobsOld")
.summary("Get Import Jobs")
.get
.out(jsonBody[Set[ImportJob]].addOKDes())
.description("Get a list of all import jobs")
val importJobs: EndpointTypeAuthInQuery[Unit, Set[ImportJob]] =
.in("import-jobs")
.name("getImportJobs")
.summary("Get Import Jobs")
.get
.out(jsonBody[Set[ImportJob]].addOKDes())
.description("Get a list of all import jobs")
from tapir.
I tested an endpoint using an "import-jobs"
path and everything worked correctly. A response code 405 indicates that the wrong HTTP method is used. Are you issuing GET requests as described by the endpoint defition? (which seems incomplete)
from tapir.
would you please try it with having 2 endpoints at the same time, import-jobs
and importJobs
?
the issue that we are facing is when we use 2 endpoints with the names I mentioned above.
from tapir.
Sure, works fine:
import sttp.tapir.*
import sttp.tapir.server.netty.sync.{Id, NettySyncServer}
object HelloWorldNettySyncServer extends App:
val e1 = endpoint.get
.in("import-jobs")
.out(stringBody)
.serverLogicSuccess[Id](_ => "1")
val e2 = endpoint.get
.in("importJobs")
.out(stringBody)
.serverLogicSuccess[Id](_ => "2")
NettySyncServer().addEndpoint(e1).addEndpoint(e2).startAndWait()
test:
[~]% curl http://localhost:8080/import-jobs
1
[~]% curl http://localhost:8080/importJobs
2
from tapir.
Related Issues (20)
- High latency for netty-loom POST processing HOT 4
- Let serverSecurityLogic access path values HOT 3
- [BUG] Hidden body schema appears in OpenAPI specs
- JSON codec maps None to empty body, keeps content type
- Rename NettyIdServer to NettySyncServer
- Move IntersectionTypeMirror & UnionTypeMirror to the iron integration
- Validation of endpoints against a given OpenAPI schema HOT 4
- [BUG] CORSInterceptor doesn't work with Vert.x server
- [BUG] Tapir Endpoint Incorrectly Merging Set-Cookie Headers in HTTP Response HOT 3
- [BUG] .corsInterceptor throws overloaded method with alternatives error HOT 4
- Schema of `oneOf` variants with same status code and content-type HOT 5
- Web Sockets for netty-server-loom
- [BUG] WebSocket routes always trigger error when using as part of an existing Play Application HOT 1
- tapir server to ignore any validations HOT 11
- [BUG] Websockets with zio-http can fail on too early messages on slow hosts
- [BUG] ClosedChannelException when consuming stream response body with Fs2Streams HOT 1
- Relaxed enumeratum codecs HOT 2
- [BUG] Can no longer return 304 with empty string as body - get 500 internal server error HOT 4
- [Feature] Semi-auto enum schema derivation configuration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tapir.