-
Notifications
You must be signed in to change notification settings - Fork 288
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
support for x-enum-varnames in chaotic #712
base: develop
Are you sure you want to change the base?
Conversation
@@ -262,13 +263,35 @@ def _gen_integer( | |||
assert schema.format is None | |||
assert user_cpp_type is None | |||
|
|||
enum_names = [] | |||
|
|||
if hasattr(schema, 'x_properties') and 'x-enum-varnames' in schema.x_properties: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x_properties должны быть всегда
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
уберем
result.extend([part.capitalize() for part in SPLIT_WORDS_RE.findall(word)]) | ||
return ''.join(result) | ||
|
||
for i in range(len(schema.enum)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enumerate(schema.enum)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
принял
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/ You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
schemas: | ||
Enum: | ||
type: object | ||
additionalProperties: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
это должен быть не голден тест, а тест на то, что static_cast(kInner) == 0 и т.п.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я про тест совсем не понял. Где это должно проверяться и почему именно static_cast(kInner)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
где - где-то в chaotic/tests/back/cpp
почему - ну ты написал некую функциональность, которая генерит другие имена констант; нужно проверить, что эти константы равны нужным значениям, а не абы каким
голден тесты - это не тесты, а лишь витрина для стороннего наблюдателя
fixes #710 |
support for x-enum-varnames in chaotic