Hieu Nguyen
Dec 19, 2024
visibility 2469
star star star star star star
(3 votes)

Simplify Optimizely CMS Configuration with JSON Schema

 

 

Optimizely CMS is a powerful and versatile platform for content management, offering extensive configuration options that allow developers to fine-tune their applications. However, navigating and correctly setting up these options in appsettings.json can sometimes feel daunting—especially for new developers or those unfamiliar with the full breadth of available settings.

To address this challenge, I’m excited to introduce the Optimizely JSON Schema. This schema is designed to streamline the configuration process for developers, providing them with an enhanced, developer-friendly experience in popular IDEs like Visual Studio Code and JetBrains Rider.


Why a JSON Schema?

When configuring Optimizely CMS, developers rely on appsettings.json to define their application's behavior. While the official Optimizely CMS documentation provides thorough information, manually looking up settings and ensuring their correctness can slow down development and increase the risk of errors.

Here’s how the Optimizely JSON Schema helps:

  • Autocomplete Support: Provides autocomplete suggestions for configuration keys, reducing the need to memorize or constantly refer to external documentation.
  • Validation on the Fly: Highlights invalid or unsupported configuration keys and values, ensuring your appsettings.json is always accurate.
  • Inline Documentation: Displays descriptions and valid values for settings directly in the IDE, offering context as you type.
  • Consistent Structure: Encourages adherence to best practices in structuring and naming settings.

Features of the Optimizely JSON Schema

  1. Comprehensive Coverage of Optimizely CMS Settings
    The schema encapsulates all documented configuration options for Optimizely CMS, based on the official Optimizely Configuration Documentation. More options will be added in future (e.g: eCommerce).

  2. IDE Integration
    It works seamlessly with IDEs that support JSON Schema, such as:

    • Visual Studio Code
    • JetBrains Rider
    • Visual Studio
  3. Quick Start Setup
    Simply download here and reference the schema in your appsettings.json file:

    {
        "$schema": "appsettings-schema.json",
        ...
    }
    

Benefits for Developers

  • Faster Configuration: Save time with instant suggestions and error-checking.
    Image image.png

  • Error Reduction: Minimize misconfigurations that could lead to runtime errors.


  • Improved Developer Experience: Eliminate the constant back-and-forth between code and documentation.

How to Get Started

  1. Install the schema: Head over to the GitHub repository  to download JSON Schema.

  2. Reference the Schema: Add the schema URL to your appsettings.json file as shown in the example above.

  3. Explore Settings: Start typing in your configuration file to experience the power of autocompletion, validation, and inline documentation.

  4. Contribute: Found an undocumented configuration or want to improve the schema? Feel free to submit issues or pull requests to the GitHub repository.


Release Changes

12/12/2024: Initial Schema (Version 1.0)

  • Launched the first version of the JSON Schema.

  • Included all major configuration options for Optimizely CMS based on official documentation.

  • Added support for autocomplete, validation, and inline documentation in JSON editors.

01/10/2025: Refactor and Optimize Schema (Version 1.1)

  • Refactored the schema to improve performance and readability.

  • Optimized the structure for better autocomplete suggestions.

  • Enhanced validation rules to catch edge cases and unsupported values more effectively.


Conclusion

The Optimizely JSON Schema is here to make your life as an Optimizely developer easier. By integrating the schema into your IDE, you’ll spend less time searching through documentation and more time building great experiences with Optimizely CMS.

Feel free to share your feedback and suggestions in the comments below or on the project’s GitHub page. Let’s make working with Optimizely CMS configurations smoother than ever!

Dec 19, 2024

Comments

Eric Petersson
Eric Petersson Dec 20, 2024 07:36 AM

This is great Hieu!

Will this schema-file be part of the PaaS Nuget download or similar for Optimizely Cms 12 in the future? As a default installation of the product

Hieu Nguyen
Hieu Nguyen Dec 20, 2024 08:02 AM

Hi Eric, since this schema is just a tool for use in IDEs, it's best to download it directly from GitHub and add it to your projects.

However, if you find that installing it via NuGet would be more convenient, I can publish it next week.

error Please login to comment.
Latest blogs
Architecting an Enterprise-Grade Development Pipeline in Optimizely SaaS CMS

Most enterprise teams show up to Optimizely SaaS CMS with a clear roadmap for their release pipeline: DEV → QA → Stage → Prod. Four logical...

Vipin Banka | Jul 12, 2026

Bynder DAM Connector for Optimizely SaaS CMS: Improved Metadata Property Synchronization

While working with the Bynder DAM Connector for Optimizely SaaS CMS , one of the key areas I explored was how Bynder asset metadata is synchronized...

Vipin Banka | Jul 11, 2026

Optimizely DXP: Every Supported Culture, One Searchable Page

Quick one for anyone building multi-language sites on Optimizely DXP. I put together a reference tool listing all 806 supported cultures. More...

Adnan Zameer | Jul 10, 2026 |

A day in the life of an Optimizely OMVP: London Meetup 2026

On 2nd July 2026 the Optimizely London Developer Meetup returned to The Lightwell, and the running theme across the evening was less about individu...

Graham Carr | Jul 10, 2026

Optimizely’s Summer ’26 Roadmap: The CMS Is Starting to Look Less Like a Publishing Tool and More Like Marketing Infrastructure

Optimizely’s Summer ’26 Product Roadmap event was not just a list of product updates. At least, that is not the part I found most interesting. The...

Augusto Davalos | Jul 9, 2026

Optimizely Content JS SDK v2.1.0 — What's New and Why It Matters

  v2.1.0 of the Optimizely Content JS SDK and CLI landed on July 7, 2026. This is a substantial release bringing a wave of capabilities for...

Vipin Banka | Jul 8, 2026