Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@samchon/openapi
Advanced tools
@samchon/openapi
OpenAPI definitions and converters for typia and nestia.
@samchon/openapi
is a collection of OpenAPI definitions of below versions. Those type definitions does not contain every properties of OpenAPI specification, but just have only some features essentially required for typia
and nestia
(especially @nestia/editor
).
Also, @samchon/openapi
provides emended OpenAPI v3.1 definition and its converter from above versions for convenient development. The keyword "emended" means that OpenApi
is not a direct OpenAPI v3.1 specification (OpenApiV3_1), but a little bit shrinked to remove ambiguous and duplicated expressions of OpenAPI v3.1 for the convenience of typia and nestia
For example, when representing nullable type, OpenAPI v3.1 supports three ways. In that case, OpenApi remains only the third way, so that makes typia
and nestia
(especially @nestia/editor
) to be simple and easy to implement.
{ type: ["string", "null"] }
{ type: "string", nullable: true }
{ oneOf: [{ type: "string" }, { type: "null" }] }
Here is the entire list of differences between OpenAPI v3.1 and emended OpenApi.
OpenApiV3_1.IPathItem.parameters
to OpenApi.IOperation.parameters
OpenApiV3_1.IOperation
mebersOpenApiV3_1.IJsonSchema.IMixed
OpenApiV3_1.IJsonSchema.__ISignificant.nullable
OpenAPI.IJsonSchema.IArray.items
OpenApi.IJsonSchema.ITuple.prefixItems
OpenApiV3_1.IJsonSchema.IAnyOf
to OpenApi.IJsonSchema.IOneOf
OpenApiV3_1.IJsonSchema.IRecursiveReference
to OpenApi.IJsonSchema.IReference
npm install @samchon/openapi
import { OpenApi, SwaggerV2, OpenApiV3, OpenApiV3_1 } from "@samchon/openapi";
// original Swagger/OpenAPI document
const input:
| SwaggerV2.IDocument
| OpenApiV3.IDocument
| OpenApiV3_1.IDocument
| OpenApi.IDocument = { ... };
// you can convert it to emended OpenAPI v3.1
const output: OpenApi.IDocument = OpenApi.convert(input);
typia
: https://github.com/samchon/typianestia
: https://github.com/samchon/nestia@nestia/editor
: https://nestia.io/docs/editorFAQs
OpenAPI definitions and converters for 'typia' and 'nestia'.
We found that @samchon/openapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.