Giter VIP home page Giter VIP logo

fern-api / fern Goto Github PK

View Code? Open in Web Editor NEW
2.3K 14.0 106.0 1022.29 MB

๐ŸŒฟ Stripe-level SDKs and Docs for your API

Home Page: https://buildwithfern.com

License: MIT License

JavaScript 0.51% TypeScript 70.11% Shell 0.09% Dockerfile 0.10% C# 0.12% PHP 0.01% MDX 3.54% Python 10.19% Java 8.44% Makefile 0.01% Go 6.85% HTML 0.01% CSS 0.03%
sdk api openapi documentation-generator sdk-generator api-client openapi3 rest rest-client

fern's People

Contributors

abvthecity avatar adamsuskin avatar aevitas avatar amckinney avatar armandobelardo avatar codebender828 avatar connormahon34 avatar dannysheridan avatar davidkonigsberg avatar dependabot[bot] avatar dsinghvi avatar ff137 avatar gfxkai avatar handotdev avatar jkclark avatar jochs avatar kafkas avatar marvin-kolja avatar minaelee avatar mmolash avatar mscolnick avatar omarrida avatar rishan10 avatar sahil485 avatar sk-sam avatar swimburger avatar teisjayaswal avatar tjb9dc avatar yisding avatar zachkirsch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fern's Issues

Rename parameters to path-parameters

I think the yaml is cleaner when it reads like

storeTracedWorkspaceV2:
        http: POST /store-workspace-trace-v2/submission/{submissionId}
        path-parameters:
          submissionId: submission.SubmissionId
        query-parameters:
          stuff: Stuff
        body: list<submission.TraceResponseV2>

as opposed to

storeTracedWorkspaceV2:
        http: POST /store-workspace-trace-v2/submission/{submissionId}
        parameters:
          submissionId: submission.SubmissionId
        query-parameters:
          stuff: Stuff
        body: list<submission.TraceResponseV2>

Fern visualize

It would be cool if fern visualize would fire up a local ui where you can edit and changes are written back to your yaml files.
No code UI at the edge

Store exact union type shape in the IR

The rules for the wire format are a little tricky (depending on if the unioned type is an object or not). Better to encode this in the IR than to do it correctly in each plugin.

fern generate runs only one generator

fern generate --name would run that generator. The problem is that you can have the same generator multiple times so how do you differentiate across those?

Simplify http config

DayOfWeekService:
      auth: none
      endpoints:
        getCurrentDayOfWeek:
          method: GET
          path: /day-of-week
          response: DayOfWeek

Our opinion is that many devs will don't actually care about the method or path of the endpoint as long as they can declare inputs and outputs.

Fern should support devs not specifying method or path. It can default method to POST and path to the endpoint id. This provides the flexibility to integrate existing APIs while allowing devs to iterate faster on their APIs by reducing config required.

[Feature] Pagination in SDKs

The generated SDK should make it very easy to 1/ iterate over all pages, 2/ ask simple questions like .is_next_page_available(). In order to do this the Fern Definition must understand what the pagination scheme is.

Validation: Only objects are allowed to be extended

It doesn't make sense to extend union, enum, or an alias because it is unclear what the extended type would look like (i.e. why would I ever extend a union instead of adding it as a field).
We should validate that only objects are allowed to be extended.

Metrics for endpoints

I want to know:

  • Which endpoints are being hit the most?
  • Size of request/responses
  • Histogrammable & filterable errors

Other:

  • Rate limiting
  • SLA management

Support non-alphabetic enum values

Enums should have a name and value field. If the enums are alphanumeric then value defaults to name, but if not then name needs to be specified so that codegen can be done properly.

RequestId/MessageId

@zachkirsch i think every wire message should have an id that makes it very easy to trace through your api while debugging. The IDs have been invaluable in my experience and fern is in a great position to bake them in.

Can see us building a self-hostable analytics tool on top that can track those IDs and make it very easy for PMs + Devs to understand metrics/filter.

Support for reusing query parameters

@dannysheridan encountered a case where a set of endpoints take the same 10 query-params. It's annoying to copy paste them everywhere and changing one things requires you to make edits in n different places.

Should we have a concept of grouped query params?

Fern validate CLI

A command-line command of fern validate that takes my YML and checks for mistakes/errors before I run fern generate

Example spec

Add an example spec to the Fern repo. It should include Rest + Websockets.

Add support for websockets

It should be really easy for the FE to subscribe to "topics", and easy for the backend to send those updates to each FE

Best practice for organizing objects

What are the best practices about where to put objects relative to each other?

How ought a dev organize their objects as they relate to their services? I think the first object mentioned in Services should be the first listed in Objects. The second object mentioned in Services should be the second in Objects, and so on.

Could we encode the best practices in a linter or validation?

Adding validation

Creating issue where we can jot down all validations we have to add:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.