WhyDocsPricingDownloadChangelogGitHub

Documentation

  • Docs
    • Getting Started
      • Installation
      • Quick start
    • Concepts
      • Files-first
      • The hierarchy
      • OpenAPI as the source of truth
      • Instance visibility
      • Environments
    • Guides
      • Importing a spec
      • Migrating from Postman
      • Importing HAR traffic
      • Defining & promoting operations
      • Request instances
      • Auth & middlewares
      • Writing workflows
      • CI/CD
      • Documenting an API
      • Pro license
    • Interface
      • Navigation
      • History
      • Command palette
      • Keyboard shortcuts
    • Reference
      • File formats
        • config.json
        • api.json
        • _resource.json
        • Request instances
        • Environment files
        • schema.rules.json
        • Documentation files
        • Workflow files
    • CLI reference
      • project
      • api
      • schema
      • import
      • spec
        • read
        • promote
      • req
      • env
      • workflow
      • license
      • completion
    • Plugins
      • Using plugins
      • Writing a plugin
CLI›spec

craftr spec

Read the OpenAPI spec, or promote defined operations into it.

Commands

  • spec readPrint the effective OpenAPI spec, or the raw imported spec with --imported.
  • spec promoteWrite defined operations, with their parameters, request body and responses, into the API spec (spec.imported.json). The API then owns its spec: an upstream file or URL source is detached.

See also

  • OpenAPI as the source of truth