json-schema-spec
OpenAPI-Specification
json-schema-spec | OpenAPI-Specification | |
---|---|---|
56 | 49 | |
4,483 | 30,138 | |
1.2% | 0.4% | |
8.8 | 9.4 | |
29 days ago | 3 days ago | |
JavaScript | Markdown | |
GNU General Public License v3.0 or later | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
json-schema-spec
-
JSON Schema to PySpark StructType
Assume that you get the following JSON schema specification:
-
JSON Schema in Haskell using AutoDoCodec
The outcome of my research was that there weren't really any good libraries for dealing with JSON Schema from within Haskell. That was a surprising disappointment, because Haskell often has very good libraries (although they may be hard to use). The reason is that the JSON Schema specification itself isn't very well-made.
-
Using GPT for natural language querying
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://upsidelab.io/recipe.schema.json", "title": "Recipe", "description": "A recipe definition", "type": "object", "properties": { "ingredients": { "description": "The list of ingredients required to prepare the recipe", "type": "array", "items": { "$ref": "#Ingredient" } }, "steps": { "description": "The list of steps required to prepare the recipe", "type": "array", "items": { "$ref": "#Step" } } }, "$defs": { "ingredient": { "$anchor": "Ingredient", "type": "object", "properties": { "id": { "type": "number" }, "name": { "type": "string" }, "quantity": { "type": "string" } } }, "step": { "$anchor": "Step", "type": "object", "properties": { "id": { "type": "number" }, "name": { "type": "string" }, "description": { "type": "string" }, "dependsOnSteps": { "type": "array", "items": { "type": "number" } }, "dependsOnIngredients": { "type": "array", "items": { "type": "number" } } } } } }
-
Tools and Demo Based on Existing .NET JSON Schema Components
While there are variety of JSON schema tools since the introduction of JSON schema, this project is focused on the following:
- JSON Schema
-
How API Schema Validation Boosts Effective Contract Testing
JSON Schema: The industry standard for defining and validating JSON data structures.
-
How to use FastAPI for microservices in Python
The framework's official website mentions a number of pros of FastAPI. In my opinion, the most useful features from a microservice perspective are: the simplicity of code (easy to use and avoid boilerplate), high operational capacity thanks to Starlette and Pydantic and compatibility with industry standards - OpenAPI and JSON Schema.
-
Show HN: ParserPete – Make every website a JSON API
2. schema ⇾ (optional) you can provide it a JSON schema (https://json-schema.org/) in which you define the wanted output.
I needed it myself and thought it might be fun to create a little tool out of it.
Best
-
Mastering API Definitions: A Comprehensive Guide
As of OpenAPI 3.1, you can additionally embed JSON Schema directly into your definition, which tooling takes advantage of to generate documentation and perform contract testing.
-
Show HN: Convert your LinkedIn profile to a resume
For our data model we started with https://jsonresume.org/ but needed to adapt a bit.
Ideally there would be something on https://json-schema.org/ (as there are for industry job posting standards)
OpenAPI-Specification
-
Workaround for Hierarchical Tags in FastAPI
Note: Support for hierarchical tags is expected to arrive in the OpenAPI specification 3.2.0 at the earliest, which is currently planned for August 2025. After that, FastAPI and Swagger UI / Redoc will also need to adopt the new version. I don't expect these changes to be available any time soon.
-
Deprecating REST APIs: A Developer's Guide
Given the prevalence of OpenAPI, and its use in API documentation platforms - here are examples of how to perform different types of deprecations, which most OpenAPI tooling should handle. One unfortunate missing feature in OpenAPI 3.1 is that there isn't a formal way to guide users to the latest version of your API - despite a spec being proposed years ago, so we'll have to hack that into the description.
- OpenAPI 3.1.1 Specification
-
Log Streaming - what we got wrong and how we fixed it
gRPC A little more background on how our control-plane used to work: we had an HTTP-based API gateway that talked to our gRPC monolithic backend service.6 We thought about extending gRPC streaming from our backend to clients…but the API-gateway handled auth and connections for us and doing gRPC in our Javascript frontend wasn’t something we wanted to take on and in addition it meant that we wouldn’t be able to curl our endpoints easily. To me there’s nothing quite like curl localhost:8000 to begin understanding a service.7 Websockets Websockets would have been fun, but truthfully we didn’t need ‘em, the communication we wanted was really just getting output to our users quickly and we didn’t really need bi-directional communication. Server-Sent Events Server Sent Events (SSE) is pretty cool, enabling sending real-time updates to clients. SSE is well-supported by browsers and you can also “just curl it!”. One of the only drawbacks for us was the OpenAPI support wasn’t great at the time (see this), but our frontend team was able to work around it and in addition there wasn’t a tightly defined model for the logs output, so the benefits of using our spec (strict types) weren’t as big here compared to other parts of our API.
-
Understanding FastAPI: How OpenAPI works
If we go to the OpenAPI's repository, we'll see that:
-
Writing type safe API clients in TypeScript
And I'll be using the OpenAPI Pet Store spec file as an example.
-
Show HN: OpenAPI DevTools – Chrome ext. that generates an API spec as you browse
I saw your sibling comment about "keeping it simple," however that is a bit counter to "generates OpenAPI specifications" since those for sure are not limited to just application/json request/response bodies
I wanted to draw your attention to "normal" POST application/x-www-form-urlencoded <https://github.com/OAI/OpenAPI-Specification/blob/3.1.0/vers...> and its multipart/form-data friend <https://github.com/OAI/OpenAPI-Specification/blob/3.1.0/vers...>
The latter is likely problematic, but the former is in wide use still, including, strangely enough, the AWS API, although some of their newer services do have an application/json protocol
I know that's a lot of words, but the tl;dr would be that if you want your extension to be application/json only, then changing the description to say "OpenAPI specifications for application/json handshakes" would help the consumer be on the same page with your goals
-
How to Connect a FastAPI Server to PostgreSQL and Deploy on GCP Cloud Run
Since FastAPI is based on OpenAPI, at this point you can also use the automatically generated docs. There are multiple options, and two are included by default. Try them out by accessing the following URLs:
-
Write a scalable OpenAPI specification for a Node.js API
This approach requires a constant context switch and is clearly not productive. Here, the OpenAPI Specification can help; you might already have it, but is it scalable? In this article, we’ll learn how to create an OpenAPI Specification document that is readable, scalable, and follows the principle of extension without modifying the existing document.
-
OpenAPI 3.1 - The Gnarly Bits
Phil Sturgeon, who along with Ben Hutton and Henry Andrews from the JSON Schema community, helped drive the push to full JSON Schema Draft 2020-12 compliance, has written a blog post for the official OpenAPIs.org website on how to transition your OAS documents from v3.0.x to v3.1.0.
What are some alternatives?
uplaybook - A python-centric IT automation system.
api-guidelines - Microsoft REST API Guidelines
nix-configs - My Nix{OS} configuration files
grpc-gateway - gRPC to JSON proxy generator following the gRPC HTTP spec
shodohflo - Pure Python netflow and DNS correlation, with reusable Frame Streams, DnsTap and Protobuf implementations
supertest - 🕷 Super-agent driven library for testing node.js HTTP servers using a fluent API. Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.