Hacker News new | past | comments | ask | show | jobs | submit | vrepsys's comments login

Shameless plug: here's my indie-project that converts an OpenAPI/Swagger spec into something that aims to look like Stripe's API Reference: https://portal.dev

Here are a couple of example docs: https://space-api.portaldocs.dev (and the OpenAPI behind it: https://github.com/portaldev/nasa-apod-api-docs/blob/main/op...)

https://recur-api-beta.portaldocs.dev

At my previous workplace we've built the whole docs portal (including the API reference) as a custom static website with Contentful (a json CMS) underneath. It was a real pain in the ass to edit and maintain, that's how I got the idea.


This looks great. But I wish there were a self-hosted version. I work on a project that could use this, but it would really need to be tightly integrated with our existing hosting, I think.


Appreciate the feedback.

Would it work for you if you could export this as a static website that you could run on your own servers? (you could do that in a Github action), or, alternatively, use some sort of React component that renders the API docs in your app?


I think ideally a CLI tool to build the static website locally, which can then be deployed anywhere.


I wish there was an open-source solution something like this or similar to Readme.com but better than Redocly


I'm considering of making the OpenAPI->API Reference converter an Open Source project, and then charging only if you need advanced features, like wysiwyg/inline editing, change approvals, automatic testing of the examples in the docs etc.

It's just that I'm not sure I can do it until I have these advanced features. If I can't make money out of this I have to return to my day job, and stop developing portal.dev.


Hey HN,

I'm building a tool to render Stripe-like API docs from OpenAPI/Swagger files.

I thought that the best way to get people to discover my tool and be useful at the same time is to build docs for various open APIs. (Let me know if you need API docs for your open, or even better, an open source API, and I'll make it happen!).

How it works:

- The OpenAPI/Swagger is stored on S3 and rendered on the server-side using NextJs (on Vercel).

- I use NextJs's incremental static rendering (ISR) to render the doc in the background.

- NextJs's middleware (a new thing in NextJs 12) routes the request to an appropriate route based on the subdomain.

- I'm looking to make the docs generator an open source in the future, when I build out the editing feature which will be paid.

Any feedback/thoughts highly appreciated!


> It claimed that one Xiaomi phone had built-in censorship tools while another Huawei model had security flaws. > Xiaomi’s flagship Mi 10T [...] could detect and censor terms including “Free Tibet”, "Long live Taiwan independence" or "democracy movement", the report said.

This phone thing, as well as Lithuania allowing to the word Taiwan in "Taiwanese Representative Office in Lithuania" were the reasons for economic pressure and unofficial sanctions from China [1].

Meanwhile Taiwan is making a big effort to strengthen economic relations with Lithuania, including investments in the semiconductor industry in Lithuania [2].

[1] https://www.lrt.lt/en/news-in-english/19/1569623/china-threa...

[2] https://www.politico.eu/article/lithuania-taiwan-china-micro...


It has to do with gas, because 12% of electricity in Germany is produced by burning natural gas. That's up by 4pp from 2018. That's according to wikipedia: https://en.wikipedia.org/wiki/Electricity_sector_in_Germany


How about on demand page revalidation* ? I can't find if it's part of Next 12.

* https://github.com/vercel/next.js/discussions/11552#discussi...


It is not part of Next.js 12 – still working on it!


Found this endpoint while exploring GitHub's openapi specs. It returns a random phrase like 'Keep the flow going'. It rotates the phrase every 5 seconds or so.


The EU has failed to secure contracts ensuring the EU produced vaccine stays in the EU[1].

So far the EU has exported 41.6 million doses of the vaccine (the largest importer being the UK)[2]. Both the US and the UK have exported 0 vaccines.

[1] https://twitter.com/davekeating/status/1372897635577761803

[2] https://twitter.com/AlexTaylorNews/status/137362147260701081...


The EU doesn't export anything, it's AZ and Pfizer that are exporting, as per their contracts with the UK and other countries. It is up to AZ and Pfizer to decide how to use their factories to meet their contractual obligations with the UK and the EU.

The UK (companies) on the other hand are exporting vaccine components (fatty lipids) that enable those factories to produce vaccines for not only the UK, but the EU, and Australia, if it ever receives its doses.


The UK has partially funded AZ and added a clause into the contract that will prioritise UK for future vaccine exports from the UK. And that's exactly what's happening, all AZ produced in UK stays in UK)

Whereas a similar contract between Germany and Biontech (Germany paid biontech $445 million to help develop the vaccine) didn't include a clause defining export priorities. Pfizer-Biontech is exported all over the world.

Canada, for example, gets their Pfizer-Biontech from the EU, instead of Michigan where they're also produced.


Why are people so defensive of any criticism of EU? There are a lot of good things that come out of EU, their vaccine program is a complete shitshow. Europeans should observe that and shed light on it.

The social media is full to the brim with "EU exported because they're nice guys" including the top comment on HN.


You can be both critical of the EU vaccine rollout and still find it unacceptable that the other countries are not exporting but the EU is supposed to.


It seems like people are violently defensive in this thread. I flagged it because we are not getting down to the facts.

There are convoluted aspects of who manufactures it, where it is manufactured, what countries govern those companies, trade laws and agreements, what the contract was, what were the policies, what export/imports took place, and what is planned.

People are talking past each other.


> other countries are not exporting but the EU is supposed to.

People keep saying this, but the EU is not exporting. Companies with facilities in the EU are exporting. Those vaccines don't belong to the EU; they belong to whoever bought them. If the EU prevented their export,it doesn't mean they own more vaccines, unless the plan is to steal the property of other countries and companies.


It doesn’t, but if you ban export, the value to export goes down to zero and the value in selling it domestically stays almost the same so companies will sell it there instead. Banning export is “soft” stealing.

US did ban export.

I’m all for the free market, but if export bans are ok for US it’s ok for EU, if it’s not ok for EU then it’s not ok for US.

What people will remember is the winner, and we will have increased brain drain because of it.


The EU don't own the vaccines, it's so much more complicated than that.


> Why are people so defensive of any criticism of EU?

Or any opinion these days? Social media. The mute button, echo chambers, confirmation bias, lack of critical thought, and so on?

I think the events of the last few years will keep psychologists in business for decades.

A Douglas Adams quote feels apt:

"So long as you can keep disagreeing with each other violently enough and slagging each other off in the popular press, you can keep yourself on the gravy train for life. "


> It is up to AZ and Pfizer to decide how to use their factories to meet their contractual obligations with the UK and the EU.

Fyi this is completely untrue. The EU can (and has, now) block export of any product it wants. The US forced all domestic vaccine production sites to work for the US, while the EU failed to do so.


AFAIK you are correct except perhaps that US and UK have exported 0 vaccines, though the number is probably quite small relatively speaking, and certainly smaller than the EU (foolishly) expected.


This os the EU being a good ally. The expectation was that the UK and US would also help by exporting part of their production, which was indeed dumb.

The US also didnt secure such contracts, they simply forbid any export. The UK is helped by AZ not sending anything produced in the UK to the EU, despite the EU contract stipulating that doses would also come from the UK.


No, the expectation was that the EU vaccine demand would be supplied by EU factories. The UK doesn't even have final manufacturing for any vaccines other than the AstraZeneca one - for the most part, our government has taken a policy of funding and signing contracts with the same factories supplying the EU and assuming they wouldn't pull some export ban stunt to distract from their own problems. (This was probably naive.) And as for the AstraZeneca vaccine, the expectation that the contracted-for doses would come from their EU factories is literally written into their contract with the EU...


Lipids for the Pfizer vaccine are manufactured in the UK. A total EU export ban would have elicited a response nobody would have liked.


Not just that; quite a lot of EU AZ production goes to the UK, too.


Do you have a source on that? I was under impression that the UK manufactures their entire AZ stock and the only vaccine produced in the EU for the UK is Pfizer/BioNTech


The UK doesn't quite manufacture its entire supply of the Oxford/AstraZeneca vaccine - some is imported from India, and apparently one small batch was from a factory in the Netherlands which doesn't have enough production capacity to make much of a dent in the European demand: https://www.bbc.co.uk/news/56483766 But yeah, the vast majority is apparently locally manufactured.

The EU has been pushing the conspiracy theory that the reason there's a shortfall in supply of the AstraZeneca vaccine there is because they've been exporting it all to Britain, but there's no evidence for that which anyone can find and the numbers don't add up either.


70% of the doses the EU bought were instead delivered to the UK to fulfill AZ's obligation to the UK.

After that initial batch, a further 8 million EU doses were exported to the UK, and a further 46 million EU doses were exported to other countries, including the US.

Just this second batch would have tripled the EU's vaccination rate so far.


>>The US also didnt secure such contracts, they simply forbid any export.

USA bought vaccines from everyone a year ago and opened the check book, giving them billions without knowing if the vaccine will work. And then put all their weight to help them find factories and stuff. So USA gambled relatively nothing (Covid has cost many trillions) and gained a lot.

EU doing what they do best...meetings. USA bans exports in this sense: if Pfizer agreed to give USA 50 million shots in March, no exports until that number is delivered. Seems fair.


Pfizer wasn't part of Operation Warp Speed, they refused to join because they figured the bureaucracy would slow them down.

They did take some money from Germany though, because it came without strings.

Is it a coincidence that they were the first vaccine approved?

So to be fair it should be Germany getting all those Pfizer shots rather than the US.


But USA signed a purchase agreement to buy the vaccines way before EU did. Pfizer is obligated to deliver them first. Warp speed was just to get it going, USA would cover any loses.

Can we agree that $20 or even $50 Billion is NOTHING to USA or EU at this point...each month in delays costs more. USA realized that a year ago and blocked doses from all, including 100 million Pfizer doses in July 2020. https://investors.pfizer.com/investor-news/press-release-det...


You cannot compare this just by contracts. The US is blocking all exports of COVID-19 vaccines (except for AZ to Mexico and Canada just now). Pfizer/Biontech were until just a few weeks ago only producing in one location inside the EU so they were bottlenecked in fulfilling EU demand. Meanwhile the EU doesn't block exports.

The EU did a bad job but we have to keep the facts straight.


I wouldn’t be surprised if I saw this in a mad max convoy. But in a good sense. Love the minimalist industrial design.

I’m sure it would raise some eyebrows if I rode this on a street where I live. I’m not sure however I’d ever want this as my main vehicle (unless I’m in a postapocalyptic mad max scenario where this would be a must).


haha love this, thanks!


You should be able to just copy-paste a link to a picture and it should appear below the link. Just like in the desktop version.

Send us an email if you still can't get it working.


Correct. However, the idea is that you can run your own storage hub on a server of your choice, or, in the future, choose one or more storage providers that you trust and keep your data there (storage providers can't read your encrypted data)

This way you'll be able to pick both: 1) your storage provider 2) the app that works on top of your data


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: