OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

Schema for recipe.json

Open xperiandri opened this issue 7 years ago • 9 comments

Define a scheme for recipe.json to be make validation and statement completion work in Visual Studio

xperiandri avatar May 28 '18 12:05 xperiandri

@sebastienros, how and where is it consumed?

xperiandri avatar May 28 '18 12:05 xperiandri

On Orchard Core setup you have 3 choices. SaaS, The Blog, The Agency. Those are 3 recipes coming from "Themes" that should be renamed "Templates" in the future.

Skrypt avatar May 28 '18 16:05 Skrypt

So I want to create my own theme. If I create recipe.json for it, I don't know what can be present in it as no scheme for it available, nor Visual Studio can help or check me.

xperiandri avatar May 28 '18 17:05 xperiandri

Well, I understand your request. We should probably use a JSON Schema file to parse this JSON file and return proper data validation messages.

Skrypt avatar May 28 '18 18:05 Skrypt

Creating a json schema is a very good idea.

sebastienros avatar May 31 '18 19:05 sebastienros

I agree with this. Here is my use case:

I'm working on a continuous delivery project in which content types and default content changes need to be consistent, repeatable and automated across multiple environments. Recipes are perfect for this.

In this case, I would be hand-crafting incremental recipes as the project progresses. These recipes would be executed in full (in the case of a new/rebuild environment) or only new (in the case of a point release). Exporting a recipe from the admin UI for me is not valuable since it will have all the previous changes that I will have to filter out by hand.

In the end, my options are hand-crafted recipes or a modification to the recipe export functionality that will give me a differential recipe. The latter is unlikely, so I'm fine with hand-crafting.

jasonshsoftware avatar Sep 28 '18 04:09 jasonshsoftware

Closing, now that the recipe documentation is available.

agriffard avatar Feb 09 '20 15:02 agriffard

Documentation ≠ JSON Scheme

xperiandri avatar Feb 09 '20 16:02 xperiandri

I would suggest to integrate the generation of a global schema file by using the gulp script we are using. Each module would create it's own 'recipe' schema with a well-known filename. Then we can generate the global one in the root folder, and commit it to source code so we can reference it universally.

sebastienros avatar Feb 13 '20 21:02 sebastienros