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

Return limited information when the state API is not set. #228

Conversation

proffalken
Copy link
Contributor

@proffalken proffalken commented Nov 14, 2023

Returns only the data from CONSTANCE and marks the space as "CLOSED" unless a SpaceAPI object has been created:

Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "space": "MemberMatters",
    "logo": "https://brisbanemaker.space/wp-content/uploads/2021/10/BMS-Logo-ONLY.png",
    "url": "http://localhost:8080/",
    "state": "closed",
    "contact": {
        "email": "[[email protected]](mailto:[email protected])",
        "twitter": "",
        "phone": "",
        "facebook": ""
    },
    "spacefed": {
        "spacenet": false,
        "spacesaml": false,
        "spacephone": false
    },
    "projects": [],
    "issue_report_channels": [
        "email"
    ]
}```

memberportal/api_spacedirectory/views.py Show resolved Hide resolved
memberportal/api_spacedirectory/views.py Outdated Show resolved Hide resolved
"message": spaceapi_data.space_message,
"lastchange": spaceapi_data.status_last_change.timestamp(),
}
spaceapi["icon"] = {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think I noticed this last time, but maybe double check the schema as I don't think the icon property is allowed in the top level and should be under the state property. https://spaceapi.io/docs/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The latest changes look valid against the docs but for some reason they don't actually validate against https://validator.spaceapi.io/ui/ and I really can't work out why 😢

@proffalken proffalken force-pushed the bug/227_missing_space_dir_config branch from fb91015 to 5ced15b Compare November 14, 2023 19:36
@proffalken
Copy link
Contributor Author

@jabelone - pretty sure this one can be closed off now? I don't think it adds anything we've not tackled elsewhere?

@jabelone jabelone closed this Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants