Skip to content

v0.12.0

Compare
Choose a tag to compare
@ardatan ardatan released this 21 Sep 15:04
· 402 commits to master since this release

BREAKING CHANGES

  • createSofaRouter is no longer exported, use useSofa directly
  • useSofa now supports more server frameworks. It uses itty-router and @whatwg-node/server so it supports almost all JS environments;
    See more
    Documentation on SOFA's docs will be updated soon.
  • OpenAPI no longer has .save method. Use .get to get the schema;
const openApi = OpenAPI({
  schema,
  servers: [
    {
      url: '/', // Specify Server's URL.
      description: 'Development server',
    },
  ],
  info: {
    title: 'Example API',
    version: '3.0.0',
  },
});

- openApi.save('swagger.json');
+ fs.writeFileSync('swagger.json', JSON.stringify(openApi.get(), null, 2));