Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@backstage/plugin-catalog-backend-module-openapi
Advanced tools
A Backstage catalog backend module that helps with OpenAPI specifications
This is an extension module to the Catalog backend, providing extensions to resolve $refs in yaml documents.
With this you can split your yaml documents into multiple files and reference them. They will be bundled, using an UrlReader, during processing and stored as a single specification.
This is useful for OpenAPI and AsyncAPI specifications.
# From your Backstage root directory
yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-openapi
packages/backend
backend.add(import('@backstage/plugin-catalog-backend-module-openapi'));
This will add the jsonSchemaRefPlaceholderResolver
for
the placeholder resolver keys asyncapi
and openapi
.
This allows you to use the $openapi
placeholder when referencing your OpenAPI specification and $asyncapi
when referencing your AsyncAPI specifications. This will then resolve all $ref
instances in your specification.
You can also use this resolver for other kind of yaml files to resolve $ref pointer.
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
name: example
description: Example API
spec:
type: openapi
lifecycle: production
owner: team
definition:
$openapi: ./spec/openapi.yaml # by using $openapi Backstage will now resolve all $ref instances
packages/backend
(old backend system)The placeholder resolver can be added by importing jsonSchemaRefPlaceholderResolver
in src/plugins/catalog.ts
in your backend
package and adding the following.
builder.setPlaceholderResolver('openapi', jsonSchemaRefPlaceholderResolver);
builder.setPlaceholderResolver('asyncapi', jsonSchemaRefPlaceholderResolver);
This allows you to use the $openapi
placeholder when referencing your OpenAPI specification and $asyncapi
when referencing your AsyncAPI specifications. This will then resolve all $ref
instances in your specification.
You can also use this resolver for other kind of yaml files to resolve $ref pointer.
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
name: example
description: Example API
spec:
type: openapi
lifecycle: production
owner: team
definition:
$openapi: ./spec/openapi.yaml # by using $openapi Backstage will now resolve all $ref instances
The processor can be added by importing OpenApiRefProcessor
in src/plugins/catalog.ts
in your backend
package and adding the following.
builder.addProcessor(
OpenApiRefProcessor.fromConfig(env.config, {
logger: env.logger,
reader: env.reader,
}),
);
FAQs
A Backstage catalog backend module that helps with OpenAPI specifications
The npm package @backstage/plugin-catalog-backend-module-openapi receives a total of 0 weekly downloads. As such, @backstage/plugin-catalog-backend-module-openapi popularity was classified as not popular.
We found that @backstage/plugin-catalog-backend-module-openapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.