Comments (4)
Hi @rvesse, it turns out that I was making these changes in my fork of the openapi-generator project for our internal use only, and we simply didn't need to retain the function that relied on the Suggester stuff, so I "fixed" the problem by simply removing that code that depended on it :)
I think at some point, the maintainers of the official open-source openapi-generator project will need to make similar changes and they will most likely want to retain that functionality. But, I'll let them do the necessary exploration to make that work :)
from airline.
After my initial semi-panicked post above 😂, I've been able to migrate the majority of the code to use the new airline v2.9.0 library, with a few loose ends remaining.
Previously the openapi-generator code used the "required" and "allowedValues" attributes of the @Option
annotation and I don't see equivalents in the newer "airline" library v2.9.0. Were these just dropped or is there some alternative that I can use?
Also, the CompletionCommand class uses airline's "Suggester" support and the parser (the code previously used the airline Parser
class, and I think that needs to be changed to use CliParser
but the parser interface has changed a bit (e.g. a different return type for the "parse()" method) so I'm still a little unclear on how to migrate that code specifically.
Again, any help is appreciated.
Thanks,
Phil
from airline.
Previously the openapi-generator code used the "required" and "allowedValues" attributes of the
@Option
annotation and I don't see equivalents in the newer "airline" library v2.9.0. Were these just dropped or is there some alternative that I can use?
After more digging, I've discovered the restrictions-related annotations, specifically the @required and @AllowedRawValues annotations.
As for my other issue related to the "Suggester" stuff, I was able to modify imports and make minor code changes so that everything compiles clean with the 2.9.0 version of the new airline library, although I was not able to get everything working correctly with respect to the "CommandCompletion" class in openapi-generator (linked above).
from airline.
Hi @padamstx
Just coming back from the holiday break so apologies for not seeing this any sooner. It sounds like you've figured out most of the migration yourself.
For the Suggester
stuff I'm afraid that's an area of the codebase that I never really touched at all other than making it continue to compile with the various refactoring that have happened over the years.
Do you have specific examples of what works/doesn't work (or works differently) with the original library versus my fork?
from airline.
Related Issues (20)
- Allowed Values restrictions have bugs with case sensitivity
- Options of scope `GLOBAL` and `GROUP` cannot be specified at command level
- List possible enum values in the help for an Option HOT 2
- Add `module-info.java` to all modules HOT 3
- Rename `@com.github.rvesse.airline.annotations.restrictions.File` HOT 4
- option arity
- Options with non-zero arity and no value supplied can consume other option names instead of producing an error HOT 6
- Add support for Path conversion HOT 3
- Unexpected param isn't thrown if there is an argument HOT 8
- Upgrade inject-api to 2.x HOT 13
- Download link broken HOT 1
- When numeric range restriction is too narrow a type for field type unhelpful errors are issued
- Docs site is not very accessible for color-challenged readers HOT 2
- Find a way to make Prompts not block on timeout
- Provide an option/argument defaulting mechanism
- ...llowedValuesRestrictionFactory not found HOT 14
- ListValueOptionParser is overly strict HOT 2
- Provide support for prompting HOT 2
- Airline incorrectly consumes (i.e. ignores) a value when defaulting in some circumstances HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from airline.