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

feat: serve JSON Schema definitions #841

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

smoya
Copy link
Member

@smoya smoya commented Jun 28, 2022

Description

This PR adds the feature of serving all definitions (partials) from https://github.com/asyncapi/spec-json-schemas/tree/master/definitions as well. Previously, we were only serving the schemas from https://github.com/asyncapi/spec-json-schemas/tree/master/schemas.

This is especially useful since our $id values on schemas are pointing to our website and those are not being served yet (it will after this PR is merged), e.g. http://asyncapi.com/definitions/2.4.0/asyncapi.json

I removed the rewrites from the netlify.toml and instead, we handle it now from inside the handler since we need to check where the file should be served from based on the URL. For example:

@netlify
Copy link

netlify bot commented Jun 28, 2022

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 0076156
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/62bb2f80a1ab3a00096aa0c1
😎 Deploy Preview https://deploy-preview-841--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 43
🟢 Accessibility 95
🟠 Best practices 83
🟢 SEO 100
🔴 PWA 30

Lighthouse ran on https://deploy-preview-841--asyncapi-website.netlify.app/

@smoya
Copy link
Member Author

smoya commented Jun 28, 2022

/rtm

@asyncapi-bot asyncapi-bot merged commit fdb8103 into asyncapi:master Jun 28, 2022
@smoya smoya deleted the feat/serveDefinitions branch June 28, 2022 16:49
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.

3 participants