Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 136
    • Merge requests 136
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !2099

Merged
Created May 14, 2025 by Titouan Soulard@tsoulardDeveloper

Open API / XML RPC: set Content-Type for schema and add status to responses

  • Overview 0
  • Commits 4
  • Pipelines 4
  • Changes 4

These are small improvements that I made while playing with the new SlapOS API:

  1. harmonize OpenAPI and XML RPC so that they both return a status code in the response body on error;
  2. set proper Content-Type when method viewOpenAPIAsJson is called from the browser;
  3. dump OpenAPI hyperschema with indent=2 so the raw file is easier to read (like done in XML RPC).

There is still one test to be fixed because I thought that the method getContentType existed on WSGIResponse, but apparently I will have to use getHeader instead. Anyway, it is already possible to collect feedback if any. Will merge next week if no concern is raised.

/cc @jerome @romain

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: for-mr-pig
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7