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

New generator | Arduino cpp #9489

Merged
merged 104 commits into from
May 24, 2021
Merged

New generator | Arduino cpp #9489

merged 104 commits into from
May 24, 2021

Conversation

AndersSpringborg
Copy link
Contributor

@AndersSpringborg AndersSpringborg commented May 15, 2021

This is a new generator for the Arduino platform.

We have targeted it for a esp32, and esp 8266 chip, and used a library for HTTP request for HTTP protocol. It is implemented with HTTPS, which is a challenge for microcontrollers, as there's a limited amount of flash.

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master, 5.1.x, 6.0.x
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Copy link
Contributor

@muttleyxd muttleyxd left a comment

Choose a reason for hiding this comment

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

Good addition in general, but has some minor issues - nothing hard to fix.

@AndersSpringborg
Copy link
Contributor Author

AndersSpringborg commented May 17, 2021

Great feedback, we'll look into it soon😁

@AndersSpringborg
Copy link
Contributor Author

Thanks for using your time on feedback, tips and tricks. This is our first time writing cpp and Java code, so every small detail is a huge help 😁

@muttleyxd
Copy link
Contributor

You're welcome 😁
C++ isn't easy to learn for beginners, mostly because many libraries and learning materials are basing on old habits before C++11 even existed, so it's easy to pick them up and in result whole learning and programming process is much harder than it could be.

@wing328
Copy link
Member

wing328 commented May 24, 2021

@AndersSpringborg thanks for the PR. I'll merge this into master so that we can collect feedbacks from the users.

I'll submit a PR to make some minor enhancements to the new generator.

@wing328 wing328 merged commit 4e48dae into OpenAPITools:master May 24, 2021
@wing328
Copy link
Member

wing328 commented May 24, 2021

@AndersSpringborg I've filed with the enhancements (renaming generator to conform to the convention, minor code format enhancement, etc): #9560

Can you please PM me via Slack for a quick chat (IM) when you've time?

https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM

kuhnroyal added a commit to kuhnroyal/openapi-generator that referenced this pull request May 25, 2021
@kuhnroyal kuhnroyal mentioned this pull request May 25, 2021
5 tasks
premiumitsolution pushed a commit to premiumitsolution/openapi-generator that referenced this pull request May 26, 2021
* initil tiny client generator

* Helper string

* WIP: added helper file with json helper functions

* WIP: model implementation.. Working on JSON

* Added codegen files for model and helper

* WIP: toJson()

* Added mapping configurations

* Upadet string compare

* Removed redundant namespaces

* Added files for example

* fixed syntax errors

* fixed syntax errors

* header generation

* unittest example for pet class

* Refactored mustache & fixed logical errors

* WIP: unit test mustache format

* Removed legacy file

* mustache service

* Declare service in Java file

* Removed legacy file

* removed legacy code

* Documentation

* Added folder structure + new supporting files

* Added file to run all unittests

* Refactored unit tests

* typemappings and new paths

* First service impl

* Added esp32 and esp8266 env

* Added default values

* Added cli option to specify controller

* added type decl method

* Added stringify methods

* service get requests

* Fix helper header

* post merge fix

* fix long test

* Tiny namespace

* remove shared pointer

* include petapi

* stringify

* return problems

* Canged logic for response-body handling

* Implemented last logic for reponse handeling

* Implemented constructor logic

* first tiny sample

* update basepath to petstore v3

* standard main example

* root certificate example

* root folder

* TODO cleanup

* exclude features

* supports delete again!👷

* remove todo ❌

* new main example ❣️

* new main example ❣️

* Make our feature set realistic

* fix indentation

* HTTP / HTTPS Connection

* Root certificate sample

* https vs http 👨🏻‍🔬

* fix lint in template

* default value for controller in config

* new readme 📜

* remove old comments

* removed unused testfile

* no default root certificate

* new main

* remove test

* Update platformio.ini.mustache

🤷‍♂️

* Update platformio.ini.mustache

remove native

* added support info

* Add namespace to Pet 🐅

* bourne compatibility fix

* spelling error in python file

* bourne python script 🐍

* Version bump

* Add bourne script to readme

* update main sample, from template

* pre_compiling_bourne.py.mustache to samples folder 📃

* set header Content'type to json

* map todo🗺️

* remove unused debug flag⚒️

* added support for ESP8266 ༼ つ ◕_◕ ༽つ

* added new sample for ESP32 📀

* 🎯

* removed use of namespace std ❌

* removed use of "__" in variables

* removed unused code in destructor

* fixed type comparison

* move default ctor to header

* added zero initialized primitive variables

* moved variable to TypeMappings

* updated ifndefines

* Extra comment for build error in standard example 🦸🏽‍

* afer cpp-ish cast from std::string to uint8* cast🏰

* excluded maps type

* Documentation og generator

Co-authored-by: kaareHH <kaare.hattel@gmail.com>
Co-authored-by: mkakbas <45030188+mkakbas@users.noreply.github.com>
Co-authored-by: mkakbas <martinkandersen1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants