php-perfect / ddev-intellij-plugin

DDEV Tool Integration for IntelliJ IDEA
https://plugins.jetbrains.com/plugin/18813-ddev-integration
BSD 3-Clause "New" or "Revised" License
109 stars 15 forks source link

Add silverstripe, plural upload_dirs #221

Closed Firesphere closed 1 year ago

Firesphere commented 1 year ago

The Problem/Issue/Bug:

Plural for upload dirs and silverstripe as project type were not yet allowed in the schema.

How this PR Solves the Problem:

Add these values to the schema

Manual Testing Instructions:

Add a plural array of upload_dirs to the ddev project config, or create a silverstripe project type

nico-loeber commented 1 year ago

Hey @Firesphere,

Thank you very much for this pull request!

Please note that we plan to move the schema to the ddev repository in the future:

I will merge this soon but can't give you an eta for the next release yet.

jamesmacwhite commented 1 year ago

FYI, there's a missing comma on upload_dirs causing a JSON syntax error. I'm currently porting the schema used in the Intellij plugin to the SchemaStore and it's flagged it in my IDE.

jamesmacwhite commented 1 year ago

@nico-loeber Just to let you know the DDEV JSON schema is now merged into the main DDEV repository: https://raw.githubusercontent.com/ddev/ddev/master/pkg/ddevapp/schema.json

A pull request to github.com/schemastore/schemastore has been made to include this in the JSON schema project for automatic mapping which PHPStorm I believe supports out of the box.

Just letting you know!

nico-loeber commented 1 year ago

FYI, there's a missing comma on upload_dirs causing a JSON syntax error.

Thanks! I ignored this for now, as we will remove the schema most probably before the next release. Or do you like to fix it? Easy way to become contributor! ;)

A pull request to github.com/schemastore/schemastore has been made to include this in the JSON schema project for automatic mapping which PHPStorm I believe supports out of the box.

Great! If this works fine we can remove the schema from the plugins code base.

jamesmacwhite commented 1 year ago

@nico-loeber No worries, I didn't know how long it was going to take to get the schema merged upstream so I just noted it, but it's done now, the JSON schema store also merged in the inclusion of the schema so IDEs should automatically detect config.yaml now. but you'll need to test it, it's based off the original schema provided by this plugin but updated for 1.22 and passing strict validation against a sample config.yaml testing the various config options and types.

I don't believe you should need to be including the schema in your plugin now, any further updates should be made to the DDEV repostiory, as the schema is here: https://raw.githubusercontent.com/ddev/ddev/master/pkg/ddevapp/schema.json. JSON schema store is pointing to this location in their repostiory. We decided to host directly in the DDEV repository given updates relying on a third party repository could slow down updates.