Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAMLize netkan spec #3438

Merged
merged 2 commits into from
Sep 17, 2021
Merged

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Aug 19, 2021

Motivation

In #3367, we enabled YAML format for human-edited metadata, but most of the relevant documentation still uses JSON. This may be leading advanced users to submit JSON format netkans instead of YAML (see KSP-CKAN/NetKAN#8720).

Changes

Now the Spec.md documentation uses YAML format when discussing netkans.

The wiki page for adding a mod was updated here, in case you would like to review the changes:

https://github.com/KSP-CKAN/CKAN/wiki/Adding-a-mod-to-the-CKAN/_compare/9e902784ae698b6f1f1fe8fca6e3b82bcead4e2e...2f5cacc582c207b8ffa3d1988f5e89ad17ef374f

Also the long-broken link to ksp.marce.at is replaced.

@HebaruSan HebaruSan added Enhancement New features or functionality Pull request Spec Issues affecting the spec Documentation Issues affecting documentation labels Aug 19, 2021
@DasSkelett
Copy link
Member

DasSkelett commented Sep 17, 2021

I think this also should be adjusted, to \.zip$

CKAN/Spec.md

Line 825 in c087675

- `asset_match` (type: `string`, regex) (default: `"\\.zip$"`)<br/>

@HebaruSan
Copy link
Member Author

OK, changed.

@DasSkelett
Copy link
Member

Sorry, that was ambiguous. It needs to be either

(default: `\.zip$`)
or
(default: `'\.zip$'`)
or
(default: `"\\.zip$"`)

as in YAML in single quotes (or no quotes) the backslash doesn't need to be escaped, but in double quotes it behaves like JSON and we need \\.

So it would have been correct like it has been initially, but as we tend to use single or no quotes in YAMLkans, it might be misleading like that, so instead we should choose one of the first two options.

@HebaruSan
Copy link
Member Author

OK, quotes removed!

Copy link
Member

@DasSkelett DasSkelett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easier copy-paste!

@HebaruSan HebaruSan merged commit 5df8d01 into KSP-CKAN:master Sep 17, 2021
@HebaruSan HebaruSan deleted the feature/yamlize-netkan-spec branch September 17, 2021 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Issues affecting documentation Enhancement New features or functionality Spec Issues affecting the spec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants