json2jsii

Generates jsii-compatible structs from JSON schemas (by cdklabs)

Json2jsii Alternatives

Similar projects and alternatives to json2jsii

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better json2jsii alternative or higher similarity.

json2jsii reviews and mentions

Posts with mentions or reviews of json2jsii. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-09-28.
  • That's a Lot of YAML
    14 projects | news.ycombinator.com | 28 Sep 2023
    The more I look at it, the more I think that Deno is actually a perfect fit for infrastructure as code.

    The first reaction I get is usually "What, JavaScript!?". Here is why its better than it looks like.

    Deno easily runs TypeScript without a compile step. TypeScript is a very mature, developer friendly language that was designed to model the super complicated types often seen in JS. This includes unions and intersections which help you model complex rules between optional properties, as well as template literal types which can help you restrict string constants. As it so happens, those same types of objects are present in our configurations.

    TypeScript is also flexible about how much you'd like to model. Do you want only properties with really nice autocomplete with docs from the language server? Sure we can do just that. Do you want to only allow strings that look like a time duration for that property? Can be done too with template literal types. You choose where to invest your energy.

    Building abstractions on top of IaC is seen as painful and obscure. TypeScript has tools to help you avoid that, such as api-extractor: https://api-extractor.com/ - it can enforce that all your function abstractions are documented and it can generate that documentation for you.

    The larger ecosystem also comes with a lot of ready-made codegen tools that can help, from small modules such as json-schema-to-typescript (https://www.npmjs.com/package/json-schema-to-typescript) to larger mature projects such as jsii and https://github.com/cdklabs/json2jsii . They can be used to build the tooling to import things like CRDs and other external schemas.

    What about running arbitrary code, launching rockets, turing completness? This is where Deno comes in, with its permissions model (https://docs.deno.com/runtime/manual/basics/permissions). You can allow only a subset of commands (lets say, `helm` and `kustomize`, while you're migrating away from them), a subset of (writable) directories, accessible network hosts - or none at all.

    What about the pains of managing JS modules? Deno lets you import files directly from URLs. It also allows you to set private tokens in env vars to ensure the imports succeed: https://docs.deno.com/runtime/manual/basics/modules/private - as a result, you can manage your IaC libraries the way that makes sense to you, without dealing with the unwieldy package managers of the node ecosystem.

Stats

Basic json2jsii repo stats
1
19
9.5
7 days ago

cdklabs/json2jsii is an open source project licensed under Apache License 2.0 which is an OSI approved license.

The primary programming language of json2jsii is TypeScript.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com