{"library":"minim-api-description","title":"Minim API Description Namespace","description":"The `minim-api-description` library provides a programmatic interface for working with the Refract API Description namespace, a structured representation for describing APIs. It is built upon the `Minim` library, which offers a generic Abstract Syntax Tree (AST) for working with structured data. Currently at version `0.9.1`, this package is a foundational component within the broader API Elements ecosystem, which includes parsers for OpenAPI/Swagger and API Blueprint. While this specific package has not seen a recent version bump, it is actively maintained as part of the `api-elements.js` project, which sees frequent updates to its parsers and serializers. Its key differentiator lies in offering a low-level, object-oriented way to construct, traverse, and manipulate API descriptions, allowing for advanced tooling and transformations beyond what declarative formats alone typically provide.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install minim-api-description"],"cli":null},"imports":["import apiDescription from 'minim-api-description';","import minim from 'minim';","const Category = namespace.getElementClass('category');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import minim from 'minim';\nimport apiDescription from 'minim-api-description';\n\n// Initialize a Minim namespace and extend it with API Description types\nconst namespace = minim.namespace()\n  .use(apiDescription);\n\n// Access and instantiate elements directly from the extended namespace\nconst Category = namespace.getElementClass('category');\nlet category = new Category(['My API Section']);\n\nconst Copy = namespace.getElementClass('copy');\nlet copy = new Copy('This is a description for the API section.');\n\ncategory.push(copy);\n\nconsole.log(`Category Name: ${category.toValue()}`);\nconsole.log(`Category Description: ${category.copy.first().toValue()}`);\n\n// Example of accessing properties specific to API Description elements\nconst Resource = namespace.getElementClass('resource');\nlet resource = new Resource();\nresource.attributes.set('href', '/users');\ncategory.resources.push(resource);\n\nconsole.log(`Resource Href: ${category.resources.first().attributes.get('href').toValue()}`);","lang":"javascript","description":"This example demonstrates how to initialize the API Description namespace, create core elements like `Category` and `Copy`, and access their properties.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}