telegram-bot-ruby
telegram-bot-ruby copied to clipboard
Upgrade to API 7.10
Also i tried to parse json schema from https://ark0f.github.io/tg-bot-api/openapi.json and build some parser (new rake tasks). It's not ideal in the many ways but it's something
Hey @seorgiy
Looks really nice, much better than parsing their docs. I'll take a deeper look this weekend. Also we need to make linter pass (not sure why it fails)
Hey, @atipugin, gentle reminder 🙄
Hey @seorgiy
Sorry for the delay, could you update this PR also up to 7.11?
Done
Yeah, thanks!
But we still need to figure out what to do with specs. We use type_attributes.yml in types_spec.rb to ensure our Ruby classes have all required attributes. I don't really want to keep both openai_type_attributes.json and type_attributes.yml. I think we need to rewrite tests to use JSON file instead.
I'm also not sure that spec/support is the correct place for openapi_type_attributes.json and type.rb, because these files are used to generate stuff, not just for specs. I'd move JSON file to top-level data dir or something. I'd also split rake tasks and move it rakelib. But we could do it later, outside this PR. The first thing is to make specs work with JSON file
What do you think, @seorgiy?
@atipugin hey! I have improved the typebuilder, now it is fully automatic, except for the methods added to the classes. Introduced min/max constraints.
Unfortunately, I am very bad at writing tests. But now it turns out that we are testing the generated classes against the generated schema. Looks not really useful to me. Still i made simple fresh file at least for basic attributes compare.
Also tweaked structure a little, removed old parser, tasks moved to rakelib, take a look.
(too tired to fight linter right now 😪 )
@atipugin ok, not it's more or less readable. PR is looks kinda messy right now which im sorry for but it's working fine
@seorgiy GJ, man! Thanks for updating up to 8.0. Minor request - please set version to 2.1, because otherwise we have to make corresponding releases (2.1, 2.2, 2.3) based on your changelog. Let's just stick with 2.1 here
@atipugin done
Thanks! Merged!