Top 23 OpenAPI Open-Source Projects
-
Project mention: flask is my go to for just getting a web project up and running quickly. I've heard fastapi is good but they use emojis in their docs so I refuse to use them | reddit.com/r/programmingcirclejerk | 2022-07-02
Also hilarious: https://github.com/tiangolo/fastapi/issues/3273
-
Project mention: Developing high-performing applications with Python’s FastAPI | dev.to | 2022-06-30
Open standards FastAPI is based on open standards such as OpenAPI for API creation, including declarations of path operations, body requests, parameters, security, and more.
-
Scout APM
Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.
-
swagger-ui
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
Project mention: Developing high-performing applications with Python’s FastAPI | dev.to | 2022-06-30Interactive documentation Interactive API documentation and exploration web user interfaces. Two included by default: Swagger UI, ReDoc.
-
# This is an **example** API to demonstrate features of OpenAPI specification. # It doesn't cover all OpenAPI features. For more full example check out: https://github.com/APIs-guru/petstore_extended openapi: 3.0.1 info: version: '1.0.0' # Your API version # It can be any string but it is better to use semantic versioning: http://semver.org/ # Warning: OpenAPI requires the version to be a string, but without quotation marks YAML can recognize it as a number. title: Example.com # Replace with your API title # Keep it simple. Don't add "API" or version at the end of the string. termsOfService: 'https://example.com/terms/' # [Optional] Replace with an URL to your ToS contact: email: [email protected] # [Optional] Replace with your contact email url: 'http://example.com/contact' # [Optional] Replace with link to your contact form license: name: Apache 2.0 url: 'http://www.apache.org/licenses/LICENSE-2.0.html' x-logo: url: 'https://redocly.github.io/openapi-template/logo.png' # Describe your API here, you can use GFM (https://guides.github.com/features/mastering-markdown) here description: | This is an **example** API to demonstrate features of OpenAPI specification # Introduction This API definition is intended to to be a good starting point for describing your API in [OpenAPI/Swagger format](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md). It also demonstrates features of [create-openapi-repo](https://github.com/Redocly/create-openapi-repo) tool and [Redoc](https://github.com/Redocly/Redoc) documentation engine. So beyond the standard OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/Redoc/blob/master/docs/redoc-vendor-extensions.md). # OpenAPI Specification The goal of The OpenAPI Specification is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interfaces have done for lower-level programming, OpenAPI removes the guesswork in calling the service. externalDocs: description: Find out how to create a GitHub repo for your OpenAPI definition. url: 'https://github.com/Rebilly/generator-openapi-repo' # A list of tags used by the definition with additional metadata. # The order of the tags can be used to reflect on their order by the parsing tools. tags: - name: Echo description: Example echo operations - name: User description: Operations about user servers: - url: 'http://example.com/api/v1' - url: 'https://example.com/api/v1' # Holds the relative paths to the individual endpoints. The path is appended to the # basePath in order to construct the full URL. paths: '/users/{username}': # path parameter in curly braces # parameters list that are used with each operation for this path parameters: - name: pretty_print in: query description: Pretty print response schema: type: boolean get: # documentation for GET operation for this path tags: - User # summary is up to 120 symbold but we recommend to be shortest as possible summary: Get user by user name # you can use GFM in operation description too: https://guides.github.com/features/mastering-markdown description: | Some description of the operation. You can use `markdown` here. # operationId should be unique across the whole specification operationId: getUserByName # list of parameters for the operation parameters: - name: username in: path description: The name that needs to be fetched required: true schema: type: string - name: with_email in: query description: Filter users without email schema: type: boolean # security schemas applied to this operation security: - main_auth: - 'read:users' # for oauth2 provide list of scopes here - api_key: [] responses: # list of responses '200': description: Success content: application/json: # operation response mime type schema: # response schema can be specified for each response $ref: '#/components/schemas/User' example: # response example username: user1 email: [email protected] '403': description: Forbidden '404': description: User not found # documentation for PUT operation for this path put: tags: - User summary: Updated user description: This can only be done by the logged in user. operationId: updateUser parameters: - name: username in: path description: The name that needs to be updated required: true schema: type: string security: - main_auth: - 'write:users' responses: '200': description: OK '400': description: Invalid user supplied '404': description: User not found # request body documentation requestBody: content: application/json: schema: $ref: '#/components/schemas/User' application/xml: schema: $ref: '#/components/schemas/User' description: Updated user object required: true /echo: # path parameter in curly braces post: # documentation for POST operation for this path tags: - Echo summary: Echo test description: Receive the exact message you've sent operationId: echo security: - api_key: [] - basic_auth: [] responses: '200': description: OK # document headers for this response headers: X-Rate-Limit: # Header name description: calls per hour allowed by the user schema: # Header schema type: integer format: int32 X-Expires-After: $ref: '#/components/headers/ExpiresAfter' content: application/json: schema: type: string examples: response: value: Hello world! application/xml: schema: type: string text/csv: schema: type: string requestBody: content: application/json: schema: type: string example: Hello world! application/xml: schema: type: string example: Hello world! description: Echo payload required: true # An object to hold reusable parts that can be used across the definition components: schemas: Email: description: User email address type: string format: test example: [email protected] User: type: object properties: username: description: User supplied username type: string minLength: 4 example: John78 firstName: description: User first name type: string minLength: 1 example: John lastName: description: User last name type: string minLength: 1 example: Smith email: $ref: '#/components/schemas/Email' headers: ExpiresAfter: description: date in UTC when token expires schema: type: string format: date-time # Security scheme definitions that can be used across the definition. securitySchemes: main_auth: # security definition name (you can name it as you want) # the following options are specific to oauth2 type type: oauth2 # authorization type, one of: oauth2, apiKey, http flows: implicit: authorizationUrl: 'http://example.com/api/oauth/dialog' scopes: 'read:users': read users info 'write:users': modify or remove users api_key: # security definition name (you can name it as you want) type: apiKey # The following options are specific to apiKey type in: header # Where API key will be passed: header or query name: api_key # API key parameter name basic_auth: # security definition name (you can name it as you want) type: http scheme: basic
-
If you are looking to use something that can support both http and grpc and doesn't make you hate your life, take a look at https://github.com/grpc-ecosystem/grpc-gateway
-
openapi-generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
-
full-stack-fastapi-postgresql
Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.
Project mention: Ask HN: I just got my first job and I need to learn faster and better | news.ycombinator.com | 2022-03-08I wouldn't overthink this, no ones expecting a new hire to instantly pick up the codebase. You mentioned you only got generic advice from the other developer, did you ask generic questions? It's difficult to answer vague questions. Most importantly I wouldn't extrapolate your experience at this company to sweeping generalizations about how smart you are - there's close to 0 correlation.
As for FastAPI specifically I'd check out the sample postgresql project tiangalo made, it's incredibly well put together.
[1] https://github.com/tiangolo/full-stack-fastapi-postgresql
-
SonarLint
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
-
Top Symfony with https://api-platform.com/ - if your project is API related. Have been using it for a year for a couple of projects - steep learning curve but worth it!
-
swagger-core
Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
Examples include Swagger-Core, SpringFox, NSwag / Swashbuckle, Swagger-express / HAPI-Swagger, Django-REST-Swagger / Flask-RESTplus, etc.
-
Project mention: Do you use Swagger/OpenAPI to document your APIs? If so, what is your preferred way to generate the docs? | reddit.com/r/node | 2022-05-30
If so, how do you go about generating the interface files? I recently discovered swaggo which generates OpenAPI docs from Go annotations. My Googlefoo then led me to swagger-jsdoc and openapi-comment-parser which do the same thing from JSdoc-like comments. Do you use them, do you use some other module, or do you use some other approach entirely?
-
Examples include Swagger-Core, SpringFox, NSwag / Swashbuckle, Swagger-express / HAPI-Swagger, Django-REST-Swagger / Flask-RESTplus, etc.
-
Project mention: What is the recommended way to load data for React 18? | reddit.com/r/reactjs | 2022-06-22
Alternative library - check out NSwag.
-
Project mention: Is it possible to write a well-typed controller/handler in Go? | reddit.com/r/golang | 2022-06-30
Have you looked at Goa? https://github.com/goadesign/goa
-
I'm mainly using go-restful with the go-restful-openapi extension, mainly because it's easy and you get an openapi spec out of it.
-
loopback-next
LoopBack makes it easy to build modern API applications that require complex integrations.
Project mention: loopback-next VS remult - a user suggested alternative | libhunt.com/r/loopback-next | 2022-06-26 -
connexion
Swagger/OpenAPI First framework for Python on top of Flask with automatic endpoint validation & OAuth2 support
Project mention: How much front-end knowledge is required to work in Flask? | reddit.com/r/flask | 2022-04-26I do like to use their SQLAlchemy ModelView for CRUD operations and expose a OpenAPI to it using flask based connexion project for front-end or other integration points.
-
mockoon
Mockoon is the easiest and quickest way to run mock APIs locally. No remote deployment, no account required, open source.
Mockoon offers many features, such as:
-
It's missing the greatest API testing classic Dredd! Other than that the best API testing tool I've used so far is schemathesis. It works by looking at your API specification and automatically launching hundreds of tests per endpoint. It also leverages advanced OpenAPI documentation strategies such as links to test the relationship between various endpoints.
-
autorest
OpenAPI (f.k.a Swagger) Specification code generator. Supports C#, PowerShell, Go, Java, Node.js, TypeScript, Python
Project mention: The Collison Brothers Built Stripe into a $95B Unicorn | news.ycombinator.com | 2022-05-26I wonder if there is a format for API -> client automation that can be good enough, in the end Stripe have a rest API, with enough description it should be possible.
Okay so after a quick google it appears Microsoft are the "Simpsons already done it" of the programming world: https://github.com/Azure/autorest/
It'd probably be a good idea to add an Elixir backend for that and point it at Stripe's API here: https://github.com/stripe/openapi
-
Project mention: I wrote okjson - A fast, simple, and pythonic JSON Schema Validator | reddit.com/r/Python | 2022-03-31
I had a requirement to process and validate large payloads of JSON concurrently for a web service, initially I implemented it using jsonschema and fastjsonschema but I found the whole JSON Schema Specification to be confusing at times and on top of that wanted better performance. Albeit there are ways to compile/cache the schema, I wanted to move away from the schema specification so I wrote a validation library inspired by the design of tiangolo/sqlmodel (type hints) to solve this problem easier.
-
-
So I have 2 Django apps: the API app and the Web app. The API app will use Django Ninja or Fast API to build a clean self-documented REST API. The Web app will serve HTMx pages.
-
Project mention: API Development: The Complete Guide for Building APIs Without Code | dev.to | 2021-10-13
PHP CRUD API
OpenAPI related posts
- Experienced dev new to Scala looking for a quick answer to get me on the right track - Advice on *standard* Scala framework stack to quickly set up a web-app backend ;
- Developing high-performing applications with Python’s FastAPI
- What is meant with "decorators"?
- Deploying OpenAPI in Azure API Management with Terraform
- tAPIr 1.0 release [INFOGRAPHIC]
- Auto OpenAPI Generation — The Network Doesn’t Lie!
- API + HTMx front-end architecture question
Index
What are some of the best open-source OpenAPI projects? This list will help you:
Project | Stars | |
---|---|---|
1 | fastapi | 46,791 |
2 | OpenAPI-Specification | 24,368 |
3 | swagger-ui | 22,304 |
4 | redoc | 17,709 |
5 | grpc-gateway | 13,577 |
6 | openapi-generator | 12,684 |
7 | full-stack-fastapi-postgresql | 9,196 |
8 | API Platform | 7,487 |
9 | swagger-core | 7,014 |
10 | swag | 6,271 |
11 | springfox | 5,642 |
12 | NSwag | 5,207 |
13 | goa | 4,737 |
14 | go-restful | 4,482 |
15 | loopback-next | 4,205 |
16 | connexion | 4,023 |
17 | mockoon | 3,944 |
18 | dredd | 3,861 |
19 | autorest | 3,841 |
20 | jsonschema | 3,711 |
21 | Light-Java | 3,418 |
22 | django-ninja | 3,059 |
23 | PHP-CRUD-API | 3,052 |
Are you hiring? Post a new remote job listing for free.