Comments (1)
As far as I know, this is only useful server-side, so the SDK structs should not contain these annotations at all.
This is actually the annotation that we use to serialize query parameters sent from the SDK. This approach is inspired by Google's go-querystring, but our approach includes a few minor differences and improvements for types specific to Fern.
These annotations are only useful in request types and so should not be in every model struct.
Now that we support deepObject
query parameters (link), it's important that we include url
tags in every object contained in the transitive closure from every request type. For example, using your example above, we actually support specifying the User
as a query parameter.
Instead, they should be only in named request types.
This is actually something we debated when rolling out the feature to begin with. Including them everywhere upfront will actually enable us to someday roll out a new RequestOption
that allows us to add arbitrary query parameters to individual endpoints (where the query parameter is not already defined on the API). We haven't needed this feature yet, but it's been discussed a bit here and there so I know it might be on the horizon.
With all that said, we made the decision to include them everywhere knowing that we could later change the behavior to include them in a stricter subset (like you're suggesting), but I'm still not convinced that we should do that in general (especially with that new upcoming feature in mind).
from fern.
Related Issues (20)
- [Feature] Investigate the scope of fixing the auto-generated Cosmos SDK OpenAPI spec HOT 1
- Updating to `0.18.1` throws error when running `fern generate --docs` HOT 1
- [Bug] Express generator fails with `Unrecognized key "whitelabel"` HOT 1
- [Feature] Python should be able to automatically cast strings to enums and throw runtime error where this is not possible HOT 1
- [Bug] Code fences show line numbers regardless of code language HOT 1
- [Bug] Manifest unknown for fern-typescript-express 0.9.7 HOT 1
- [Feature] Improve search by adding context in search results HOT 1
- [Feature] Support more detailed errors within Python generator in JSON parsing
- [Bug] Inconsistencies between Fern Definition availability and x-fern-availability extension HOT 2
- [Bug] fern-generate --docs --preview output shows production url HOT 1
- [Bug] Colon's in Meta Tags Break Formatting in Docs HOT 2
- [Bug] TypeScript generator docs list wrong latest version HOT 2
- [Bug] fernapi/fern-typescript-browser-sdk does not generate project files HOT 3
- [Bug] Using `require` to import `node-fetch` breaks when output is ESM HOT 1
- [Feature] Support OpenAPI3 "style" parameters in SDK generators
- [Fern's Documentation] Update "Publish a Java SDK to Maven Central" Registration Process HOT 1
- [Bug] PackageNotFoundError when getting the version of the current package HOT 8
- [Feature] How to remove a generated doc url from my account?
- [Bug] Color of custom icons in Callout component
- [Bug] Incorrect Sizing on Custom Icons on Callout Component
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 fern.