Mocklets
  • Getting Started
  • Working with Collections
    • Create Collection
    • Invite Members
  • Managing Mock Apis
    • Dynamic Responses
    • URL Regex Matching
    • Use API as Proxy
    • Randomised Responses
    • Response Delay
    • Using Query Params
    • API Comments
  • Manage your files
  • Open API Specifications 3.x
  • Integration with external editors
  • Response Headers
  • Monitor Request Logs
  • Secure your mock APIs
  • Important Links
    • Home
    • Dashboard
    • Privacy Policy
    • Terms of Use
Powered by GitBook
On this page

Was this helpful?

Open API Specifications 3.x

This page provided insight about how you can use Open API Specifications to create mock api.

PreviousManage your filesNextIntegration with external editors

Last updated 6 years ago

Was this helpful?

This feature is still in Beta phase.

Open API Specification is the most widely used description language for REST APIs. Mocklets supports the automatic generation of mock APIs from imported Open API Specifications. You just have to upload your specs on Mocklets dashboard.

Go to the Collection page and click the Open API Spec button. Then paste your YAML definition into the text editor, pick your duplicate policy and hit Upload Specification.

Currently, we are only supporting version 3.x of Open API Specification. If you have any older version, please let us know. We will try to provide support for as many versions as possible.

Duplicate Policy

If you’re working with an Open API Specification which is changing on a regular basis, you’ll probably want to re-import it repeatedly.

This means you have to decide what to do when a stub is newly generated for a URL/content type combination for which a stub already exists from a previous import. Most of the time, for the sake of keeping the mock API correct you’ll want to overwrite the previous stub, so this is the default behavior set on the dashboard. However, you also have the option of skipping the already created mock APIs and keep the data for those APIs the same as a previous import.