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

Proposal to make use of swift-openapi-generator #799

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from
Open

Commits on Jul 30, 2024

  1. Configuration menu
    Copy the full SHA
    b66f84d View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2024

  1. Got the swift-openapi-generator working on openHAB iOS app:

    -Properly gets data every 30s
    -Able to send commands
    -Making use of structured concurrency, ie async/await, actors
    -Still a lot to do
    
    Renamed OpenHABSitemapPage into OpenHABPage to avoid confusion
    Reworked OpenHABSitemap to properly handle embedded OpenHABPage
    Created convenience initializers for OpenHAB models to map from openAPI generated models
    
    Properly decoding widgets within a widget
    Manually modifying the OpenHAB's openAPI schema
    Manually adding X-Atmosphere-Transport in header parameters for pollDataPage
    
    Transferred code to package - requires workaround to invoke the CLI manually: https://swiftpackageindex.com/apple/swift-openapi-generator/1.2.1/documentation/swift-openapi-generator/manually-invoking-the-generator-cli
    :
    - clone the generator package locally
    - run locally  swift run swift-openapi-generator generate --config ../Sources/OpenHABCore/openapi/openapi-generator-config.yml --output-directory ../GeneratedSources/openapi ../Sources/OpenHABCore/openapi/openapi.json
    
    Exclude the package and the generated code from swiftlint
    
    Async update for actor APIActor and initialiser with URL about:blank
    Using APIActor throughout the app
    Upgrade target to iOS 16
    
    Helper function openHABpollPage(sitemapname: String, longPolling: Bool) for access without
    
    Making use internal accesModifier to properly isolate the internals in OpenHABCore
    Using openAPI generated interface to send command
    Support for basic authorization
    Making use of os logger
    timbms committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    237940e View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2024

  1. Manually modifying openapi - JerseyResponseBuilderDTO for response to…

    … create event subscription, Allowing for X-Atmosphere-Transport for long-polling, SitemapWidgetEvent for server side events
    
    Experimenting with SSE consumption
    Include Client and Types to make it compile on github
    Shifted logging to dedicated ClientMiddleware
    Created class OpenHABSitemapWidgetEvent
    Modified openapi to include sitemapName and pageId in SitemapWidgetEvent
    Getting server sent events working - establishing a subscription and receiving events , not yet consuming  / Commented out in OpenHABSitemapViewController
    timbms committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    c96ec85 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2024

  1. Configuration menu
    Copy the full SHA
    470eb88 View commit details
    Browse the repository at this point in the history
  2. Created LoggingMiddleware to be separated from AuthorisationMiddleware

    update OpenHABWidget with OpenHABSitemapWidgetEvent
    Update to swift-tools-version 5.10
    timbms committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    eecb27e View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2024

  1. Subcribe to events and map received events to OpenHABSitemapWidgetEvents

    In order not to expose decode OpenHABSitemapWidgetEvents manually. Some relaxations required on OpenHABItem
    timbms committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    7a32f39 View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2024

  1. Using logger

    timbms committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    aaf8b49 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2024

  1. Changed accessModifier to public - To be changed back to internal whe…

    …n switching to swift 6.0
    timbms committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    ec0fc85 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2024

  1. Aligning with develop branch

    timbms committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    f4e672f View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2024

  1. Configuration menu
    Copy the full SHA
    f53939e View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2024

  1. Configuration menu
    Copy the full SHA
    e9764d3 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2024

  1. Configuration menu
    Copy the full SHA
    b7f6397 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'develop' into openapigen

    Signed-off-by: Tim Bert <5411131+timbms@users.noreply.github.com>
    timbms authored Sep 15, 2024
    Configuration menu
    Copy the full SHA
    78912e1 View commit details
    Browse the repository at this point in the history
  3. Move extensions for models from APIActor.swift to respective files

    Port api load to DrawerView
    timbms committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    c07b57e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    30aa8b3 View commit details
    Browse the repository at this point in the history
  5. Merge branch 'develop' into openapigen

    Signed-off-by: Tim Bert <5411131+timbms@users.noreply.github.com>
    timbms authored Sep 15, 2024
    Configuration menu
    Copy the full SHA
    c6ea6e6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4ec2b7e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    52fb51d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6941790 View commit details
    Browse the repository at this point in the history
  9. Merge result

    timbms committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    9d3c3a6 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2024

  1. Configuration menu
    Copy the full SHA
    b6db98b View commit details
    Browse the repository at this point in the history
  2. Merge branch 'develop' into openapigen

    Signed-off-by: Tim Bert <5411131+timbms@users.noreply.github.com>
    timbms authored Sep 16, 2024
    Configuration menu
    Copy the full SHA
    8637c46 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4514c56 View commit details
    Browse the repository at this point in the history