Comments (10)
Note that removing theMyDocument.other_doc
field makes the example work again.
from jina.
Hey @NarekA,
Thanks for reporting the issue. If you have a fix proposal we would be glad to get the contribution
from jina.
Of these solutions, do any of them make more sense to you?
Use http get with a body. See this link
Sending a body with a GET request has an undefined behavior in the specifications, nevertheless, it is supported by FastAPI, only for very complex/extreme use cases.
I like this one, but it looks like fastAPI might not include the fields in the docs.
- Use a different http method
The best solution if it's possible
- Serialize/deserialize the fields before IO.
Might make more sense to serialize the whole object as one param rather than try serializing individual params
Any reason we can't use http post
?
from jina.
@JoanFM Any reason this is using get?
from jina.
@alaeddine-13 may have better insights as per this
from jina.
@NarekA Actually the convention when implementing SSE in HTTP is to use GET methods instead of POST. The drawback of using GET is having to serialize the document as query string parameters. However, developers can use clients that follow the convention when using SSE. For instance, mozilla's js client EventSource implements SSE client using GET method.
I suggest flattening your document schema in case
@JoanFM I remember wanting to include a duplicate POST method for such a case, such that, if you want to follow convention -> use GET endpoint and if you want nested schemas -> use POST endpoint
from jina.
@alaeddine-13 we are currently working around this by "flattening" the document, but that effectively removes any benefits of the upgrade to Docarray V2. It also means that the framework doesn't support all docarray inputs (for http at least) and that should be communicated. Would it be hard to create a second endpoint? I could look into this one if it helps.
from jina.
We are definitely going to look into solving this issue. Yoy are right, in the Documentation is not stated
from jina.
@JoanFM @alaeddine-13 I drafted a PR that seems to fix this issue for me: https://github.com/jina-ai/jina/pull/6091/files
from jina.
It seems nice @NarekA,
I added some comments to the PR
from jina.
Related Issues (20)
- Release Notes 3.21.1
- Migrate Website to Docusaurus 2 Alpha HOT 2
- Release Note (3.22.0)
- Release Notes (3.22.1)
- How to set GET method? HOT 10
- Topology graph Key Error (After Jina 3.21.0) HOT 5
- Support docarray pydantic v2 HOT 12
- Release Note (3.22.2) HOT 3
- Update the Twitter Logo. HOT 20
- Release Note HOT 1
- Suggestions For Improving Testing HOT 2
- Release Note
- TransformerTorchEncoder Install Cannot Find torch Version HOT 6
- Have Deployments Call Extend API When No Gateway HOT 2
- How to import logic from other modules in executor.py ? HOT 2
- Release Notes
- opentelemetry-exporter-prometheus version conflict
- Release Note
- Will the Pydantic dependency be upgraded in the future?Currently, due to version issues, some third-party packages are incompatible. HOT 10
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 jina.