Create an Open API spec for the current mock HTTP requests

Created on 28 May 2024, about 1 month ago
Updated 14 June 2024, 14 days ago

Problem/Motivation

Currently the UI is using mock http requests
We would like to build Drupal controllers to support these
In order to do so we should document the required endpoints with Open API

See https://git.drupalcode.org/project/decoupled_lb_api/-/blob/1.x/openapi.s... for an example

Steps to reproduce

Proposed resolution

Document API requirements with Open API

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Needs work

Component

Page builder

Created by

πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @larowlan
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10
  • πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    FYI: the FieldForComponentSuggester service added in https://git.drupalcode.org/project/experience_builder/-/merge_requests/2... should provide a solid foundation one of the API responses we'll need ()

  • πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Any takers? Capturing the current mock requests + responses in this way sure would be beneficial, because we'd be able to evolve the OpenAPI schema, which would auto-document the evolution of the communication between client & server!

  • πŸ‡ΊπŸ‡ΈUnited States pfrilling Minster, OH

    Looking through the handlers mock, I started the attached OpenAPI spec. It's still a work in progress, but I think it is a good starting point. Let me know what I missed and I can continue updating the spec.

  • Status changed to Needs work 15 days ago
  • πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Thanks, @pfrilling! 🀩

    Could you convert that to an MR? πŸ™ And could you add the SchemaValidationTest that verifies this Open API spec is itself valid? You can pretty much copy/paste it from @larowlan's work at https://git.drupalcode.org/project/decoupled_lb_api/-/commit/84bf1e54153... πŸ˜„

    How do we validate this, and how do we keep it in sync with the reality? πŸ€”

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    We can also write a test that loads the fixtures from UI and validates them AND uses drupalGet to load the controllers and validate them.

    Compliance all round πŸ’ͺ

  • πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    That'd be amazing and what I'd hope for β€” because in a heterogeneous project like this (geographically, timezone-wise, employment-wise, availability-wise), that's really valuable!

  • Pipeline finished with Failed
    14 days ago
    Total: 292s
    #199051
  • Pipeline finished with Failed
    14 days ago
    Total: 237s
    #199059
  • Pipeline finished with Failed
    14 days ago
    Total: 321s
    #199065
  • Pipeline finished with Failed
    14 days ago
    #199080
  • Pipeline finished with Failed
    14 days ago
    Total: 236s
    #199085
  • Pipeline finished with Failed
    14 days ago
    Total: 232s
    #199092
Production build 0.69.0 2024