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

Refactor configuration/option flags from config file. Add placeholder flags for (property) array generation and PATCH path #178

Conversation

cweedall
Copy link
Contributor

@cweedall cweedall commented May 1, 2024

After adding default_descriptions and default_properties flags, I had an idea to have a flag for enabling/disabling generation of examples (mostly helpful when checking that ontology/OpenAPI spec are as desired).

Based on another PR, I plan to add a flag for flipping between arrays or single type/value properties.

Given that some additional flags may also be desired in the future, I thought we could improve the way these flags are passed around in the code. After some investigation, it appeared that creating a map in the YamlConfig class with an enum flag CONFIG_FLAG for the key and a Boolean value would be the best. Then, whenever we need a value, we can grab it from the config variable.

The reason for renaming this is because 1) all the variables referred to is as "path generator" anyway and 2) to avoid confusion with java.nio.file.Path
Mostly refactoring.  Added PATCH placeholder and a new ALWAYS_GENERATE_ARRAYS flag to be used soon.  This is basically a patch without any functionality changes.
@cweedall cweedall marked this pull request as draft May 1, 2024 18:21
@cweedall cweedall marked this pull request as ready for review May 1, 2024 18:28
@dgarijo
Copy link
Contributor

dgarijo commented May 2, 2024

Will have a look by next week (I am on holidays this week). Looking promising!

@dgarijo dgarijo merged commit a69d201 into KnowledgeCaptureAndDiscovery:master May 6, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants