
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
@cerios/openapi-core
Advanced tools
Core utilities for parsing and processing OpenAPI specifications. Shared foundation for OpenAPI code generators.
Core utilities for parsing and processing OpenAPI specifications. This package provides the shared foundation for OpenAPI code generators.
npm install @cerios/openapi-core
$ref references throughout the specimport {
shouldIncludeOperation,
toPascalCase,
toCamelCase,
resolveRefName,
LRUCache,
loadOpenAPISpec,
} from "@cerios/openapi-core";
// Load and parse an OpenAPI spec
const spec = await loadOpenAPISpec("openapi.yaml");
// Extract schema name from $ref
const schemaName = resolveRefName("#/components/schemas/User"); // "User"
// Filter operations
const include = shouldIncludeOperation(operation, path, method, {
includeTags: ["users"],
excludePaths: ["/internal/*"],
});
// Name utilities
const className = toPascalCase("user-profile"); // "UserProfile"
const methodName = toCamelCase("get-user-by-id"); // "getUserById"
OpenAPISpec - OpenAPI specification structureOpenAPISchema - Schema definition structureOpenAPIParameter - Parameter definitionOpenAPIRequestBody - Request body definitionOpenAPIResponse - Response definitionOperationFilters - Operation filtering optionsExecutionMode - Parallel/sequential execution modeBaseGeneratorOptions - Base options for all generatorsloadOpenAPISpec() - Load and parse an OpenAPI spec fileloadOpenAPISpecCached() - Load spec with LRU cachingresolveRefName() - Extract name from $ref pathresolveRequestBodyRef() - Resolve request body referencesresolveResponseRef() - Resolve response referencesmergeParameters() - Merge path and operation parametersshouldIncludeOperation() - Check if operation matches filtersvalidateFilters() - Validate filter configurationcreateFilterStatistics() - Create filter statistics trackerformatFilterStatistics() - Format statistics for displaytoPascalCase() - Convert string to PascalCasetoCamelCase() - Convert string to camelCaseresolveRefName() - Extract name from $ref pathgetOperationName() - Get operation name from operationId or pathgenerateMethodNameFromPath() - Generate method name from pathcapitalize() - Capitalize first letterpathToPascalCase() - Convert path to PascalCase (e.g., /users/{userId} → UsersByUserId)generateHttpMethodName() - Generate method name from HTTP method + pathextractPathParams() - Extract parameter names from path templatesanitizeOperationId() - Sanitize operationId for TypeScriptsanitizeParamName() - Sanitize parameter name for TypeScriptextractSchemaRefs() - Extract all $ref names from schema treeexpandTransitiveReferences() - Expand to include transitively referenced schemasdetectCircularReferences() - Detect circular reference chainstopologicalSortSchemas() - Sort schemas by dependenciesanalyzeSchemaUsage() - Analyze request/response context usageclassifyEnumType() - Classify enum values as string/number/boolean/mixedshouldIgnoreHeader() - Check if header matches ignore patternsfilterHeaders() - Filter headers excluding ignored onesvalidateIgnorePatterns() - Validate and warn about unmatched patternsstripPrefix() - Strip prefix from schema namesstripSuffix() - Strip suffix from stringsstripAffixes() - Strip both prefix and suffixstripPathPrefix() - Strip prefix from paths (supports glob)isGlobPattern() - Check if string is a glob patternescapeJSDoc() - Escape JSDoc contentescapeDescription() - Escape description textescapePattern() - Escape regex patterngetPrimaryType() - Get primary type from schemahasMultipleTypes() - Check if schema has multiple typesisNullable() - Check if schema is nullablegetResponseParseMethod() - Determine response parsing method (json, text, blob, etc.)createConfigLoader() - Factory for type-safe config loaders with cosmiconfig + Zod validationmergeCliWithConfig() - Merge CLI options with config values (CLI takes precedence)findSpecFiles() - Find OpenAPI spec files in directorygetRandomCeriosMessage() - Get random CLI greeting messageLRUCache - Least Recently Used cache implementationGeneratorError - Base error class for generatorsSpecValidationError - OpenAPI spec validation errorsFileOperationError - File I/O errorsConfigValidationError - Configuration errorsCircularReferenceError - Circular reference detection errorsCliOptionsError - CLI options validation errorsSchemaGenerationError - Schema generation errorsexecuteBatch() - Execute multiple generatorsgetBatchExitCode() - Calculate exit code from resultsGenerator - Interface for generator implementationsMIT
FAQs
Core utilities for parsing and processing OpenAPI specifications. Shared foundation for OpenAPI code generators.
We found that @cerios/openapi-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.